Home
last modified time | relevance | path

Searched refs:bufferSize (Results 1 – 25 of 106) sorted by relevance

12345

/frameworks/base/core/java/com/android/internal/util/
DLineBreakBufferedWriter.java48 private final int bufferSize; field in LineBreakBufferedWriter
68 public LineBreakBufferedWriter(Writer out, int bufferSize) { in LineBreakBufferedWriter() argument
69 this(out, bufferSize, 16); // 16 is the default size of a StringBuilder buffer. in LineBreakBufferedWriter()
79 public LineBreakBufferedWriter(Writer out, int bufferSize, int initialCapacity) { in LineBreakBufferedWriter() argument
81 this.buffer = new char[Math.min(initialCapacity, bufferSize)]; in LineBreakBufferedWriter()
83 this.bufferSize = bufferSize; in LineBreakBufferedWriter()
119 while (bufferIndex + len > bufferSize) { in write()
123 int maxLength = bufferSize - bufferIndex; in write()
126 if (bufferIndex + i < bufferSize) { in write()
149 int rest = bufferSize - bufferIndex; in write()
[all …]
/frameworks/base/cmds/statsd/src/shell/
DShellSubscriber.cpp118 size_t bufferSize = mProto.size(); in writeToOutputLocked() local
119 write(mOutput, &bufferSize, sizeof(bufferSize)); in writeToOutputLocked()
120 VLOG("%d atoms, proto size: %zu", count, bufferSize); in writeToOutputLocked()
161 size_t bufferSize = 0; in readConfig() local
163 if ((result = read(in, &bufferSize, sizeof(bufferSize))) == 0) { in readConfig()
166 } else if (result < 0 || result != sizeof(bufferSize)) { in readConfig()
171 vector<uint8_t> buffer(bufferSize); in readConfig()
172 if ((result = read(in, buffer.data(), bufferSize)) > 0 && ((size_t)result) == bufferSize) { in readConfig()
174 if (config.ParseFromArray(buffer.data(), bufferSize)) { in readConfig()
181 VLOG("Error reading the config, returned: %d, expecting %zu", result, bufferSize); in readConfig()
[all …]
/frameworks/av/drm/common/
DIDrmManagerService.cpp177 const int bufferSize = reply.readInt32(); in getConstraints() local
179 if (0 < bufferSize) { in getConstraints()
180 data = new char[bufferSize]; in getConstraints()
181 reply.read(data, bufferSize); in getConstraints()
207 const int bufferSize = reply.readInt32(); in getMetadata() local
209 if (0 < bufferSize) { in getMetadata()
210 data = new char[bufferSize]; in getMetadata()
211 reply.read(data, bufferSize); in getMetadata()
273 const int bufferSize = reply.readInt32(); in processDrmInfo() local
275 if (0 < bufferSize) { in processDrmInfo()
[all …]
/frameworks/base/core/java/android/ddm/
DDdmHandleThread.java146 int bufferSize = 0; in createStackChunk() local
148 bufferSize += 4; // version, flags, whatever in createStackChunk()
149 bufferSize += 4; // thread ID in createStackChunk()
150 bufferSize += 4; // frame count in createStackChunk()
152 bufferSize += 4 + elem.getClassName().length() * 2; in createStackChunk()
153 bufferSize += 4 + elem.getMethodName().length() * 2; in createStackChunk()
154 bufferSize += 4; in createStackChunk()
156 bufferSize += elem.getFileName().length() * 2; in createStackChunk()
157 bufferSize += 4; // line number in createStackChunk()
160 ByteBuffer out = ByteBuffer.allocate(bufferSize); in createStackChunk()
DDdmHandleProfiling.java105 int bufferSize = in.getInt(); in handleMPRS() local
111 + "', size=" + bufferSize + ", flags=" + flags); in handleMPRS()
114 Debug.startMethodTracing(fileName, bufferSize, flags); in handleMPRS()
147 int bufferSize = in.getInt(); in handleMPSS() local
150 Log.v("ddm-heap", "Method prof stream start: size=" + bufferSize in handleMPSS()
155 Debug.startMethodTracingDdms(bufferSize, flags, false, 0); in handleMPSS()
200 int bufferSize = in.getInt(); in handleSPSS() local
204 Log.v("ddm-heap", "Sample prof stream start: size=" + bufferSize in handleSPSS()
209 Debug.startMethodTracingDdms(bufferSize, flags, true, interval); in handleSPSS()
/frameworks/base/cmds/statsd/tests/shell/
DShellSubscriber_test.cpp69 size_t bufferSize = config.ByteSize(); in runShellTest() local
72 vector<uint8_t> size_buffer(sizeof(bufferSize)); in runShellTest()
73 std::memcpy(size_buffer.data(), &bufferSize, sizeof(bufferSize)); in runShellTest()
74 write(fds_config[1], &bufferSize, sizeof(bufferSize)); in runShellTest()
76 vector<uint8_t> buffer(bufferSize); in runShellTest()
77 config.SerializeToArray(&buffer[0], bufferSize); in runShellTest()
78 write(fds_config[1], buffer.data(), bufferSize); in runShellTest()
/frameworks/av/media/libstagefright/include/media/stagefright/
DDataSource.h59 virtual bool getUri(char *uriString, size_t bufferSize) final { in getUri() argument
60 int ret = snprintf(uriString, bufferSize, "%s", getUri().c_str()); in getUri()
61 return ret >= 0 && static_cast<size_t>(ret) < bufferSize; in getUri()
84 mWrapper->getUri = [](void *handle, char *uriString, size_t bufferSize) -> bool { in wrap()
85 return ((DataSource*)handle)->getUri(uriString, bufferSize); in wrap()
/frameworks/av/include/media/
DDataSource.h59 virtual bool getUri(char *uriString, size_t bufferSize) final { in getUri() argument
60 int ret = snprintf(uriString, bufferSize, "%s", getUri().c_str()); in getUri()
61 return ret >= 0 && static_cast<size_t>(ret) < bufferSize; in getUri()
84 mWrapper->getUri = [](void *handle, char *uriString, size_t bufferSize) -> bool { in wrap()
85 return ((DataSource*)handle)->getUri(uriString, bufferSize); in wrap()
/frameworks/native/services/surfaceflinger/CompositionEngine/src/
DOutputLayer.cpp142 const Rect& bufferSize = layerState.geomBufferSize; in calculateOutputSourceCrop() local
144 int winWidth = bufferSize.getWidth(); in calculateOutputSourceCrop()
145 int winHeight = bufferSize.getHeight(); in calculateOutputSourceCrop()
186 activeCrop.transform(invTransform, bufferSize.getWidth(), bufferSize.getHeight()); in calculateOutputSourceCrop()
214 const Rect& bufferSize = layerState.geomBufferSize; in calculateOutputDisplayFrame() local
216 if (!activeCrop.isEmpty() && bufferSize.isValid()) { in calculateOutputDisplayFrame()
228 if (!activeCrop.intersect(bufferSize, &activeCrop)) { in calculateOutputDisplayFrame()
232 activeTransparentRegion.orSelf(Rect(0, 0, bufferSize.getWidth(), activeCrop.top)); in calculateOutputDisplayFrame()
234 Rect(0, activeCrop.bottom, bufferSize.getWidth(), bufferSize.getHeight())); in calculateOutputDisplayFrame()
237 Rect(activeCrop.right, activeCrop.top, bufferSize.getWidth(), activeCrop.bottom)); in calculateOutputDisplayFrame()
/frameworks/av/media/libstagefright/
DAudioSource.cpp358 const size_t bufferSize = audioBuffer.size; in dataCallback() local
363 int64_t receievedFrames = bufferSize / mRecord->frameSize(); in dataCallback()
404 uint64_t bufferSize = numLostBytes; in dataCallback() local
407 bufferSize = kMaxBufferSize; in dataCallback()
411 MediaBuffer *lostAudioBuffer = new MediaBuffer(bufferSize); in dataCallback()
412 memset(lostAudioBuffer->data(), 0, bufferSize); in dataCallback()
413 lostAudioBuffer->set_range(0, bufferSize); in dataCallback()
414 mNumFramesLost += bufferSize / mRecord->frameSize(); in dataCallback()
423 MediaBuffer *buffer = new MediaBuffer(bufferSize); in dataCallback()
426 buffer->set_range(0, bufferSize); in dataCallback()
[all …]
DCallbackDataSource.cpp66 const size_t bufferSize = mMemory->size(); in readAt() local
69 size_t numToRead = std::min(numLeft, bufferSize); in readAt()
83 CHECK(numRead >= 0 && (size_t)numRead <= bufferSize); in readAt()
/frameworks/av/media/libstagefright/codecs/m4v_h263/enc/src/
Dbitstream_io.cpp52 BitstreamEncVideo *BitStreamCreateEnc(Int bufferSize) in BitStreamCreateEnc() argument
60 stream->bufferSize = bufferSize; in BitStreamCreateEnc()
61 stream->bitstreamBuffer = (UChar *) M4VENC_MALLOC(stream->bufferSize * sizeof(UChar)); in BitStreamCreateEnc()
68 M4VENC_MEMSET(stream->bitstreamBuffer, 0, stream->bufferSize*sizeof(UChar)); in BitStreamCreateEnc()
213 if (stream->byteCount + WORD_SIZE > stream->bufferSize) in BitstreamSaveWord()
267 if (stream->byteCount + numbyte > stream->bufferSize) in BitstreamSavePartial()
446 if (bitstream1->byteCount + bitstream2->byteCount + offset > bitstream1->bufferSize) in BitstreamAppendEnc()
498 if (bitstream1->byteCount + bitstream2->byteCount > bitstream1->bufferSize) in BitstreamAppendPacket()
541 if (bitstream1->byteCount + bitstream2->byteCount > bitstream1->bufferSize) in BitstreamAppendPacketNoOffset()
543 numbyte2 = bitstream1->bufferSize - bitstream1->byteCount; in BitstreamAppendPacketNoOffset()
[all …]
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/
DInputStreamBuffer.java97 public InputStreamBuffer(final InputStream inputStream, int bufferSize, in InputStreamBuffer() argument
100 if (bufferSize <= 0) { in InputStreamBuffer()
102 String.format("Buffer size %d must be positive.", bufferSize)); in InputStreamBuffer()
104 bufferSize = leastPowerOf2(bufferSize); in InputStreamBuffer()
105 mBuffer = new byte[bufferSize]; in InputStreamBuffer()
/frameworks/opt/bitmap/src/com/android/bitmap/util/
DInputStreamBuffer.java97 public InputStreamBuffer(final InputStream inputStream, int bufferSize, in InputStreamBuffer() argument
100 if (bufferSize <= 0) { in InputStreamBuffer()
102 String.format("Buffer size %d must be positive.", bufferSize)); in InputStreamBuffer()
104 bufferSize = leastPowerOf2(bufferSize); in InputStreamBuffer()
105 mBuffer = new byte[bufferSize]; in InputStreamBuffer()
/frameworks/native/libs/binder/
DBufferedTextOutput.cpp42 , bufferSize(0) in BufferState()
53 if ((len+bufferPos) > bufferSize) { in append()
59 bufferSize = newSize; in append()
69 if (bufferSize > 256) { in restart()
73 bufferSize = 256; in restart()
81 size_t bufferSize; member
/frameworks/base/core/tests/coretests/src/android/graphics/
DBitmapTest.java284 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithDirectByteBuffer() local
285 ByteBuffer directBuffer = ByteBuffer.allocateDirect(bufferSize); in testCopyWithDirectByteBuffer()
322 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithDirectShortBuffer() local
324 ByteBuffer.allocateDirect(bufferSize * bytesPerElement).asShortBuffer(); in testCopyWithDirectShortBuffer()
361 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithDirectIntBuffer() local
363 ByteBuffer.allocateDirect(bufferSize * bytesPerElement).asIntBuffer(); in testCopyWithDirectIntBuffer()
400 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithHeapByteBuffer() local
401 ByteBuffer heapBuffer = ByteBuffer.allocate(bufferSize); in testCopyWithHeapByteBuffer()
437 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithHeapShortBuffer() local
438 ShortBuffer heapBuffer = ShortBuffer.allocate(bufferSize); in testCopyWithHeapShortBuffer()
[all …]
/frameworks/av/media/mtp/
DMtpPacket.cpp31 MtpPacket::MtpPacket(int bufferSize) in MtpPacket() argument
33 mBufferSize(bufferSize), in MtpPacket()
34 mAllocationIncrement(bufferSize), in MtpPacket()
37 mBuffer = (uint8_t *)malloc(bufferSize); in MtpPacket()
/frameworks/base/core/jni/android/graphics/
DCreateJavaOutputStreamAdaptor.cpp181 size_t bufferSize = 4096; in adaptor_to_mem_stream() local
184 char* data = (char*)sk_malloc_throw(bufferSize); in adaptor_to_mem_stream()
187 bufferSize - streamLen)) != 0) { in adaptor_to_mem_stream()
189 if (streamLen == bufferSize) { in adaptor_to_mem_stream()
190 bufferSize *= 2; in adaptor_to_mem_stream()
191 data = (char*)sk_realloc_throw(data, bufferSize); in adaptor_to_mem_stream()
/frameworks/base/cmds/statsd/src/metrics/
DEventMetricProducer.cpp88 size_t bufferSize = protoOutput.size(); in serializeProtoLocked() local
90 std::unique_ptr<std::vector<uint8_t>> buffer(new std::vector<uint8_t>(bufferSize)); in serializeProtoLocked()
120 size_t bufferSize = mProto->size(); in onDumpReportLocked() local
122 (long long)mMetricId, bufferSize); in onDumpReportLocked()
/frameworks/av/media/libaaudio/src/fifo/
DFifoController.h33 FifoController(fifo_frames_t bufferSize, fifo_frames_t threshold) in FifoController() argument
34 : FifoControllerBase(bufferSize, threshold) in FifoController()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/testing/
DUtils.java33 public static void transferStreamedData(InputStream in, OutputStream out, int bufferSize) in transferStreamedData() argument
35 byte[] buffer = new byte[bufferSize]; in transferStreamedData()
/frameworks/av/media/libstagefright/flac/dec/
DFLACDecoder.cpp390 size_t bufferSize = blocksize * frameSize; in decodeOneFrame() local
391 if (bufferSize > *outBufferLen) { in decodeOneFrame()
393 *outBufferLen, bufferSize); in decodeOneFrame()
395 bufferSize = blocksize * frameSize; in decodeOneFrame()
414 *outBufferLen = bufferSize; in decodeOneFrame()
/frameworks/av/media/libmediaplayerservice/nuplayer/
DNuPlayerDecoderPassThrough.cpp318 int32_t bufferSize = buffer->size(); in onInputBufferFetched() local
319 mCachedBytes += bufferSize; in onInputBufferFetched()
328 onBufferConsumed(bufferSize); in onInputBufferFetched()
336 onBufferConsumed(bufferSize); in onInputBufferFetched()
342 reply->setInt32("size", bufferSize); in onInputBufferFetched()
/frameworks/base/libs/androidfw/include/androidfw/
DCursorWindow.h171 inline void* offsetToPtr(uint32_t offset, uint32_t bufferSize = 0) {
176 if (offset + bufferSize > mSize) {
178 offset + bufferSize, mSize);
/frameworks/av/drm/libdrmframework/plugins/passthru/src/
DDrmPassthruPlugIn.cpp95 const int bufferSize = licenseString.size(); in onProcessDrmInfo() local
97 data = new char[bufferSize]; in onProcessDrmInfo()
98 memcpy(data, licenseString.string(), bufferSize); in onProcessDrmInfo()
99 const DrmBuffer* buffer = new DrmBuffer(data, bufferSize); in onProcessDrmInfo()

12345