/frameworks/compile/mclinker/unittests/ |
D | LEB128Test.cpp | 46 leb128::ByteType buffer[2]; in TEST_F() local 50 result = buffer; in TEST_F() 52 ASSERT_EQ(buffer[0], 2); in TEST_F() 53 ASSERT_EQ(result, buffer + 1); in TEST_F() 56 result = buffer; in TEST_F() 58 ASSERT_EQ(buffer[0], 127); in TEST_F() 59 ASSERT_EQ(result, buffer + 1); in TEST_F() 62 result = buffer; in TEST_F() 64 ASSERT_EQ(buffer[0], 0 + 0x80); in TEST_F() 65 ASSERT_EQ(buffer[1], 1); in TEST_F() [all …]
|
/frameworks/base/media/libdrm/mobile1/src/xml/ |
D | xml_tinyparser.c | 27 static uint8_t *xml_ignore_blank(uint8_t *buffer) in xml_ignore_blank() argument 29 if (NULL == buffer) in xml_ignore_blank() 32 while (XML_IS_WHITESPACE(*buffer)) in xml_ignore_blank() 33 buffer++; in xml_ignore_blank() 35 return buffer; in xml_ignore_blank() 38 static uint8_t *xml_goto_tagend(uint8_t *buffer) in xml_goto_tagend() argument 43 if (NULL == buffer) in xml_goto_tagend() 47 if (*buffer == '<') { in xml_goto_tagend() 48 buffer++; in xml_goto_tagend() 49 while (buffer != NULL && XML_IS_NAMECHAR(*buffer)) in xml_goto_tagend() [all …]
|
/frameworks/base/core/java/android/text/method/ |
D | ArrowKeyMovementMethod.java | 33 private static boolean isSelecting(Spannable buffer) { in isSelecting() argument 34 return ((MetaKeyKeyListener.getMetaState(buffer, MetaKeyKeyListener.META_SHIFT_ON) == 1) || in isSelecting() 35 (MetaKeyKeyListener.getMetaState(buffer, MetaKeyKeyListener.META_SELECTING) != 0)); in isSelecting() 38 private static int getCurrentLineTop(Spannable buffer, Layout layout) { in getCurrentLineTop() argument 39 return layout.getLineTop(layout.getLineForOffset(Selection.getSelectionEnd(buffer))); in getCurrentLineTop() 51 protected boolean handleMovementKey(TextView widget, Spannable buffer, int keyCode, in handleMovementKey() argument 58 && MetaKeyKeyListener.getMetaState(buffer, in handleMovementKey() 65 return super.handleMovementKey(widget, buffer, keyCode, movementMetaState, event); in handleMovementKey() 69 protected boolean left(TextView widget, Spannable buffer) { in left() argument 71 if (isSelecting(buffer)) { in left() [all …]
|
D | ScrollingMovementMethod.java | 29 protected boolean left(TextView widget, Spannable buffer) { in left() argument 30 return scrollLeft(widget, buffer, 1); in left() 34 protected boolean right(TextView widget, Spannable buffer) { in right() argument 35 return scrollRight(widget, buffer, 1); in right() 39 protected boolean up(TextView widget, Spannable buffer) { in up() argument 40 return scrollUp(widget, buffer, 1); in up() 44 protected boolean down(TextView widget, Spannable buffer) { in down() argument 45 return scrollDown(widget, buffer, 1); in down() 49 protected boolean pageUp(TextView widget, Spannable buffer) { in pageUp() argument 50 return scrollPageUp(widget, buffer); in pageUp() [all …]
|
D | LinkMovementMethod.java | 39 protected boolean handleMovementKey(TextView widget, Spannable buffer, int keyCode, in handleMovementKey() argument 46 event.getRepeatCount() == 0 && action(CLICK, widget, buffer)) { in handleMovementKey() 52 return super.handleMovementKey(widget, buffer, keyCode, movementMetaState, event); in handleMovementKey() 56 protected boolean up(TextView widget, Spannable buffer) { in up() argument 57 if (action(UP, widget, buffer)) { in up() 61 return super.up(widget, buffer); in up() 65 protected boolean down(TextView widget, Spannable buffer) { in down() argument 66 if (action(DOWN, widget, buffer)) { in down() 70 return super.down(widget, buffer); in down() 74 protected boolean left(TextView widget, Spannable buffer) { in left() argument [all …]
|
D | BaseMovementMethod.java | 136 protected int getMovementMetaState(Spannable buffer, KeyEvent event) { in getMovementMetaState() argument 138 int metaState = (event.getMetaState() | MetaKeyKeyListener.getMetaState(buffer)) in getMovementMetaState() 160 protected boolean handleMovementKey(TextView widget, Spannable buffer, in handleMovementKey() argument 165 return left(widget, buffer); in handleMovementKey() 168 return leftWord(widget, buffer); in handleMovementKey() 171 return lineStart(widget, buffer); in handleMovementKey() 177 return right(widget, buffer); in handleMovementKey() 180 return rightWord(widget, buffer); in handleMovementKey() 183 return lineEnd(widget, buffer); in handleMovementKey() 189 return up(widget, buffer); in handleMovementKey() [all …]
|
/frameworks/native/libs/gui/ |
D | Sensor.cpp | 111 size_t write(void* buffer, size_t offset, const String8& value) { in write() argument 112 memcpy(static_cast<char*>(buffer) + offset, value.string(), value.length()); in write() 117 size_t write(void* buffer, size_t offset, float value) { in write() argument 118 *reinterpret_cast<float*>(static_cast<char*>(buffer) + offset) = value; in write() 123 size_t write(void* buffer, size_t offset, int32_t value) { in write() argument 124 *reinterpret_cast<int32_t*>(static_cast<char*>(buffer) + offset) = value; in write() 128 status_t Sensor::flatten(void* buffer) const in flatten() 131 offset += write(buffer, offset, int32_t(mName.length())); in flatten() 132 offset += write(buffer, offset, mName); in flatten() 133 offset += write(buffer, offset, int32_t(mVendor.length())); in flatten() [all …]
|
/frameworks/av/media/libstagefright/ |
D | XINGSeeker.cpp | 85 uint8_t buffer[4]; in CreateFromSource() local 87 if (source->readAt(offset, &buffer, 4) < 4) { // get header in CreateFromSource() 92 int header = U32_AT(buffer);; in CreateFromSource() 103 uint8_t version = (buffer[1] >> 3) & 3; in CreateFromSource() 116 if (source->readAt(offset, &buffer, 4) < 4) { // XING header ID in CreateFromSource() 121 if ((buffer[0] != 'X') || (buffer[1] != 'i') in CreateFromSource() 122 || (buffer[2] != 'n') || (buffer[3] != 'g')) { in CreateFromSource() 123 if ((buffer[0] != 'I') || (buffer[1] != 'n') in CreateFromSource() 124 || (buffer[2] != 'f') || (buffer[3] != 'o')) { in CreateFromSource() 129 if (source->readAt(offset, &buffer, 4) < 4) { // flags in CreateFromSource() [all …]
|
D | MediaBufferGroup.cpp | 33 for (MediaBuffer *buffer = mFirstBuffer; buffer != NULL; in ~MediaBufferGroup() local 34 buffer = next) { in ~MediaBufferGroup() 35 next = buffer->nextBuffer(); in ~MediaBufferGroup() 37 CHECK_EQ(buffer->refcount(), 0); in ~MediaBufferGroup() 39 buffer->setObserver(NULL); in ~MediaBufferGroup() 40 buffer->release(); in ~MediaBufferGroup() 44 void MediaBufferGroup::add_buffer(MediaBuffer *buffer) { in add_buffer() argument 47 buffer->setObserver(this); in add_buffer() 50 mLastBuffer->setNextBuffer(buffer); in add_buffer() 52 mFirstBuffer = buffer; in add_buffer() [all …]
|
D | MPEG2TSWriter.cpp | 88 bool appendAACFrames(MediaBuffer *buffer); 91 void postAVCFrame(MediaBuffer *buffer); 253 void MPEG2TSWriter::SourceInfo::postAVCFrame(MediaBuffer *buffer) { in postAVCFrame() argument 258 new ABuffer(buffer->range_length()); in postAVCFrame() 260 (const uint8_t *)buffer->data() in postAVCFrame() 261 + buffer->range_offset(), in postAVCFrame() 262 buffer->range_length()); in postAVCFrame() 265 CHECK(buffer->meta_data()->findInt64(kKeyTime, &timeUs)); in postAVCFrame() 269 if (buffer->meta_data()->findInt32(kKeyIsSyncFrame, &isSync) in postAVCFrame() 278 bool MPEG2TSWriter::SourceInfo::appendAACFrames(MediaBuffer *buffer) { in appendAACFrames() argument [all …]
|
D | Utils.cpp | 149 sp<ABuffer> buffer = new ABuffer(1024); in convertMetaDataToMessage() local 150 buffer->setRange(0, 0); in convertMetaDataToMessage() 161 memcpy(buffer->data() + buffer->size(), "\x00\x00\x00\x01", 4); in convertMetaDataToMessage() 162 memcpy(buffer->data() + buffer->size() + 4, ptr, length); in convertMetaDataToMessage() 163 buffer->setRange(0, buffer->size() + 4 + length); in convertMetaDataToMessage() 169 buffer->meta()->setInt32("csd", true); in convertMetaDataToMessage() 170 buffer->meta()->setInt64("timeUs", 0); in convertMetaDataToMessage() 172 msg->setBuffer("csd-0", buffer); in convertMetaDataToMessage() 174 buffer = new ABuffer(1024); in convertMetaDataToMessage() 175 buffer->setRange(0, 0); in convertMetaDataToMessage() [all …]
|
/frameworks/base/tools/aidl/ |
D | aidl_language_y.y | 46 IMPORT { g_callbacks->import(&($1.buffer)); } 47 | IMPORT imports { g_callbacks->import(&($1.buffer)); } 71 $2.buffer.lineno, $2.buffer.data); 86 b->keyword_token = $1.buffer; 87 b->name = $2.buffer; 89 b->semicolon_token = $3.buffer; 95 … g_currentFilename, $1.buffer.lineno); 100 … g_currentFilename, $2.buffer.lineno, $2.buffer.data); 107 b->keyword_token = $1.buffer; 108 b->name = $2.buffer; [all …]
|
/frameworks/av/media/libnbaio/ |
D | SourceAudioBufferProvider.cpp | 48 status_t SourceAudioBufferProvider::getNextBuffer(Buffer *buffer, int64_t pts) in getNextBuffer() argument 50 ALOG_ASSERT(buffer != NULL && buffer->frameCount > 0 && mGetCount == 0); in getNextBuffer() 54 if (mRemaining < buffer->frameCount) { in getNextBuffer() 55 buffer->frameCount = mRemaining; in getNextBuffer() 57 buffer->raw = (char *) mAllocated + (mOffset << mFrameBitShift); in getNextBuffer() 58 mGetCount = buffer->frameCount; in getNextBuffer() 62 if (buffer->frameCount > mSize) { in getNextBuffer() 64 mAllocated = malloc(buffer->frameCount << mFrameBitShift); in getNextBuffer() 65 mSize = buffer->frameCount; in getNextBuffer() 68 ssize_t actual = mSource->read(mAllocated, buffer->frameCount, pts); in getNextBuffer() [all …]
|
/frameworks/base/core/java/android/net/ |
D | SntpClient.java | 79 byte[] buffer = new byte[NTP_PACKET_SIZE]; in requestTime() 80 DatagramPacket request = new DatagramPacket(buffer, buffer.length, address, NTP_PORT); in requestTime() 85 buffer[0] = NTP_MODE_CLIENT | (NTP_VERSION << 3); in requestTime() 90 writeTimeStamp(buffer, TRANSMIT_TIME_OFFSET, requestTime); in requestTime() 95 DatagramPacket response = new DatagramPacket(buffer, buffer.length); in requestTime() 101 long originateTime = readTimeStamp(buffer, ORIGINATE_TIME_OFFSET); in requestTime() 102 long receiveTime = readTimeStamp(buffer, RECEIVE_TIME_OFFSET); in requestTime() 103 long transmitTime = readTimeStamp(buffer, TRANSMIT_TIME_OFFSET); in requestTime() 165 private long read32(byte[] buffer, int offset) { in read32() argument 166 byte b0 = buffer[offset]; in read32() [all …]
|
/frameworks/av/media/libstagefright/rtsp/ |
D | ARTPWriter.cpp | 176 static void StripStartcode(MediaBuffer *buffer) { in StripStartcode() argument 177 if (buffer->range_length() < 4) { in StripStartcode() 182 (const uint8_t *)buffer->data() + buffer->range_offset(); in StripStartcode() 185 buffer->set_range( in StripStartcode() 186 buffer->range_offset() + 4, buffer->range_length() - 4); in StripStartcode() 198 MediaBuffer *buffer; in onMessageReceived() 199 CHECK_EQ(mSource->read(&buffer), (status_t)OK); in onMessageReceived() 201 StripStartcode(buffer); in onMessageReceived() 202 makeH264SPropParamSets(buffer); in onMessageReceived() 203 buffer->release(); in onMessageReceived() [all …]
|
D | AAVCAssembler.cpp | 69 sp<ABuffer> buffer = *queue->begin(); in addNALUnit() local 73 mNextExpectedSeqNo = (uint32_t)buffer->int32Data(); in addNALUnit() 74 } else if ((uint32_t)buffer->int32Data() != mNextExpectedSeqNo) { in addNALUnit() 80 const uint8_t *data = buffer->data(); in addNALUnit() 81 size_t size = buffer->size(); in addNALUnit() 95 addSingleNALUnit(buffer); in addNALUnit() 104 bool success = addSingleTimeAggregationPacket(buffer); in addNALUnit() 119 void AAVCAssembler::addSingleNALUnit(const sp<ABuffer> &buffer) { in addSingleNALUnit() argument 120 ALOGV("addSingleNALUnit of size %d", buffer->size()); in addSingleNALUnit() 122 hexdump(buffer->data(), buffer->size()); in addSingleNALUnit() [all …]
|
D | ARTPSource.cpp | 88 void ARTPSource::processRTPPacket(const sp<ABuffer> &buffer) { in processRTPPacket() argument 89 if (queuePacket(buffer) && mAssembler != NULL) { in processRTPPacket() 105 bool ARTPSource::queuePacket(const sp<ABuffer> &buffer) { in queuePacket() argument 106 uint32_t seqNum = (uint32_t)buffer->int32Data(); in queuePacket() 110 mQueue.push_back(buffer); in queuePacket() 145 buffer->setInt32Data(seqNum); in queuePacket() 157 mQueue.insert(it, buffer); in queuePacket() 166 void ARTPSource::addFIR(const sp<ABuffer> &buffer) { in addFIR() argument 179 if (buffer->size() + 20 > buffer->capacity()) { in addFIR() 184 uint8_t *data = buffer->data() + buffer->size(); in addFIR() [all …]
|
/frameworks/base/core/java/android/util/ |
D | JsonReader.java | 195 private final char[] buffer = new char[1024]; field in JsonReader 679 if ((pos < limit || fillBuffer(1)) && buffer[pos] == '>') { in objectValue() 722 if (buffer[i] == '\n') { in fillBuffer() 732 System.arraycopy(buffer, pos, buffer, 0, limit); in fillBuffer() 739 while ((total = in.read(buffer, limit, buffer.length - limit)) != -1) { in fillBuffer() 744 && limit > 0 && buffer[0] == '\ufeff') { in fillBuffer() 759 if (buffer[i] == '\n') { in getLineNumber() 769 if (buffer[i] == '\n') { in getColumnNumber() 780 int c = buffer[pos++]; in nextNonWhitespace() 794 char peek = buffer[pos]; in nextNonWhitespace() [all …]
|
/frameworks/base/core/jni/ |
D | android_hardware_UsbRequest.cpp | 81 jbyteArray buffer, jint length, jboolean out) in android_hardware_UsbRequest_queue_array() argument 89 if (buffer && length) { in android_hardware_UsbRequest_queue_array() 90 request->buffer = malloc(length); in android_hardware_UsbRequest_queue_array() 91 if (!request->buffer) in android_hardware_UsbRequest_queue_array() 93 memset(request->buffer, 0, length); in android_hardware_UsbRequest_queue_array() 96 env->GetByteArrayRegion(buffer, 0, length, (jbyte *)request->buffer); in android_hardware_UsbRequest_queue_array() 99 request->buffer = NULL; in android_hardware_UsbRequest_queue_array() 104 if (request->buffer) { in android_hardware_UsbRequest_queue_array() 106 free(request->buffer); in android_hardware_UsbRequest_queue_array() 107 request->buffer = NULL; in android_hardware_UsbRequest_queue_array() [all …]
|
/frameworks/base/core/java/android/hardware/ |
D | SerialPort.java | 90 public int read(ByteBuffer buffer) throws IOException { in read() argument 91 if (buffer.isDirect()) { in read() 92 return native_read_direct(buffer, buffer.remaining()); in read() 93 } else if (buffer.hasArray()) { in read() 94 return native_read_array(buffer.array(), buffer.remaining()); in read() 106 public void write(ByteBuffer buffer, int length) throws IOException { in write() argument 107 if (buffer.isDirect()) { in write() 108 native_write_direct(buffer, length); in write() 109 } else if (buffer.hasArray()) { in write() 110 native_write_array(buffer.array(), length); in write() [all …]
|
/frameworks/base/libs/hwui/ |
D | PathRenderer.cpp | 102 Vertex* buffer = vertexBuffer.alloc<Vertex>(perimeter.size()); in getFillVerticesFromPerimeter() local 110 copyVertex(&buffer[currentIndex++], &perimeter[srcAindex]); in getFillVerticesFromPerimeter() 112 copyVertex(&buffer[currentIndex++], &perimeter[srcBindex]); in getFillVerticesFromPerimeter() 120 Vertex* buffer = vertexBuffer.alloc<Vertex>(perimeter.size() * 2 + 2); in getStrokeVerticesFromPerimeter() local 137 Vertex::set(&buffer[currentIndex++], in getStrokeVerticesFromPerimeter() 141 Vertex::set(&buffer[currentIndex++], in getStrokeVerticesFromPerimeter() 151 copyVertex(&buffer[currentIndex++], &buffer[0]); in getStrokeVerticesFromPerimeter() 152 copyVertex(&buffer[currentIndex++], &buffer[1]); in getStrokeVerticesFromPerimeter() 157 Vertex* buffer = vertexBuffer.alloc<Vertex>(vertices.size() * 2); in getStrokeVerticesFromUnclosedVertices() local 176 Vertex::set(&buffer[currentIndex++], in getStrokeVerticesFromUnclosedVertices() [all …]
|
/frameworks/base/tests/CoreTests/android/core/ |
D | HttpHeaderTest.java | 54 CharArrayBuffer buffer = new CharArrayBuffer(64); in testCacheControl() local 56 buffer.append(CACHE_CONTROL_MAX_AGE); in testCacheControl() 57 h.parseHeader(buffer); in testCacheControl() 59 buffer.clear(); in testCacheControl() 60 buffer.append(LAST_MODIFIED); in testCacheControl() 61 h.parseHeader(buffer); in testCacheControl() 64 buffer.clear(); in testCacheControl() 65 buffer.append(CACHE_CONTROL_PRIVATE); in testCacheControl() 66 h.parseHeader(buffer); in testCacheControl() 86 CharArrayBuffer buffer = new CharArrayBuffer(64); in testCacheControlMultipleArguments() local [all …]
|
/frameworks/av/media/libstagefright/codecs/on2/h264dec/source/ |
D | h264bsd_dpb.c | 287 if (index < 0 || !IS_EXISTING(dpb->buffer[index])) in h264bsdReorderRefPicList() 294 dpb->list[refIdx++] = &dpb->buffer[index]; in h264bsdReorderRefPicList() 297 if(dpb->list[j] != &dpb->buffer[index]) in h264bsdReorderRefPicList() 338 SET_UNUSED(dpb->buffer[index]); in Mmcop1() 340 if (!dpb->buffer[index].toBeDisplayed) in Mmcop1() 374 SET_UNUSED(dpb->buffer[index]); in Mmcop2() 376 if (!dpb->buffer[index].toBeDisplayed) in Mmcop2() 421 if (IS_LONG_TERM(dpb->buffer[i]) && in Mmcop3() 422 (u32)dpb->buffer[i].picNum == longTermFrameIdx) in Mmcop3() 424 SET_UNUSED(dpb->buffer[i]); in Mmcop3() [all …]
|
/frameworks/av/media/libstagefright/mpeg2ts/ |
D | AnotherPacketSource.cpp | 65 status_t AnotherPacketSource::dequeueAccessUnit(sp<ABuffer> *buffer) { in dequeueAccessUnit() argument 66 buffer->clear(); in dequeueAccessUnit() 74 *buffer = *mBuffers.begin(); in dequeueAccessUnit() 78 if ((*buffer)->meta()->findInt32("discontinuity", &discontinuity)) { in dequeueAccessUnit() 102 const sp<ABuffer> buffer = *mBuffers.begin(); in read() local 106 if (buffer->meta()->findInt32("discontinuity", &discontinuity)) { in read() 114 CHECK(buffer->meta()->findInt64("timeUs", &timeUs)); in read() 116 MediaBuffer *mediaBuffer = new MediaBuffer(buffer); in read() 137 void AnotherPacketSource::queueAccessUnit(const sp<ABuffer> &buffer) { in queueAccessUnit() argument 139 if (buffer->meta()->findInt32("damaged", &damaged) && damaged) { in queueAccessUnit() [all …]
|
/frameworks/av/media/libstagefright/httplive/ |
D | LiveDataSource.cpp | 69 sp<ABuffer> buffer = *it; in readAtNonBlocking() local 71 totalAvailable += buffer->size(); in readAtNonBlocking() 112 sp<ABuffer> buffer = *mBufferQueue.begin(); in readAt_l() local 116 if (copy > buffer->size()) { in readAt_l() 117 copy = buffer->size(); in readAt_l() 120 memcpy((uint8_t *)data + sizeDone, buffer->data(), copy); in readAt_l() 124 buffer->setRange(buffer->offset() + copy, buffer->size() - copy); in readAt_l() 126 if (buffer->size() == 0) { in readAt_l() 136 void LiveDataSource::queueBuffer(const sp<ABuffer> &buffer) { in queueBuffer() argument 145 CHECK_EQ(fwrite(buffer->data(), 1, buffer->size(), mBackupFile), in queueBuffer() [all …]
|