/frameworks/av/media/codecs/mp3dec/src/ |
D | pvmp3_seek_synch.cpp | 140 pVars->inputStream.pBuffer = pExt->pInputBuffer; in pvmp3_frame_synch() 141 pVars->inputStream.usedBits = (pExt->inputBufferUsedLength << 3); // in bits in pvmp3_frame_synch() 144 pVars->inputStream.inputBufferCurrentLength = (pExt->inputBufferCurrentLength); // in bits in pvmp3_frame_synch() 146 err = pvmp3_header_sync(&pVars->inputStream); in pvmp3_frame_synch() 153 uint32 temp = getNbits(&pVars->inputStream, 21); in pvmp3_frame_synch() 155 pVars->inputStream.usedBits -= 21 + SYNC_WORD_LNGTH; in pvmp3_frame_synch() 193 if (numBytes > (int32)pVars->inputStream.inputBufferCurrentLength) in pvmp3_frame_synch() 199 else if (numBytes == (int32)pVars->inputStream.inputBufferCurrentLength) in pvmp3_frame_synch() 202 pExt->inputBufferUsedLength = pVars->inputStream.usedBits >> 3; in pvmp3_frame_synch() 208 int32 offset = pVars->inputStream.usedBits + ((numBytes) << 3); in pvmp3_frame_synch() [all …]
|
D | pvmp3_get_side_info.cpp | 115 ERROR_CODE pvmp3_get_side_info(tmp3Bits *inputStream, in pvmp3_get_side_info() argument 129 if (!bitsAvailable(inputStream, 14)) in pvmp3_get_side_info() 134 tmp = getbits_crc(inputStream, 14, crc, info->error_protection); in pvmp3_get_side_info() 140 if (!bitsAvailable(inputStream, 12)) in pvmp3_get_side_info() 145 tmp = getbits_crc(inputStream, 12, crc, info->error_protection); in pvmp3_get_side_info() 153 if (!bitsAvailable(inputStream, 4)) in pvmp3_get_side_info() 158 tmp = getbits_crc(inputStream, 4, crc, info->error_protection); in pvmp3_get_side_info() 169 if (!bitsAvailable(inputStream, 34)) in pvmp3_get_side_info() 174 … si->ch[ch].gran[gr].part2_3_length = getbits_crc(inputStream, 12, crc, info->error_protection); in pvmp3_get_side_info() 175 tmp = getbits_crc(inputStream, 22, crc, info->error_protection); in pvmp3_get_side_info() [all …]
|
D | pvmp3_decode_header.cpp | 115 ERROR_CODE pvmp3_decode_header(tmp3Bits *inputStream, in pvmp3_decode_header() argument 128 if (inputStream->inputBufferCurrentLength < ((SYNC_WORD_LNGTH + 21) >> 3)) in pvmp3_decode_header() 136 temp = getUpTo17bits(inputStream, SYNC_WORD_LNGTH); in pvmp3_decode_header() 139 err = pvmp3_header_sync(inputStream); in pvmp3_decode_header() 147 temp = getNbits(inputStream, 21); // to avoid multiple bitstream accesses in pvmp3_decode_header()
|
D | pvmp3_framedecoder.cpp | 173 pVars->inputStream.pBuffer = pExt->pInputBuffer; in pvmp3_framedecoder() 176 pVars->inputStream.usedBits = pExt->inputBufferUsedLength << 3; in pvmp3_framedecoder() 177 pVars->inputStream.inputBufferCurrentLength = pExt->inputBufferCurrentLength; in pvmp3_framedecoder() 180 errorCode = pvmp3_decode_header(&pVars->inputStream, in pvmp3_framedecoder() 222 if (!bitsAvailable(&pVars->inputStream, 16)) in pvmp3_framedecoder() 230 sent_crc = getUpTo17bits(&pVars->inputStream, 16); in pvmp3_framedecoder() 247 errorCode = pvmp3_get_side_info(&pVars->inputStream, in pvmp3_framedecoder() 287 if ((uint32)pVars->predicted_frame_size > pVars->inputStream.inputBufferCurrentLength) in pvmp3_framedecoder() 515 ancillary_data_lenght -= pVars->inputStream.usedBits; in pvmp3_framedecoder() 520 pVars->inputStream.usedBits += ancillary_data_lenght; in pvmp3_framedecoder() [all …]
|
D | pvmp3_getbits.h | 107 static inline bool bitsAvailable(tmp3Bits *inputStream, uint32 neededBits) in bitsAvailable() argument 109 return (inputStream->inputBufferCurrentLength << 3) >= (neededBits + inputStream->usedBits); in bitsAvailable()
|
D | pvmp3_crc.cpp | 123 uint32 getbits_crc(tmp3Bits *inputStream, /* bit stream structure */ in getbits_crc() argument 128 uint32 bits = getNbits(inputStream, neededBits); in getbits_crc()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/parser/ |
D | BinaryFileOperationsTest.java | 56 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(stringBytes)); in testGetStringValue() local 58 String resultString = getStringValue(inputStream); in testGetStringValue() 70 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetHashedStringValue() local 72 String resultString = getStringValue(inputStream); in testGetHashedStringValue() 82 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetStringValue_withSizeAndHashingInfo() local 84 String resultString = getStringValue(inputStream, in testGetStringValue_withSizeAndHashingInfo() 94 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetIntValue() local 96 assertThat(getIntValue(inputStream)).isEqualTo(randomValue); in testGetIntValue() 103 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetBooleanValue_true() local 105 assertThat(getBooleanValue(inputStream)).isEqualTo(true); in testGetBooleanValue_true() [all …]
|
D | RuleIndexingControllerTest.java | 49 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect() local 51 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect() 71 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates() local 73 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates() 94 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock() local 96 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock() 116 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues() local 118 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues() 148 InputStream inputStream = new ByteArrayInputStream(rule.array()); in verifyIndexRangeSearchIsCorrect_noIndexesAvailable() local 150 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_noIndexesAvailable() [all …]
|
/frameworks/libs/service_entitlement/tests/src/com/android/libraries/entitlement/utils/ |
D | StreamUtilsTest.java | 42 InputStream inputStream = new ByteArrayInputStream(expectedString.getBytes(UTF_8)); in inputStreamToString() local 44 String resultString = StreamUtils.inputStreamToString(inputStream); in inputStreamToString() 56 InputStream inputStream = mock(InputStream.class); in inputStreamToString_readThrowsIOException_shouldThrowException() local 57 when(inputStream.read(any())).thenThrow(new IOException()); in inputStreamToString_readThrowsIOException_shouldThrowException() 59 assertThrows(IOException.class, () -> StreamUtils.inputStreamToString(inputStream)); in inputStreamToString_readThrowsIOException_shouldThrowException() 65 InputStream inputStream = new ByteArrayInputStream(expectedString.getBytes(UTF_8)); in inputStreamToStringSafe() local 67 String resultString = StreamUtils.inputStreamToStringSafe(inputStream); in inputStreamToStringSafe() 81 InputStream inputStream = mock(InputStream.class); in inputStreamToStringSafe_readThrowsIOException_shouldReturnEmpty() local 82 when(inputStream.read(any())).thenThrow(new IOException()); in inputStreamToStringSafe_readThrowsIOException_shouldReturnEmpty() 84 String resultString = StreamUtils.inputStreamToStringSafe(inputStream); in inputStreamToStringSafe_readThrowsIOException_shouldReturnEmpty()
|
/frameworks/base/services/core/java/com/android/server/ |
D | PersistentDataBlockService.java | 250 private int getTotalDataSizeLocked(DataInputStream inputStream) throws IOException { in getTotalDataSizeLocked() argument 252 inputStream.skipBytes(DIGEST_SIZE_BYTES); in getTotalDataSizeLocked() 255 int blockId = inputStream.readInt(); in getTotalDataSizeLocked() 257 totalDataSize = inputStream.readInt(); in getTotalDataSizeLocked() 333 DataInputStream inputStream; in computeDigestLocked() local 335 inputStream = new DataInputStream(new FileInputStream(new File(mDataBlockFile))); in computeDigestLocked() 347 IoUtils.closeQuietly(inputStream); in computeDigestLocked() 353 inputStream.read(storedDigest); in computeDigestLocked() 355 inputStream.skipBytes(DIGEST_SIZE_BYTES); in computeDigestLocked() 361 while ((read = inputStream.read(data)) != -1) { in computeDigestLocked() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/restore/ |
D | PerformAdbRestoreTaskTest.java | 53 InputStream inputStream = mContext.getResources().openRawResource( in parseBackupFileAndReturnTarStream_backupNotEncrypted_returnsNonNull() local 56 inputStream, null); in parseBackupFileAndReturnTarStream_backupNotEncrypted_returnsNonNull() 65 InputStream inputStream = mContext.getResources().openRawResource( in parseBackupFileAndReturnTarStream_backupEncryptedAndPasswordProvided_returnsNonNull() local 68 inputStream, "123"); in parseBackupFileAndReturnTarStream_backupEncryptedAndPasswordProvided_returnsNonNull() 77 InputStream inputStream = mContext.getResources().openRawResource( in parseBackupFileAndReturnTarStream_backupEncryptedAndPasswordNotProvided_returnsNull() local 80 inputStream, null); in parseBackupFileAndReturnTarStream_backupEncryptedAndPasswordNotProvided_returnsNull() 89 InputStream inputStream = mContext.getResources().openRawResource( in parseBackupFileAndReturnTarStream_backupEncryptedAndIncorrectPassword_returnsNull() local 92 inputStream, "1234"); in parseBackupFileAndReturnTarStream_backupEncryptedAndIncorrectPassword_returnsNull()
|
/frameworks/libs/service_entitlement/java/com/android/libraries/entitlement/utils/ |
D | StreamUtils.java | 35 public static String inputStreamToString(@Nullable InputStream inputStream) throws IOException { in inputStreamToString() argument 36 if (inputStream == null) { in inputStreamToString() 39 try (BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream); in inputStreamToString() 43 while ((length = inputStream.read(buffer)) != -1) { in inputStreamToString() 51 public static String inputStreamToStringSafe(@Nullable InputStream inputStream) { in inputStreamToStringSafe() argument 53 return inputStreamToString(inputStream); in inputStreamToStringSafe()
|
/frameworks/opt/vcard/tests/src/com/android/vcard/tests/ |
D | VCardParserTests.java | 94 InputStream inputStream = getContext().getResources().openRawResource(R.raw.v21_simple_1); in testSimple() local 104 parser.parse(inputStream); in testSimple() 107 inputStream.close(); in testSimple() 112 InputStream inputStream = getContext().getResources().openRawResource(R.raw.v21_nest); in testNest() local 132 parser.parse(inputStream); in testNest() 135 inputStream.close(); in testNest() 146 …InputStream inputStream = getContext().getResources().openRawResource(R.raw.v30_ios_613_multiline); in testIosMultiline() local 164 parser.parse(inputStream); in testIosMultiline() 167 inputStream.close(); in testIosMultiline() 177 InputStream inputStream = in testParseOne() local [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/ |
D | TarBackupReaderTest.java | 104 InputStream inputStream = mContext.getResources().openRawResource( in readTarHeaders_backupEncrypted_correctlyParsesFileMetadata() local 107 inputStream, "123"); in readTarHeaders_backupEncrypted_correctlyParsesFileMetadata() 121 InputStream inputStream = mContext.getResources().openRawResource( in readTarHeaders_backupNotEncrypted_correctlyParsesFileMetadata() local 124 inputStream, null); in readTarHeaders_backupNotEncrypted_correctlyParsesFileMetadata() 139 InputStream inputStream = mContext.getResources().openRawResource( in readTarHeaders_backupNotEncrypted_correctlyReadsPaxHeader() local 142 inputStream, null); in readTarHeaders_backupNotEncrypted_correctlyReadsPaxHeader() 178 InputStream inputStream = mContext.getResources().openRawResource( in readAppManifest_backupEncrypted_correctlyParsesAppManifest() local 181 inputStream, "123"); in readAppManifest_backupEncrypted_correctlyParsesAppManifest() 199 InputStream inputStream = mContext.getResources().openRawResource( in readAppManifest_backupNotEncrypted_correctlyParsesAppManifest() local 202 inputStream, null); in readAppManifest_backupNotEncrypted_correctlyParsesAppManifest() [all …]
|
/frameworks/av/media/libstagefright/tests/writer/ |
D | WriterUtility.cpp | 25 int32_t sendBuffersToWriter(ifstream &inputStream, vector<BufferInfo> &bufferInfo, in sendBuffersToWriter() argument 44 inputStream.read(data, size); in sendBuffersToWriter() 45 CHECK_EQ(inputStream.gcount(), size); in sendBuffersToWriter() 83 int32_t writeHeaderBuffers(ifstream &inputStream, vector<BufferInfo> &bufferInfo, in writeHeaderBuffers() argument 95 inputStream.read(data, size); in writeHeaderBuffers() 96 CHECK_EQ(inputStream.gcount(), size); in writeHeaderBuffers()
|
/frameworks/av/media/libaaudio/examples/loopback/src/ |
D | loopback.cpp | 85 AAudioStream *inputStream = nullptr; member 156 framesRead = AAudioStream_read(myData->inputStream, myData->inputShortData, in readFormattedData() 160 framesRead = AAudioStream_read(myData->inputStream, myData->inputFloatData, in readFormattedData() 247 int64_t inputFramesWritten = AAudioStream_getFramesWritten(myData->inputStream); in MyDataCallbackProc() 248 int64_t inputFramesRead = AAudioStream_getFramesRead(myData->inputStream); in MyDataCallbackProc() 421 AAudioStream *inputStream = nullptr; in main() local 581 inputStream = loopbackData.inputStream = recorder.getStream(); in main() 584 int32_t actualCapacity = AAudioStream_getBufferCapacityInFrames(inputStream); in main() 585 (void) AAudioStream_setBufferSizeInFrames(inputStream, actualCapacity); in main() 606 argParser.compareWithStream(inputStream); in main() [all …]
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/cdc/ |
D | ContentDefinedChunkerTest.java | 123 ByteArrayInputStream inputStream = new ByteArrayInputStream(input); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries() local 126 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries() 138 ByteArrayInputStream inputStream = new ByteArrayInputStream(input); in chunkify_withSmallChunks_combinesChunksUntilMinSize() local 141 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withSmallChunks_combinesChunksUntilMinSize() 154 ByteArrayInputStream inputStream = new ByteArrayInputStream(largeInput); in chunkify_doesNotProduceChunksLargerThanMaxSize() local 157 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_doesNotProduceChunksLargerThanMaxSize() 200 ByteArrayInputStream inputStream = new ByteArrayInputStream(new byte[] {1}); in chunkify_whenConsumerThrowsException_rethrowsException() local 206 inputStream, in chunkify_whenConsumerThrowsException_rethrowsException()
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/testing/ |
D | DiffScriptProcessor.java | 136 private static Optional<String> readCommand(InputStream inputStream) throws IOException { in readCommand() argument 140 while (!isEndOfCommand(b = inputStream.read())) { in readCommand() 169 private static long copyBytes(InputStream inputStream, OutputStream outputStream, long n) in copyBytes() argument 174 long read = copyBlock(inputStream, outputStream, buffer, COPY_BUFFER_SIZE); in copyBytes() 180 copied += copyBlock(inputStream, outputStream, buffer, (int) (n - copied)); in copyBytes() 186 InputStream inputStream, OutputStream outputStream, byte[] buffer, int size) in copyBlock() argument 188 int read = inputStream.read(buffer, 0, size); in copyBlock()
|
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/automation/ |
D | FrameTimingStats.java | 68 public FrameTimingStats(DataInputStream inputStream) throws IOException { in FrameTimingStats() argument 70 update(inputStream); in FrameTimingStats() 73 public void update(DataInputStream inputStream) throws IOException { in update() argument 75 mStats[i] = inputStream.readLong(); in update()
|
/frameworks/base/services/core/java/com/android/server/integrity/parser/ |
D | RuleBinaryParser.java | 86 BitInputStream inputStream = in parseAllRules() local 88 while (inputStream.hasNext()) { in parseAllRules() 89 if (inputStream.getNext(SIGNAL_BIT) == 1) { in parseAllRules() 90 parsedRules.add(parseRule(inputStream)); in parseAllRules() 105 BitInputStream inputStream = in parseIndexedRules() local 113 while (inputStream.hasNext()) { in parseIndexedRules() 114 if (inputStream.getNext(SIGNAL_BIT) == 1) { in parseIndexedRules() 115 parsedRules.add(parseRule(inputStream)); in parseIndexedRules()
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/tasks/ |
D | EncryptedFullBackupTask.java | 86 InputStream inputStream) in newInstance() argument 94 inputStream, in newInstance() 110 inputStream, in newInstance() 120 InputStream inputStream, in EncryptedFullBackupTask() argument 125 mInputStream = inputStream; in EncryptedFullBackupTask()
|
/frameworks/base/services/backup/java/com/android/server/backup/ |
D | KeyValueAdbRestoreEngine.java | 106 FileInputStream inputStream = null; in sortKeyValueData() local 109 inputStream = new FileInputStream(restoreData); in sortKeyValueData() 111 BackupDataInput reader = new BackupDataInput(inputStream.getFD()); in sortKeyValueData() 115 if (inputStream != null) { in sortKeyValueData() 116 IoUtils.closeQuietly(inputStream); in sortKeyValueData()
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/wear/ |
D | InstallTask.java | 136 InputStream inputStream = null; in writeToOutputStreamFromAsset() local 140 inputStream = new ParcelFileDescriptor.AutoCloseInputStream(mParcelFileDescriptor); in writeToOutputStreamFromAsset() 142 while ((bytesRead = inputStream.read(inputBuf)) > -1) { in writeToOutputStreamFromAsset() 154 safeClose(inputStream); in writeToOutputStreamFromAsset()
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/chunking/cdc/ |
D | ContentDefinedChunker.java | 79 public void chunkify(InputStream inputStream, ChunkConsumer chunkConsumer) in chunkify() argument 87 inputStream.read(mChunkBuffer, /*off=*/ 0, /*len=*/ initialReadLength)) in chunkify() 92 while ((b = inputStream.read()) != -1) { in chunkify()
|
/frameworks/base/services/core/java/com/android/server/integrity/model/ |
D | BitInputStream.java | 35 public BitInputStream(InputStream inputStream) { in BitInputStream() argument 36 mInputStream = inputStream; in BitInputStream()
|