/frameworks/av/media/module/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_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_framedecoder.cpp | 363 pVars->inputStream.pBuffer = pExt->pInputBuffer; in pvmp3_framedecoder() 366 pVars->inputStream.usedBits = pExt->inputBufferUsedLength << 3; in pvmp3_framedecoder() 367 pVars->inputStream.inputBufferCurrentLength = pExt->inputBufferCurrentLength; in pvmp3_framedecoder() 370 errorCode = pvmp3_decode_header(&pVars->inputStream, in pvmp3_framedecoder() 412 if (!bitsAvailable(&pVars->inputStream, 16)) in pvmp3_framedecoder() 420 sent_crc = getUpTo17bits(&pVars->inputStream, 16); in pvmp3_framedecoder() 437 errorCode = pvmp3_get_side_info(&pVars->inputStream, in pvmp3_framedecoder() 477 if ((uint32)pVars->predicted_frame_size > pVars->inputStream.inputBufferCurrentLength) in pvmp3_framedecoder() 705 ancillary_data_lenght -= pVars->inputStream.usedBits; in pvmp3_framedecoder() 710 pVars->inputStream.usedBits += ancillary_data_lenght; in pvmp3_framedecoder() [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/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() 72 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates() local 74 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates() 96 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock() local 98 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock() 119 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues() local 121 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues() 152 InputStream inputStream = new ByteArrayInputStream(rule.array()); in verifyIndexRangeSearchIsCorrect_noIndexesAvailable() local 154 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_noIndexesAvailable() [all …]
|
/frameworks/av/services/audioflinger/datapath/ |
D | AudioHwDevice.cpp | 105 auto inputStream = new AudioStreamIn(this, flags); in openInputStream() local 110 status_t status = inputStream->open(handle, deviceType, config, address, source, outputDevice, in openInputStream() 123 status = inputStream->open(handle, deviceType, config, address, source, in openInputStream() 127 delete inputStream; in openInputStream() 128 inputStream = nullptr; in openInputStream() 131 delete inputStream; in openInputStream() 132 inputStream = nullptr; in openInputStream() 146 inputStream = new SpdifStreamIn(this, flags, originalConfig.format); in openInputStream() 147 status = inputStream->open(handle, deviceType, &originalConfig, address, source, in openInputStream() 152 delete inputStream; in openInputStream() [all …]
|
/frameworks/base/services/tests/mockingservicestests/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/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/ |
D | BackupCodec.kt | 54 fun decode(inputStream: InputStream): InputStream in encode() 77 override fun decode(inputStream: InputStream) = inputStream in encode() 91 override fun decode(inputStream: InputStream) = InflaterInputStream(inputStream) in encode()
|
D | BackupRestoreFileArchiver.kt | 46 override fun wrapRestoreInputStream(codec: BackupCodec, inputStream: InputStream) = inputStream in <lambda>() 63 val inputStream = LimitedNoCloseInputStream(data) in <lambda>() constant 65 val checkedInputStream = CheckedInputStream(inputStream, checksum) in <lambda>() 113 val bytesCopied = file.inputStream().use { it.copyTo(stream) } in toBackupRestoreEntity() 120 override fun restore(restoreContext: RestoreContext, inputStream: InputStream) { in toBackupRestoreEntity()
|
D | BackupRestoreStorage.kt | 172 val inputStream = LimitedNoCloseInputStream(data) in <lambda>() constant 174 val checkedInputStream = CheckedInputStream(inputStream, checksum) in <lambda>() 195 inputStream: InputStream, in <lambda>() 198 val id = inputStream.read() in <lambda>() 200 if (id == expectedId) return codec.decode(inputStream) in <lambda>() 202 return BackupCodec.fromId(id.toByte()).decode(inputStream) in <lambda>() 281 class LimitedNoCloseInputStream(inputStream: BackupDataInputStream) : 282 FilterInputStream(ByteStreams.limit(inputStream, inputStream.size().toLong())) {
|
/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/base/services/tests/mockingservicestests/src/com/android/server/backup/utils/ |
D | TarBackupReaderTest.java | 114 InputStream inputStream = mContext.getResources().openRawResource( in readTarHeaders_backupEncrypted_correctlyParsesFileMetadata() local 117 inputStream, "123"); in readTarHeaders_backupEncrypted_correctlyParsesFileMetadata() 131 InputStream inputStream = mContext.getResources().openRawResource( in readTarHeaders_backupNotEncrypted_correctlyParsesFileMetadata() local 134 inputStream, null); in readTarHeaders_backupNotEncrypted_correctlyParsesFileMetadata() 149 InputStream inputStream = mContext.getResources().openRawResource( in readTarHeaders_backupNotEncrypted_correctlyReadsPaxHeader() local 152 inputStream, null); in readTarHeaders_backupNotEncrypted_correctlyReadsPaxHeader() 188 InputStream inputStream = mContext.getResources().openRawResource( in readAppManifest_backupEncrypted_correctlyParsesAppManifest() local 191 inputStream, "123"); in readAppManifest_backupEncrypted_correctlyParsesAppManifest() 209 InputStream inputStream = mContext.getResources().openRawResource( in readAppManifest_backupNotEncrypted_correctlyParsesAppManifest() local 212 inputStream, null); in readAppManifest_backupNotEncrypted_correctlyParsesAppManifest() [all …]
|
/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() 420 AAudioStream *inputStream = nullptr; in main() local 576 inputStream = loopbackData.inputStream = recorder.getStream(); in main() 579 int32_t actualCapacity = AAudioStream_getBufferCapacityInFrames(inputStream); in main() 580 (void) AAudioStream_setBufferSizeInFrames(inputStream, actualCapacity); in main() 601 argParser.compareWithStream(inputStream); in main() [all …]
|
/frameworks/base/services/core/java/com/android/server/pdb/ |
D | PersistentDataBlockService.java | 394 private int getTotalDataSizeLocked(DataInputStream inputStream) throws IOException { in getTotalDataSizeLocked() argument 396 inputStream.skipBytes(DIGEST_SIZE_BYTES); in getTotalDataSizeLocked() 399 int blockId = inputStream.readInt(); in getTotalDataSizeLocked() 401 totalDataSize = inputStream.readInt(); in getTotalDataSizeLocked() 499 DataInputStream inputStream; in computeDigestLocked() local 501 inputStream = new DataInputStream(new FileInputStream(new File(mDataBlockFile))); in computeDigestLocked() 513 IoUtils.closeQuietly(inputStream); in computeDigestLocked() 519 inputStream.read(storedDigest); in computeDigestLocked() 521 inputStream.skipBytes(DIGEST_SIZE_BYTES); in computeDigestLocked() 527 while ((read = inputStream.read(data)) != -1) { in computeDigestLocked() [all …]
|
/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/SystemUI/tests/src/com/android/systemui/communal/data/backup/ |
D | CommunalBackupHelperTest.kt | 135 val inputStream = BackupDataInputStream::class.constructors.first().call(input) in getBackupDataInputStream() constant 138 with(inputStream.javaClass.getDeclaredField("key")) { in getBackupDataInputStream() 140 set(inputStream, input.key) in getBackupDataInputStream() 144 with(inputStream.javaClass.getDeclaredField("dataSize")) { in getBackupDataInputStream() 146 set(inputStream, input.dataSize) in getBackupDataInputStream() 149 return inputStream in getBackupDataInputStream()
|
/frameworks/libs/systemui/toruslib/torus-utils/src/main/java/com/google/android/torus/utils/extensions/ |
D | AssetManagerExt.kt | 52 open(assetPathAndName).use { inputStream -> in readAsset() method 53 val byteArray = inputStream.readBytes() in readAsset() 57 inputStream.close() in readAsset()
|
/frameworks/base/core/jni/ |
D | com_android_internal_content_FileSystemUtils.cpp | 208 std::ifstream inputStream(filePath, std::ifstream::in); in punchHolesInElf64() local 211 inputStream.seekg(offset); in punchHolesInElf64() 213 inputStream.read((char *)&ehdr, sizeof(ehdr)); in punchHolesInElf64() 214 if (!inputStream.good()) { in punchHolesInElf64() 239 inputStream.seekg(phOffset); in punchHolesInElf64() 244 inputStream.read((char *)&header, sizeof(header)); in punchHolesInElf64() 245 if (!inputStream.good()) { in punchHolesInElf64()
|
/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()
|