Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 158) sorted by relevance

1234567

/frameworks/base/voip/jni/rtp/
DAmrCodec.cpp102 unsigned char *bytes = (unsigned char *)payload; in encode() local
106 samples, bytes + 1, &type, AMR_TX_WMF); in encode()
113 bytes[0] = 0xF0; in encode()
114 bytes[1] = (mMode << 3) | 0x04; in encode()
118 bytes[0] = 0xFF; in encode()
119 bytes[1] = 0xC0 | (mMode << 1) | 1; in encode()
122 bytes[length + 1] = 0; in encode()
124 bytes[i] = (bytes[i] << 6) | (bytes[i + 1] >> 2); in encode()
133 unsigned char *bytes = (unsigned char *)payload; in decode() local
138 int request = bytes[0] >> 4; in decode()
[all …]
DGsmCodec.cpp62 unsigned char *bytes = (unsigned char *)payload; in decode() local
65 gsm_decode(mDecode, bytes, &samples[n]) == 0) { in decode()
68 bytes += 33; in decode()
/frameworks/rs/
DrsFifoSocket.cpp54 bool FifoSocket::writeAsync(const void *data, size_t bytes, bool waitForSpace) { in writeAsync() argument
55 if (bytes == 0) { in writeAsync()
59 size_t ret = ::send(sv[0], data, bytes, 0); in writeAsync()
60 rsAssert(ret == bytes); in writeAsync()
61 if (ret != bytes) { in writeAsync()
62 ALOGE("writeAsync %p %zu ret %zu", data, bytes, ret); in writeAsync()
78 size_t FifoSocket::read(void *data, size_t bytes) { in read() argument
84 size_t ret = ::recv(sv[1], data, bytes, MSG_WAITALL); in read()
85 rsAssert(ret == bytes || mShutdown); in read()
103 void FifoSocket::readReturn(const void *data, size_t bytes) { in readReturn() argument
[all …]
DrsThreadIO.cpp54 hdr->bytes = dataLen; in coreHeader()
139 mToCore.read(&buf[sizeof(CoreCmdHeader)], cmd->bytes); in playCoreCommands()
161 gPlaybackFuncs[cmd->cmdID](con, data, cmd->bytes); in playCoreCommands()
190 receiveLen[0] = mLastClientHeader.bytes; in getClientHeader()
199 receiveLen[0] = mLastClientHeader.bytes; in getClientPayload()
201 if (bufferLen < mLastClientHeader.bytes) { in getClientPayload()
216 hdr.bytes = dataLen; in sendToClient()
DrsFifo.h38 bool virtual writeAsync(const void *data, size_t bytes, bool waitForSpace = true) = 0;
40 size_t virtual read(void *data, size_t bytes, bool doWait = true, uint64_t timeToWait = 0) = 0;
41 void virtual readReturn(const void *data, size_t bytes) = 0;
DrsFifoSocket.h37 bool writeAsync(const void *data, size_t bytes, bool waitForSpace = true);
39 size_t read(void *data, size_t bytes);
40 void readReturn(const void *data, size_t bytes);
/frameworks/opt/mms/src/java/com/google/android/mms/pdu/
DQuotedPrintable.java39 public static final byte[] decodeQuotedPrintable(byte[] bytes) { in decodeQuotedPrintable() argument
40 if (bytes == null) { in decodeQuotedPrintable()
44 for (int i = 0; i < bytes.length; i++) { in decodeQuotedPrintable()
45 int b = bytes[i]; in decodeQuotedPrintable()
48 if('\r' == (char)bytes[i + 1] && in decodeQuotedPrintable()
49 '\n' == (char)bytes[i + 2]) { in decodeQuotedPrintable()
53 int u = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable()
54 int l = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable()
/frameworks/base/core/java/com/android/internal/util/
DCharSequences.java30 public static CharSequence forAsciiBytes(final byte[] bytes) { in forAsciiBytes() argument
33 return (char) bytes[index]; in forAsciiBytes()
37 return bytes.length; in forAsciiBytes()
41 return forAsciiBytes(bytes, start, end); in forAsciiBytes()
45 return new String(bytes); in forAsciiBytes()
61 public static CharSequence forAsciiBytes(final byte[] bytes,
63 validate(start, end, bytes.length);
66 return (char) bytes[index + start];
77 return forAsciiBytes(bytes, newStart, newEnd);
81 return new String(bytes, start, length());
DBitwiseInputStream.java96 int bytes = (bits >>> 3) + ((bits & 0x07) > 0 ? 1 : 0); // &7==%8 in readByteArray() local
97 byte[] arr = new byte[bytes]; in readByteArray()
98 for (int i = 0; i < bytes; i++) { in readByteArray()
/frameworks/support/renderscript/v8/rs_support/
DrsFifoSocket.cpp54 bool FifoSocket::writeAsync(const void *data, size_t bytes, bool waitForSpace) { in writeAsync() argument
55 if (bytes == 0) { in writeAsync()
59 size_t ret = ::send(sv[0], data, bytes, 0); in writeAsync()
61 rsAssert(ret == bytes); in writeAsync()
76 size_t FifoSocket::read(void *data, size_t bytes) { in read() argument
82 size_t ret = ::recv(sv[1], data, bytes, MSG_WAITALL); in read()
83 rsAssert(ret == bytes || mShutdown); in read()
101 void FifoSocket::readReturn(const void *data, size_t bytes) { in readReturn() argument
103 size_t ret = ::send(sv[1], data, bytes, 0); in readReturn()
DrsThreadIO.cpp54 hdr->bytes = dataLen; in coreHeader()
139 mToCore.read(&buf[sizeof(CoreCmdHeader)], cmd->bytes); in playCoreCommands()
161 gPlaybackFuncs[cmd->cmdID](con, data, cmd->bytes); in playCoreCommands()
190 receiveLen[0] = mLastClientHeader.bytes; in getClientHeader()
199 receiveLen[0] = mLastClientHeader.bytes; in getClientPayload()
201 if (bufferLen < mLastClientHeader.bytes) { in getClientPayload()
216 hdr.bytes = dataLen; in sendToClient()
DrsFifo.h38 bool virtual writeAsync(const void *data, size_t bytes, bool waitForSpace = true) = 0;
40 size_t virtual read(void *data, size_t bytes, bool doWait = true, uint64_t timeToWait = 0) = 0;
41 void virtual readReturn(const void *data, size_t bytes) = 0;
DrsFifoSocket.h37 bool writeAsync(const void *data, size_t bytes, bool waitForSpace = true);
39 size_t read(void *data, size_t bytes);
40 void readReturn(const void *data, size_t bytes);
/frameworks/base/core/java/com/android/internal/http/multipart/
DByteArrayPartSource.java50 private byte[] bytes; field in ByteArrayPartSource
58 public ByteArrayPartSource(String fileName, byte[] bytes) { in ByteArrayPartSource() argument
61 this.bytes = bytes; in ByteArrayPartSource()
69 return bytes.length; in getLength()
83 return new ByteArrayInputStream(bytes); in createInputStream()
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DCharSequencesTest.java29 byte[] bytes = s.getBytes(); in testCharSequences()
31 String copy = toString(forAsciiBytes(bytes)); in testCharSequences()
34 copy = toString(forAsciiBytes(bytes, 0, s.length())); in testCharSequences()
37 String crazy = toString(forAsciiBytes(bytes, 0, 5)); in testCharSequences()
40 String a = toString(forAsciiBytes(bytes, 0, 3).subSequence(2, 3)); in testCharSequences()
43 String empty = toString(forAsciiBytes(bytes, 0, 3).subSequence(3, 3)); in testCharSequences()
/frameworks/base/core/java/android/util/
DBase64InputStream.java103 long bytes = Math.min(n, outputEnd-outputStart); in skip() local
104 outputStart += bytes; in skip()
105 return bytes; in skip()
126 int bytes = Math.min(len, outputEnd-outputStart); in read() local
127 System.arraycopy(coder.output, outputStart, b, off, bytes); in read()
128 outputStart += bytes; in read()
129 return bytes; in read()
/frameworks/base/tests/CoreTests/android/core/
DSha1Test.java56 private static String encodeHex(byte[] bytes) { in encodeHex() argument
57 StringBuffer hex = new StringBuffer(bytes.length * 2); in encodeHex()
59 for (int i = 0; i < bytes.length; i++) { in encodeHex()
60 if (((int) bytes[i] & 0xff) < 0x10) { in encodeHex()
63 hex.append(Integer.toString((int) bytes[i] & 0xff, 16)); in encodeHex()
/frameworks/av/media/libstagefright/codecs/flac/enc/
DSoftFlacEncoder.cpp332 size_t bytes, unsigned samples, unsigned current_frame) { in onEncodedFlacAvailable() argument
334 bytes, samples, current_frame); in onEncodedFlacAvailable()
338 ALOGI(" saving %d bytes of header", bytes); in onEncodedFlacAvailable()
339 memcpy(mHeader + mHeaderOffset, buffer, bytes); in onEncodedFlacAvailable()
340 mHeaderOffset += bytes;// will contain header size when finished receiving header in onEncodedFlacAvailable()
349 ALOGV("ignoring %d bytes of header data (samples=%d)", bytes, samples); in onEncodedFlacAvailable()
370 ALOGV(" writing %d bytes of encoded data on output port", bytes); in onEncodedFlacAvailable()
371 if (bytes > outHeader->nAllocLen - outHeader->nOffset - outHeader->nFilledLen) { in onEncodedFlacAvailable()
372 ALOGE(" not enough space left to write encoded data, dropping %u bytes", bytes); in onEncodedFlacAvailable()
376 memcpy(outHeader->pBuffer + outHeader->nOffset, buffer, bytes); in onEncodedFlacAvailable()
[all …]
/frameworks/base/core/java/android/net/http/
DSslCertificate.java124 byte[] bytes = bundle.getByteArray(X509_CERTIFICATE); in restoreState()
125 if (bytes == null) { in restoreState()
130 Certificate cert = certFactory.generateCertificate(new ByteArrayInputStream(bytes)); in restoreState()
270 byte[] bytes = x509Certificate.getEncoded(); in getDigest()
272 byte[] digest = md.digest(bytes); in getDigest()
281 private static final String fingerprint(byte[] bytes) { in fingerprint() argument
282 if (bytes == null) { in fingerprint()
286 for (int i = 0; i < bytes.length; i++) { in fingerprint()
287 byte b = bytes[i]; in fingerprint()
289 if (i+1 != bytes.length) { in fingerprint()
/frameworks/av/drm/common/
DReadWriteUtils.cpp46 char* bytes = new char[length]; in readBytes() local
47 if (length == read(fd, (void*) bytes, length)) { in readBytes()
48 string.append(bytes, length); in readBytes()
50 delete bytes; in readBytes()
/frameworks/base/core/jni/
Dandroid_ddm_DdmHandleNativeHeap.cpp98 jbyte* bytes = NULL; in getLeakInfo() local
105 bytes = env->GetByteArrayElements(array, NULL); in getLeakInfo()
106 ptr = bytes; in getLeakInfo()
120 env->ReleaseByteArrayElements(array, bytes, 0); in getLeakInfo()
/frameworks/base/media/mca/filterfw/jni/
Djni_vertex_frame.cpp76 jbyte* bytes = env->GetByteArrayElements(data, NULL); in Java_android_filterfw_core_VertexFrame_setNativeData() local
77 if (bytes) { in Java_android_filterfw_core_VertexFrame_setNativeData()
78 const bool success = frame->WriteData(reinterpret_cast<const uint8_t*>(bytes + offset), in Java_android_filterfw_core_VertexFrame_setNativeData()
80 env->ReleaseByteArrayElements(data, bytes, JNI_ABORT); in Java_android_filterfw_core_VertexFrame_setNativeData()
/frameworks/base/docs/html/tools/sdk/
Dolder_releases.jd53 <td>260529085 bytes</td>
63 <td>247412515 bytes</td>
73 <td>238224860 bytes</td>
98 <td>191477853 bytes</td>
108 <td>183024673 bytes</td>
118 <td>178117561 bytes</td>
144 <td>86038515 bytes</td>
155 <td>79046151 bytes</td>
166 <td>79345522 bytes</td>
192 <td>98360564 bytes</td>
[all …]
/frameworks/base/docs/html/sdk/
Dolder_releases.jd53 <td>260529085 bytes</td>
63 <td>247412515 bytes</td>
73 <td>238224860 bytes</td>
98 <td>191477853 bytes</td>
108 <td>183024673 bytes</td>
118 <td>178117561 bytes</td>
144 <td>86038515 bytes</td>
155 <td>79046151 bytes</td>
166 <td>79345522 bytes</td>
192 <td>98360564 bytes</td>
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DLoggingPrintStreamTest.java159 byte[] bytes = expected.getBytes(); in testWriteWithOffsetsMultibyteCharacters()
161 while (i < bytes.length - 5) { in testWriteWithOffsetsMultibyteCharacters()
162 out.write(bytes, i, 5); in testWriteWithOffsetsMultibyteCharacters()
165 out.write(bytes, i, bytes.length - i); in testWriteWithOffsetsMultibyteCharacters()

1234567