/frameworks/base/telecomm/java/android/telecom/ |
H A D | CallAudioState.java | 152 StringBuffer buffer = new StringBuffer(); 154 listAppend(buffer, "EARPIECE"); 157 listAppend(buffer, "BLUETOOTH"); 160 listAppend(buffer, "WIRED_HEADSET"); 163 listAppend(buffer, "SPEAKER"); 166 return buffer.toString(); 207 private static void listAppend(StringBuffer buffer, String str) { argument 208 if (buffer.length() > 0) { 209 buffer.append(", "); 211 buffer [all...] |
/frameworks/native/libs/vr/libpdx/private/pdx/rpc/ |
H A D | buffer_wrapper.h | 32 BufferWrapper(pointer buffer, size_type capacity, size_type size) argument 33 : buffer_(&buffer[0]), 37 BufferWrapper(pointer buffer, size_type size) argument 38 : BufferWrapper(buffer, size, size) {} 113 BufferWrapper(const BufferType& buffer) : buffer_(buffer) {} argument 114 BufferWrapper(const BufferType& buffer, const Allocator& allocator) argument 115 : buffer_(buffer, allocator) {} 116 BufferWrapper(BufferType&& buffer) : buffer_(std::move(buffer)) {} argument 117 BufferWrapper(BufferType&& buffer, const Allocator& allocator) argument 142 BufferType& buffer() { return buffer_; } function in class:android::pdx::rpc::BufferWrapper 143 const BufferType& buffer() const { return buffer_; } function in class:android::pdx::rpc::BufferWrapper 150 WrapBuffer(T* buffer, SizeType size) argument 155 WrapBuffer(void* buffer, SizeType size) argument 160 WrapBuffer(const void* buffer, SizeType size) argument 167 WrapBuffer( std::vector<T, Allocator>&& buffer) argument [all...] |
/frameworks/base/core/java/com/android/internal/util/ |
H A D | LineBreakBufferedWriter.java | 33 * A buffer to collect data until the buffer size is reached. 38 private char[] buffer; field in class:LineBreakBufferedWriter 41 * The index of the first free element in the buffer. 46 * The chunk size (=maximum buffer size) to use for this writer. 52 * Index of the last newline character discovered in the buffer. The writer will try 63 * Create a new linebreak-aware buffered writer with the given output and buffer 66 * @param bufferSize The maximum buffer size. 69 this(out, bufferSize, 16); // 16 is the default size of a StringBuilder buffer. 73 * Create a new linebreak-aware buffered writer with the given output, buffer [all...] |
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ |
H A D | RoamingConsortiumElementTest.java | 105 * Verify that no exception will be thrown when parsing an empty buffer and the returned 117 * Verify that BufferUnderflowException will be thrown when parsing a truncated buffer 124 ByteBuffer buffer = ByteBuffer.wrap(getDefaultTestData()); 125 buffer.limit(buffer.remaining() - 1); 126 RoamingConsortiumElement.parse(buffer); 130 * Verify that an expected RoamingConsortiumElement will be returned when parsing a buffer 140 ByteBuffer buffer = ByteBuffer.wrap(getDefaultTestData()); 141 assertEquals(expectedElement, RoamingConsortiumElement.parse(buffer)); 145 * Verify that ProtocolException will be thrown when parsing a buffer containe [all...] |
H A D | I18NameTest.java | 70 * Helper function for returning a buffer containing a I18Name test data. 79 ByteBuffer buffer = ByteBuffer.allocate(data.length + 1); 80 buffer.put((byte) length); 81 buffer.put(data); 82 buffer.position(0); 83 return buffer; 87 * Verify that BufferUnderflowException will be thrown when parsing from an empty buffer. 98 * than the actual buffer size. 105 ByteBuffer buffer = getTestBuffer(data, data.length); 106 buffer [all...] |
H A D | NAIRealmElementTest.java | 41 * @param dataCount The number of NAI Realm Data to be added to the buffer 47 ByteBuffer buffer = ByteBuffer.allocate(dataLength + 2).order(ByteOrder.LITTLE_ENDIAN); 48 buffer.putShort((short) dataCount); 50 buffer.put(NAIRealmDataTestUtil.TEST_REAML_WITH_UTF8_DATA_BYTES); 52 buffer.position(0); 53 return buffer; 58 * from an empty buffer. 69 * Verify that an expected NAIRealmElement will be returned when parsing a buffer containing 85 * Verify that an expected NAIRealmElement will be returned when parsing a buffer containing
|
/frameworks/av/cmds/stagefright/ |
H A D | SineSource.cpp | 65 MediaBuffer *buffer; local 66 status_t err = mGroup->acquire_buffer(&buffer); 73 size_t numFramesPerBuffer = buffer->size() / frameSize; 75 int16_t *ptr = (int16_t *)buffer->data(); 91 buffer->meta_data()->setInt64( 96 buffer->set_range(0, numFramesPerBuffer * frameSize); 98 *out = buffer;
|
/frameworks/base/core/java/android/util/ |
H A D | Base64OutputStream.java | 31 private byte[] buffer = null; field in class:Base64OutputStream 72 // bytes, we buffer up calls to write(int) in an internal 76 if (buffer == null) { 77 buffer = new byte[1024]; 79 if (bpos >= buffer.length) { 80 // internal buffer full; write it out. 81 internalWrite(buffer, 0, bpos, false); 84 buffer[bpos++] = (byte) b; 93 internalWrite(buffer, 0, bpos, false);
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
H A D | HwBitmapInCompositeShader.cpp | 42 sp<GraphicBuffer> buffer = new GraphicBuffer(400, 200, PIXEL_FORMAT_RGBA_8888, usage); variable 45 buffer->lock(GraphicBuffer::USAGE_SW_WRITE_RARELY, ((void**)&pixels)); 46 size_t size = bytesPerPixel(buffer->getPixelFormat()) * buffer->getStride() 47 * buffer->getHeight(); 55 buffer->unlock(); 56 sk_sp<Bitmap> hardwareBitmap(Bitmap::createFrom(buffer));
|
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/ |
H A D | EffectDescriptor.cpp | 28 char buffer[SIZE]; local 31 snprintf(buffer, SIZE, " I/O: %d\n", mIo); 32 result.append(buffer); 33 snprintf(buffer, SIZE, " Strategy: %d\n", mStrategy); 34 result.append(buffer); 35 snprintf(buffer, SIZE, " Session: %d\n", mSession); 36 result.append(buffer); 37 snprintf(buffer, SIZE, " Name: %s\n", mDesc.name); 38 result.append(buffer); 39 snprintf(buffer, SIZ 180 char buffer[SIZE]; local [all...] |
H A D | AudioSession.cpp | 142 char buffer[SIZE]; local 145 snprintf(buffer, SIZE, "%*sAudio session %d:\n", spaces, "", index+1); 146 result.append(buffer); 147 snprintf(buffer, SIZE, "%*s- session: %2d\n", spaces, "", mSession); 148 result.append(buffer); 149 snprintf(buffer, SIZE, "%*s- owner uid: %2d\n", spaces, "", mUid); 150 result.append(buffer); 151 snprintf(buffer, SIZE, "%*s- input source: %d\n", spaces, "", mInputSource); 152 result.append(buffer); 153 snprintf(buffer, SIZ 285 char buffer[SIZE]; local [all...] |
/frameworks/av/media/libstagefright/ |
H A D | MPEG2TSWriter.cpp | 88 void appendAACFrames(MediaBuffer *buffer); 89 void appendAVCFrame(MediaBuffer *buffer); 158 // Codec specific data better be in the first data buffer. 247 notify->setBuffer("buffer", out); 252 void MPEG2TSWriter::SourceInfo::appendAVCFrame(MediaBuffer *buffer) { argument 256 if (mBuffer == NULL || buffer->range_length() > mBuffer->capacity()) { 257 mBuffer = new ABuffer(buffer->range_length()); 262 (const uint8_t *)buffer->data() 263 + buffer->range_offset(), 264 buffer 282 appendAACFrames(MediaBuffer *buffer) argument 371 MediaBuffer *buffer; local 582 sp<ABuffer> buffer = source->lastAccessUnit(); local 592 sp<ABuffer> buffer; local 701 sp<ABuffer> buffer = new ABuffer(188); local 758 sp<ABuffer> buffer = new ABuffer(188); local 829 sp<ABuffer> buffer = new ABuffer(188); local [all...] |
H A D | SkipCutBuffer.cpp | 59 void SkipCutBuffer::submit(MediaBuffer *buffer) { argument 65 int32_t offset = buffer->range_offset(); 66 int32_t buflen = buffer->range_length(); 68 // drop the initial data from the buffer if needed 74 buffer->set_range(offset, buflen); 80 char *src = ((char*) buffer->data()) + offset; 86 char *dst = (char*) buffer->data(); 87 size_t copied = read(dst, buffer->size()); 88 buffer->set_range(0, copied); 92 void SkipCutBuffer::submitInternal(const sp<T>& buffer) { argument 124 submit(const sp<ABuffer>& buffer) argument 128 submit(const sp<MediaCodecBuffer>& buffer) argument [all...] |
/frameworks/av/media/libstagefright/mpeg2ts/ |
H A D | AnotherPacketSource.cpp | 101 sp<ABuffer> buffer = *it; local 103 if (!buffer->meta()->findInt32("discontinuity", &discontinuity)) { 105 if (buffer->meta()->findObject("format", &object)) { 116 status_t AnotherPacketSource::dequeueAccessUnit(sp<ABuffer> *buffer) { argument 117 buffer->clear(); 125 *buffer = *mBuffers.begin(); 129 if ((*buffer)->meta()->findInt32("discontinuity", &discontinuity)) { 143 mLatestDequeuedMeta = (*buffer)->meta()->dup(); 150 if ((*buffer)->meta()->findObject("format", &object)) { 160 void AnotherPacketSource::requeueAccessUnit(const sp<ABuffer> &buffer) { argument 177 const sp<ABuffer> buffer = *mBuffers.begin(); local 274 queueAccessUnit(const sp<ABuffer> &buffer) argument 386 sp<ABuffer> buffer = new ABuffer(0); local 476 const sp<ABuffer> &buffer = *it; local 499 sp<ABuffer> buffer = *mBuffers.begin(); local 543 const sp<ABuffer> &buffer = *it; local 591 const sp<ABuffer> &buffer = *it; local 647 const sp<ABuffer> &buffer = *it; local [all...] |
/frameworks/av/media/libstagefright/tests/ |
H A D | DummyRecorder.cpp | 78 MediaBuffer *buffer; local 80 while (mStarted && (err = mSource->read(&buffer)) == OK){ 81 // if not getting a valid buffer from source, then exit 82 if (buffer == NULL) { 85 buffer->release(); 86 buffer = NULL;
|
/frameworks/base/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/ |
H A D | BluetoothPacketDecoder.java | 25 * This is an abstract base class that decodes a packet buffer and passes it to a 44 public void decodePacket(byte[] buffer, MidiReceiver receiver) { argument 49 int length = buffer.length; 58 byte header = buffer[0]; 73 for (int i = 1; i < buffer.length; i++) { 74 byte b = buffer[i];
|
/frameworks/base/services/net/java/android/net/dhcp/ |
H A D | DhcpNakPacket.java | 58 void finishPacket(ByteBuffer buffer) { argument 59 addTlv(buffer, DHCP_MESSAGE_TYPE, DHCP_MESSAGE_TYPE_NAK); 60 addTlv(buffer, DHCP_SERVER_IDENTIFIER, mServerIdentifier); 61 addTlv(buffer, DHCP_MESSAGE, mMessage); 62 addTlvEnd(buffer);
|
/frameworks/base/services/net/java/android/net/netlink/ |
H A D | NetlinkConstants.java | 62 public static String hexify(ByteBuffer buffer) { argument 63 if (buffer == null) { return "(null)"; } 65 buffer.array(), buffer.position(), buffer.remaining());
|
/frameworks/base/libs/hwui/ |
H A D | PathTessellator.cpp | 24 i, buffer[i].x, buffer[i].y, buffer[i].alpha); \ 28 ALOGD("point %d at %f %f", i, buffer[i].x, buffer[i].y); \ 185 Vertex* buffer = vertexBuffer.alloc<Vertex>(perimeter.size()); local 193 buffer[currentIndex++] = perimeter[srcAindex]; 195 buffer[currentIndex++] = perimeter[srcBindex]; 210 Vertex* buffer = vertexBuffer.alloc<Vertex>(perimeter.size() * 2 + 2); local 225 Vertex::set(&buffer[currentInde 244 storeBeginEnd(const PaintInfo& paintInfo, const Vertex& center, const Vector2& normal, Vertex* buffer, int& currentIndex, bool begin) argument 270 Vertex* buffer = vertexBuffer.alloc<Vertex>(allocSize); local 349 AlphaVertex* buffer = vertexBuffer.alloc<AlphaVertex>(perimeter.size() * 3 + 2); local 406 storeCapAA(const PaintInfo& paintInfo, const std::vector<Vertex>& vertices, AlphaVertex* buffer, bool isFirst, Vector2 normal, int offset) argument 582 AlphaVertex* buffer = vertexBuffer.alloc<AlphaVertex>(allocSize); local 652 AlphaVertex* buffer = vertexBuffer.alloc<AlphaVertex>(6 * perimeter.size() + 8); local [all...] |
/frameworks/av/include/media/stagefright/ |
H A D | MediaAdapter.h | 43 MediaBuffer **buffer, const ReadOptions *options = NULL); 49 virtual void signalBufferReturned(MediaBuffer *buffer); 56 // deep copy, such that after pushBuffer return, the buffer can be re-used. 57 status_t pushBuffer(MediaBuffer *buffer); 61 // Make sure the read() wait for the incoming buffer. 63 // Make sure the pushBuffer() wait for the current buffer consumed.
|
H A D | MediaBufferGroup.h | 34 // create a media buffer group with preallocated buffers 39 void add_buffer(MediaBuffer *buffer); 43 // If nonBlocking is false, it blocks until a buffer is available and 44 // passes it to the caller in *buffer, while returning OK. 45 // The returned buffer will have a reference count of 1. 46 // If nonBlocking is true and a buffer is not immediately available, 47 // buffer is set to NULL and it returns WOULD_BLOCK. 49 // If requestedSize is > 0, the returned MediaBuffer should have buffer 52 MediaBuffer **buffer, bool nonBlocking = false, size_t requestedSize = 0); 56 // If buffer i [all...] |
/frameworks/av/media/libaaudio/src/client/ |
H A D | AudioStreamInternalCapture.h | 35 aaudio_result_t read(void *buffer, 56 aaudio_result_t processDataNow(void *buffer, 64 * @param buffer 68 aaudio_result_t readNowWithConversion(void *buffer, int32_t numFrames);
|
H A D | AudioStreamInternalPlay.h | 36 aaudio_result_t write(const void *buffer, 57 aaudio_result_t processDataNow(void *buffer, 64 * @param buffer 68 aaudio_result_t writeNowWithConversion(const void *buffer,
|
/frameworks/av/media/libstagefright/foundation/include/ |
H A D | MediaAdapter.h | 43 MediaBuffer **buffer, const ReadOptions *options = NULL); 49 virtual void signalBufferReturned(MediaBuffer *buffer); 56 // deep copy, such that after pushBuffer return, the buffer can be re-used. 57 status_t pushBuffer(MediaBuffer *buffer); 61 // Make sure the read() wait for the incoming buffer. 63 // Make sure the pushBuffer() wait for the current buffer consumed.
|
H A D | MediaBufferGroup.h | 34 // create a media buffer group with preallocated buffers 39 void add_buffer(MediaBuffer *buffer); 43 // If nonBlocking is false, it blocks until a buffer is available and 44 // passes it to the caller in *buffer, while returning OK. 45 // The returned buffer will have a reference count of 1. 46 // If nonBlocking is true and a buffer is not immediately available, 47 // buffer is set to NULL and it returns WOULD_BLOCK. 49 // If requestedSize is > 0, the returned MediaBuffer should have buffer 52 MediaBuffer **buffer, bool nonBlocking = false, size_t requestedSize = 0); 56 // If buffer i [all...] |