Home
last modified time | relevance | path

Searched refs:inputStream (Results 1 – 25 of 138) sorted by relevance

123456

/frameworks/av/media/libstagefright/codecs/mp3dec/src/
Dpvmp3_seek_synch.cpp140 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 …]
Dpvmp3_get_side_info.cpp115 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 …]
Dpvmp3_decode_header.cpp115 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()
Dpvmp3_framedecoder.cpp173 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 …]
Dpvmp3_getbits.h107 static inline bool bitsAvailable(tmp3Bits *inputStream, uint32 neededBits) in bitsAvailable() argument
109 return (inputStream->inputBufferCurrentLength << 3) >= (neededBits + inputStream->usedBits); in bitsAvailable()
Dpvmp3_crc.cpp123 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/
DBinaryFileOperationsTest.java56 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 …]
DRuleIndexingControllerTest.java47 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect() local
49 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect()
69 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates() local
71 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates()
92 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock() local
94 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock()
114 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues() local
116 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues()
146 InputStream inputStream = new ByteArrayInputStream(rule.array()); in verifyIndexRangeSearchIsCorrect_noIndexesAvailable() local
148 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_noIndexesAvailable()
/frameworks/base/services/core/java/com/android/server/
DPersistentDataBlockService.java240 private int getTotalDataSizeLocked(DataInputStream inputStream) throws IOException { in getTotalDataSizeLocked() argument
242 inputStream.skipBytes(DIGEST_SIZE_BYTES); in getTotalDataSizeLocked()
245 int blockId = inputStream.readInt(); in getTotalDataSizeLocked()
247 totalDataSize = inputStream.readInt(); in getTotalDataSizeLocked()
315 DataInputStream inputStream; in computeDigestLocked() local
317 inputStream = new DataInputStream(new FileInputStream(new File(mDataBlockFile))); in computeDigestLocked()
329 IoUtils.closeQuietly(inputStream); in computeDigestLocked()
335 inputStream.read(storedDigest); in computeDigestLocked()
337 inputStream.skipBytes(DIGEST_SIZE_BYTES); in computeDigestLocked()
343 while ((read = inputStream.read(data)) != -1) { in computeDigestLocked()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/restore/
DPerformAdbRestoreTaskTest.java53 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/opt/vcard/tests/src/com/android/vcard/tests/
DVCardParserTests.java94 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/
DTarBackupReaderTest.java104 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/
DWriterUtility.cpp25 int32_t sendBuffersToWriter(ifstream &inputStream, vector<BufferInfo> &bufferInfo, in sendBuffersToWriter() argument
37 inputStream.read(data, size); in sendBuffersToWriter()
38 CHECK_EQ(inputStream.gcount(), size); in sendBuffersToWriter()
76 int32_t writeHeaderBuffers(ifstream &inputStream, vector<BufferInfo> &bufferInfo, in writeHeaderBuffers() argument
88 inputStream.read(data, size); in writeHeaderBuffers()
89 CHECK_EQ(inputStream.gcount(), size); in writeHeaderBuffers()
/frameworks/av/media/libaaudio/examples/loopback/src/
Dloopback.cpp80 AAudioStream *inputStream = nullptr; member
151 framesRead = AAudioStream_read(myData->inputStream, myData->inputShortData, in readFormattedData()
155 framesRead = AAudioStream_read(myData->inputStream, myData->inputFloatData, in readFormattedData()
242 int64_t inputFramesWritten = AAudioStream_getFramesWritten(myData->inputStream); in MyDataCallbackProc()
243 int64_t inputFramesRead = AAudioStream_getFramesRead(myData->inputStream); in MyDataCallbackProc()
416 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/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/cdc/
DContentDefinedChunkerTest.java123 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/
DDiffScriptProcessor.java136 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/services/core/java/com/android/server/integrity/parser/
DRuleBinaryParser.java86 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/tests/JankBench/app/src/main/java/com/android/benchmark/ui/automation/
DFrameTimingStats.java68 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/packages/BackupEncryption/src/com/android/server/backup/encryption/tasks/
DEncryptedFullBackupTask.java86 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/
DKeyValueAdbRestoreEngine.java106 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/
DInstallTask.java136 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/
DContentDefinedChunker.java79 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/
DBitInputStream.java35 public BitInputStream(InputStream inputStream) { in BitInputStream() argument
36 mInputStream = inputStream; in BitInputStream()
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/exif/
DExifParser.java201 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
203 if (inputStream == null) { in ExifParser()
210 mContainExifData = seekTiffData(inputStream); in ExifParser()
211 mTiffStream = new CountedDataInputStream(inputStream); in ExifParser()
239 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
241 return new ExifParser(inputStream, options, iRef); in parse()
252 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
254 return new ExifParser(inputStream, OPTION_IFD_0 | OPTION_IFD_1 in parse()
752 private boolean seekTiffData(InputStream inputStream) throws IOException, in seekTiffData() argument
754 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()
/frameworks/base/graphics/java/android/graphics/drawable/
DIcon.java517 DataInputStream inputStream = new DataInputStream(stream); in createFromStream() local
519 final int version = inputStream.readInt(); in createFromStream()
521 final int type = inputStream.readByte(); in createFromStream()
524 return createWithBitmap(BitmapFactory.decodeStream(inputStream)); in createFromStream()
526 return createWithAdaptiveBitmap(BitmapFactory.decodeStream(inputStream)); in createFromStream()
528 final int length = inputStream.readInt(); in createFromStream()
530 inputStream.read(data, 0 /* offset */, length); in createFromStream()
533 final String packageName = inputStream.readUTF(); in createFromStream()
534 final int resId = inputStream.readInt(); in createFromStream()
537 final String uriOrPath = inputStream.readUTF(); in createFromStream()
[all …]

123456