Home
last modified time | relevance | path

Searched refs:mBuffer (Results 1 – 25 of 83) sorted by relevance

1234

/packages/modules/StatsD/framework/java/android/util/
DStatsEvent.java244 private Buffer mBuffer; field in StatsEvent
250 mBuffer = buffer; in StatsEvent()
298 if (mBuffer != null) { in release()
299 mBuffer.release(); in release()
300 mBuffer = null; in release()
354 private final Buffer mBuffer; field in StatsEvent.Builder
366 mBuffer = buffer; in Builder()
412 mPos += mBuffer.putBoolean(mPos, value); in writeBoolean()
424 mPos += mBuffer.putInt(mPos, value); in writeInt()
436 mPos += mBuffer.putLong(mPos, value); in writeLong()
[all …]
/packages/modules/ImsMedia/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/video/nodes/
DVideoRtpPayloadDecoderNode.cpp33 mBuffer = nullptr; in VideoRtpPayloadDecoderNode()
48 mBuffer = reinterpret_cast<uint8_t*>(malloc(MAX_RTP_PAYLOAD_BUFFER_SIZE * sizeof(uint8_t))); in Start()
50 if (mBuffer == nullptr) in Start()
61 if (mBuffer != nullptr) in Stop()
63 free(mBuffer); in Stop()
64 mBuffer = nullptr; in Stop()
134 if (pData == nullptr || nDataSize == 0 || mBuffer == nullptr) in DecodeAvc()
144 mBuffer[0] = 0x00; in DecodeAvc()
145 mBuffer[1] = 0x00; in DecodeAvc()
146 mBuffer[2] = 0x00; in DecodeAvc()
[all …]
DVideoRtpPayloadEncoderNode.cpp41 mBuffer = nullptr; in VideoRtpPayloadEncoderNode()
70 mBuffer = reinterpret_cast<uint8_t*>(malloc(MAX_RTP_PAYLOAD_BUFFER_SIZE * sizeof(uint8_t))); in Start()
72 if (mBuffer == nullptr) in Start()
83 if (mBuffer != nullptr) in Stop()
85 free(mBuffer); in Stop()
86 mBuffer = nullptr; in Stop()
323 if (mBuffer == nullptr) in EncodeAvcNALUnit()
378 memcpy(mBuffer + 1, pCurDataPos, nSendDataSize); in EncodeAvcNALUnit()
396 memcpy(mBuffer + 2, pCurDataPos, nSendDataSize); in EncodeAvcNALUnit()
409 mBuffer[0] = bFUIndicator; in EncodeAvcNALUnit()
[all …]
/packages/services/Car/cpp/evs/sampleDriver/hidl/
DEvsGlDisplay.cpp62 if (mBuffer.memHandle) { in forceShutdown()
70 alloc.free(mBuffer.memHandle); in forceShutdown()
71 mBuffer.memHandle = nullptr; in forceShutdown()
165 if (!mBuffer.memHandle) { in getTargetBuffer()
178 mBuffer.width = mGlWrapper.getWidth(); in getTargetBuffer()
179 mBuffer.height = mGlWrapper.getHeight(); in getTargetBuffer()
180 mBuffer.format = HAL_PIXEL_FORMAT_RGBA_8888; in getTargetBuffer()
181 mBuffer.usage = GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_COMPOSER; in getTargetBuffer()
182 mBuffer.bufferId = 0x3870; // Arbitrary magic number for self recognition in getTargetBuffer()
183 mBuffer.pixelSize = 4; in getTargetBuffer()
[all …]
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/
DPacketBuilder.java84 private final ByteBuffer mBuffer; field in PacketBuilder
92 mBuffer = buffer; in PacketBuilder()
106 ethHeader.writeToByteBuffer(mBuffer); in writeL2Header()
127 mIpv4HeaderOffset = mBuffer.position(); in writeIpv4Header()
134 ipv4Header.writeToByteBuffer(mBuffer); in writeIpv4Header()
153 mIpv6HeaderOffset = mBuffer.position(); in writeIpv6Header()
159 ipv6Header.writeToByteBuffer(mBuffer); in writeIpv6Header()
179 mTcpHeaderOffset = mBuffer.position(); in writeTcpHeader()
187 tcpHeader.writeToByteBuffer(mBuffer); in writeTcpHeader()
201 mUdpHeaderOffset = mBuffer.position(); in writeUdpHeader()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/signature/
DThreadUnsafeByteArrayOutputStream.java28 private byte[] mBuffer; field in ThreadUnsafeByteArrayOutputStream
32 this.mBuffer = new byte[DEFAULT_INITIAL_CAPACITY]; in ThreadUnsafeByteArrayOutputStream()
37 this.mBuffer = new byte[initialCapacity]; in ThreadUnsafeByteArrayOutputStream()
43 return Arrays.copyOfRange(mBuffer, 0, mCount); in getBytes()
49 return mBuffer; in getBuffer()
61 System.arraycopy(bytes, 0, mBuffer, mCount, bytes.length); in writeBytes()
68 mBuffer[mCount] = (byte) b; in write()
90 if (minCapacity - mBuffer.length > 0) { in ensureCapacity()
91 mBuffer = in ensureCapacity()
93 mBuffer, in ensureCapacity()
[all …]
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/
DMpegTsSampleExtractor.java259 protected final byte[] mBuffer = new byte[1024]; field in MpegTsSampleExtractor.CcParser
293 for (int i = 0; i < totalSize; i += mBuffer.length - PATTERN_LENGTH) { in mayParseClosedCaption()
295 int size = Math.min(totalSize - i, mBuffer.length); in mayParseClosedCaption()
296 buffer.get(mBuffer, 0, size); in mayParseClosedCaption()
300 if (mBuffer[j] == 0 in mayParseClosedCaption()
301 && mBuffer[j + 1] == 0 in mayParseClosedCaption()
302 && mBuffer[j + 2] == 1 in mayParseClosedCaption()
303 && (mBuffer[j + 3] & 0xff) == 0xb2) { in mayParseClosedCaption()
306 if (mBuffer[j + 4] == 'G' in mayParseClosedCaption()
307 && mBuffer[j + 5] == 'A' in mayParseClosedCaption()
[all …]
/packages/services/Car/cpp/evs/sampleDriver/aidl/src/
DEvsGlDisplay.cpp91 if (mBuffer.handle != nullptr) { in forceShutdown()
129 mBuffer.description = { in initializeGlContextLocked()
143 uint32_t stride = static_cast<uint32_t>(mBuffer.description.stride); in initializeGlContextLocked()
146 alloc.allocate(mBuffer.description.width, mBuffer.description.height, in initializeGlContextLocked()
147 static_cast<::android::PixelFormat>(mBuffer.description.format), in initializeGlContextLocked()
148 mBuffer.description.layers, in initializeGlContextLocked()
149 static_cast<uint64_t>(mBuffer.description.usage), &handle, &stride, in initializeGlContextLocked()
151 mBuffer.description.stride = stride; in initializeGlContextLocked()
152 mBuffer.fingerprint = generateFingerPrint(mBuffer.handle); in initializeGlContextLocked()
154 LOG(ERROR) << "Error " << result << " allocating " << mBuffer.description.width << " x " in initializeGlContextLocked()
[all …]
/packages/modules/Uwb/service/java/com/android/server/uwb/params/
DTlvBuffer.java32 private final ByteBuffer mBuffer; field in TlvBuffer
36 mBuffer = ByteBuffer.wrap(tlvArray); in TlvBuffer()
41 return mBuffer.array(); in getByteArray()
49 ByteBuffer mBuffer = ByteBuffer.allocate(MAX_BUFFER_SIZE); field in TlvBuffer.Builder
60 this.mBuffer.put(b); in putByte()
72 this.mBuffer.put(bArray); in putByteArray()
79 this.mBuffer.put(TlvUtil.getLeBytes(data)); in putShort()
92 this.mBuffer.put(TlvUtil.getLeBytes(sArray[i])); in putShortArray()
100 this.mBuffer.put(TlvUtil.getLeBytes(data)); in putInt()
107 this.mBuffer.put(TlvUtil.getLeBytes(data)); in putLong()
[all …]
DTlvDecoderBuffer.java42 private final ByteBuffer mBuffer; field in TlvDecoderBuffer
82 mBuffer = ByteBuffer.wrap(tlvArray); in TlvDecoderBuffer()
88 return mBuffer.array(); in getByteArray()
102 if (mBuffer.capacity() == 0) return false; in parse()
103 while (mBuffer.hasRemaining()) { in parse()
105 byte tagType = mBuffer.get(); in parse()
106 byte length = mBuffer.get(); in parse()
108 mBuffer.get(value); in parse()
112 Log.e(TAG, "Failed to parse buffer at position: " + mBuffer.position(), e); in parse()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/
Dpatricia_trie_policy.cpp41 nextPos, mBuffer.size()); in createAndGetAllChildDicNodes()
47 mBuffer.data(), &nextPos); in createAndGetAllChildDicNodes()
51 nextPos, mBuffer.size(), i, childCount); in createAndGetAllChildDicNodes()
104 pos, mBuffer.size()); in getCodePointsAndProbabilityAndReturnCodePointCount()
110 mBuffer.data(), &pos); ptNodeCount > 0; --ptNodeCount) { in getCodePointsAndProbabilityAndReturnCodePointCount()
113 AKLOGE("PtNode position is invalid. pos: %d, dict size: %zd", pos, mBuffer.size()); in getCodePointsAndProbabilityAndReturnCodePointCount()
119 PatriciaTrieReadingUtils::getFlagsAndAdvancePosition(mBuffer.data(), &pos); in getCodePointsAndProbabilityAndReturnCodePointCount()
121 mBuffer.data(), codePointTable, &pos); in getCodePointsAndProbabilityAndReturnCodePointCount()
128 mBuffer.data(), codePointTable, &pos); in getCodePointsAndProbabilityAndReturnCodePointCount()
135 mBuffer.data(), codePointTable, &pos); in getCodePointsAndProbabilityAndReturnCodePointCount()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/
Dver4_pt_node_array_reader.cpp27 if (ptNodeArrayPos < 0 || ptNodeArrayPos >= mBuffer->getTailPosition()) { in readPtNodeArrayInfoAndReturnIfValid()
30 ptNodeArrayPos, mBuffer->getTailPosition()); in readPtNodeArrayInfoAndReturnIfValid()
34 const bool usesAdditionalBuffer = mBuffer->isInAdditionalBuffer(ptNodeArrayPos); in readPtNodeArrayInfoAndReturnIfValid()
35 const uint8_t *const dictBuf = mBuffer->getBuffer(usesAdditionalBuffer); in readPtNodeArrayInfoAndReturnIfValid()
38 readingPos -= mBuffer->getOriginalBufferSize(); in readPtNodeArrayInfoAndReturnIfValid()
43 readingPos += mBuffer->getOriginalBufferSize(); in readPtNodeArrayInfoAndReturnIfValid()
56 if (forwordLinkPos < 0 || forwordLinkPos >= mBuffer->getTailPosition()) { in readForwardLinkAndReturnIfValid()
59 forwordLinkPos, mBuffer->getTailPosition()); in readForwardLinkAndReturnIfValid()
63 const bool usesAdditionalBuffer = mBuffer->isInAdditionalBuffer(forwordLinkPos); in readForwardLinkAndReturnIfValid()
64 const uint8_t *const dictBuf = mBuffer->getBuffer(usesAdditionalBuffer); in readForwardLinkAndReturnIfValid()
[all …]
Dver4_patricia_trie_node_reader.cpp32 if (ptNodePos < 0 || ptNodePos >= mBuffer->getTailPosition()) { in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
35 ptNodePos, mBuffer->getTailPosition()); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
39 const bool usesAdditionalBuffer = mBuffer->isInAdditionalBuffer(ptNodePos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
40 const uint8_t *const dictBuf = mBuffer->getBuffer(usesAdditionalBuffer); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
44 pos -= mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
62 terminalIdFieldPos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
68 childrenPosFieldPos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
73 childrenPos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
76 pos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer2/
DMpegTsSampleExtractor.java271 final byte[] mBuffer = new byte[1024]; field in MpegTsSampleExtractor.CcParser
305 for (int i = 0; i < totalSize; i += mBuffer.length - PATTERN_LENGTH) { in mayParseClosedCaption()
307 int size = Math.min(totalSize - i, mBuffer.length); in mayParseClosedCaption()
308 buffer.get(mBuffer, 0, size); in mayParseClosedCaption()
312 if (mBuffer[j] == 0 in mayParseClosedCaption()
313 && mBuffer[j + 1] == 0 in mayParseClosedCaption()
314 && mBuffer[j + 2] == 1 in mayParseClosedCaption()
315 && (mBuffer[j + 3] & 0xff) == 0xb2) { in mayParseClosedCaption()
318 if (mBuffer[j + 4] == 'G' in mayParseClosedCaption()
319 && mBuffer[j + 5] == 'A' in mayParseClosedCaption()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/
Dver4_pt_node_array_reader.cpp36 if (ptNodeArrayPos < 0 || ptNodeArrayPos >= mBuffer->getTailPosition()) { in readPtNodeArrayInfoAndReturnIfValid()
39 ptNodeArrayPos, mBuffer->getTailPosition()); in readPtNodeArrayInfoAndReturnIfValid()
43 const bool usesAdditionalBuffer = mBuffer->isInAdditionalBuffer(ptNodeArrayPos); in readPtNodeArrayInfoAndReturnIfValid()
44 const uint8_t *const dictBuf = mBuffer->getBuffer(usesAdditionalBuffer); in readPtNodeArrayInfoAndReturnIfValid()
47 readingPos -= mBuffer->getOriginalBufferSize(); in readPtNodeArrayInfoAndReturnIfValid()
52 readingPos += mBuffer->getOriginalBufferSize(); in readPtNodeArrayInfoAndReturnIfValid()
65 if (forwordLinkPos < 0 || forwordLinkPos >= mBuffer->getTailPosition()) { in readForwardLinkAndReturnIfValid()
68 forwordLinkPos, mBuffer->getTailPosition()); in readForwardLinkAndReturnIfValid()
72 const bool usesAdditionalBuffer = mBuffer->isInAdditionalBuffer(forwordLinkPos); in readForwardLinkAndReturnIfValid()
73 const uint8_t *const dictBuf = mBuffer->getBuffer(usesAdditionalBuffer); in readForwardLinkAndReturnIfValid()
[all …]
Dver4_patricia_trie_node_reader.cpp41 if (ptNodePos < 0 || ptNodePos >= mBuffer->getTailPosition()) { in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
44 ptNodePos, mBuffer->getTailPosition()); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
48 const bool usesAdditionalBuffer = mBuffer->isInAdditionalBuffer(ptNodePos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
49 const uint8_t *const dictBuf = mBuffer->getBuffer(usesAdditionalBuffer); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
53 pos -= mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
71 terminalIdFieldPos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
85 childrenPosFieldPos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
90 childrenPos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
93 pos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
/packages/inputmethods/LatinIME/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/
DArrayInitializerFormatter.java31 private final StringBuilder mBuffer = new StringBuilder(); field in ArrayInitializerFormatter
48 if (mBuffer.length() == 0) { in flush()
54 mIndent, mResourceNames[mStartIndexOfBuffer], mBuffer); in flush()
56 final String startElement = mBuffer.toString() in flush()
57 .substring(0, mBuffer.length() - mLastElement.length()) in flush()
68 mIndent, mBuffer, in flush()
71 mBuffer.setLength(0); in flush()
89 mBuffer.append(' '); in outElement()
90 mBuffer.append(element); in outElement()
95 mBuffer.append('\n'); in outElement()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DVer2DictEncoder.java47 private byte[] mBuffer; field in Ver2DictEncoder
57 mBuffer = null; in Ver2DictEncoder()
172 mBuffer = new byte[bufferSize]; in writeDictionary()
181 mOutStream.write(mBuffer, 0, mPosition); in writeDictionary()
189 if (mBuffer == null || position < 0 || position >= mBuffer.length) return; in setPosition()
206 mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, encodedPtNodeCount, in writePtNodeCount()
214 mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, in writePtNodeFlags()
221 mPosition = CharEncoding.writeCharArray(codePoints, mBuffer, mPosition, in writeCharacters()
224 mBuffer[mPosition++] = FormatSpec.PTNODE_CHARACTERS_TERMINATOR; in writeCharacters()
230 mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, frequency, in writeFrequency()
[all …]
/packages/apps/Camera2/src/com/android/camera/async/
DRefCountedBufferQueueController.java25 private final RefCountBase<BufferQueueController> mBuffer; field in RefCountedBufferQueueController
28 mBuffer = new RefCountBase<BufferQueueController>(stream, 1); in RefCountedBufferQueueController()
33 mBuffer.get().update(element); in update()
38 return mBuffer.get().isClosed(); in isClosed()
42 mBuffer.addRef(); in addRef()
47 mBuffer.close(); in close()
/packages/apps/Camera2/src/com/android/camera/exif/
DExifOutputStream.java82 private ByteBuffer mBuffer = ByteBuffer.allocate(4); field in ExifOutputStream
107 int byteNeeded = requestByteCount - mBuffer.position(); in requestByteToBuffer()
109 mBuffer.put(buffer, offset, byteToRead); in requestByteToBuffer()
142 if (mBuffer.position() < 2) { in write()
145 mBuffer.rewind(); in write()
146 if (mBuffer.getShort() != JpegHeader.SOI) { in write()
149 out.write(mBuffer.array(), 0, 2); in write()
151 mBuffer.rewind(); in write()
161 if (mBuffer.position() == 2) { in write()
162 short tag = mBuffer.getShort(); in write()
[all …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/
DExifOutputStream.java82 private ByteBuffer mBuffer = ByteBuffer.allocate(4); field in ExifOutputStream
107 int byteNeeded = requestByteCount - mBuffer.position(); in requestByteToBuffer()
109 mBuffer.put(buffer, offset, byteToRead); in requestByteToBuffer()
142 if (mBuffer.position() < 2) { in write()
145 mBuffer.rewind(); in write()
146 if (mBuffer.getShort() != JpegHeader.SOI) { in write()
149 out.write(mBuffer.array(), 0, 2); in write()
151 mBuffer.rewind(); in write()
161 if (mBuffer.position() == 2) { in write()
162 short tag = mBuffer.getShort(); in write()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/
DByteArrayDictBuffer.java26 private byte[] mBuffer; field in ByteArrayDictBuffer
30 mBuffer = buffer; in ByteArrayDictBuffer()
36 return mBuffer[mPosition++] & 0xFF; in readUnsignedByte()
69 mBuffer[mPosition++] = b; in put()
74 return mBuffer.length - 1; in limit()
79 return mBuffer.length; in capacity()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/async/
DCircularByteBuffer.java27 private final byte[] mBuffer; field in CircularByteBuffer
35 mBuffer = new byte[mCapacity]; in CircularByteBuffer()
43 Arrays.fill(mBuffer, (byte) 0); in clear()
67 return mBuffer[(mReadPos + offset) % mCapacity]; in peek()
82 System.arraycopy(mBuffer, mReadPos, dst, dstPos, copyLen); in readBytes()
108 System.arraycopy(mBuffer, tmpReadPos, dst, dstPos, copyLen); in peekBytes()
130 return mBuffer; in getDirectReadBuffer()
152 System.arraycopy(buffer, pos, mBuffer, mWritePos, copyLen); in writeBytes()
183 return mBuffer; in getDirectWriteBuffer()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/shortcut/
Dshortcut_list_policy.h31 explicit ShortcutListPolicy(const ReadOnlyByteArrayView buffer) : mBuffer(buffer) {} in ShortcutListPolicy()
40 ShortcutListReadingUtils::getShortcutListSizeAndForwardPointer(mBuffer, &listPos); in getStartPos()
48 ShortcutListReadingUtils::getFlagsAndForwardPointer(mBuffer, pos); in getNextShortcut()
57 mBuffer, maxCodePointCount, outCodePoint, pos); in getNextShortcut()
63 ::getShortcutListSizeAndForwardPointer(mBuffer, pos); in skipAllShortcuts()
70 const ReadOnlyByteArrayView mBuffer; variable
/packages/apps/Messaging/src/com/android/messaging/util/exif/
DExifOutputStream.java83 private final ByteBuffer mBuffer = ByteBuffer.allocate(4); field in ExifOutputStream
108 int byteNeeded = requestByteCount - mBuffer.position(); in requestByteToBuffer()
110 mBuffer.put(buffer, offset, byteToRead); in requestByteToBuffer()
143 if (mBuffer.position() < 2) { in write()
146 mBuffer.rewind(); in write()
147 if (mBuffer.getShort() != JpegHeader.SOI) { in write()
150 out.write(mBuffer.array(), 0, 2); in write()
152 mBuffer.rewind(); in write()
162 if (mBuffer.position() == 2) { in write()
163 short tag = mBuffer.getShort(); in write()
[all …]

1234