Home
last modified time | relevance | path

Searched refs:extractor (Results 1 – 25 of 35) sorted by relevance

12

/cts/tests/media/src/android/mediav2/cts/
DExtractorUnitTest.java62 MediaExtractor extractor = new MediaExtractor(); in testGetTrackCountBeforeSetDataSource() local
65 extractor.getTrackCount() <= 0); in testGetTrackCountBeforeSetDataSource()
69 extractor.release(); in testGetTrackCountBeforeSetDataSource()
75 MediaExtractor extractor = new MediaExtractor(); in testGetTrackCountAfterRelease() local
76 extractor.release(); in testGetTrackCountAfterRelease()
78 extractor.getTrackCount(); in testGetTrackCountAfterRelease()
87 MediaExtractor extractor = new MediaExtractor(); in testSelectTrackBeforeSetDataSource() local
89 extractor.selectTrack(0); in testSelectTrackBeforeSetDataSource()
94 extractor.release(); in testSelectTrackBeforeSetDataSource()
100 MediaExtractor extractor = new MediaExtractor(); in testSelectTrackForInvalidIndex() local
[all …]
DExtractorTest.java203 private static boolean isExtractorOKonEOS(MediaExtractor extractor) { in isExtractorOKonEOS() argument
204 return extractor.getSampleTrackIndex() < 0 && extractor.getSampleSize() < 0 && in isExtractorOKonEOS()
205 extractor.getSampleFlags() < 0 && extractor.getSampleTime() < 0; in isExtractorOKonEOS()
412 private static long readAllData(MediaExtractor extractor, String mime, int sampleLimit) { in readAllData() argument
416 for (int trackID = 0; trackID < extractor.getTrackCount(); trackID++) { in readAllData()
417 MediaFormat format = extractor.getTrackFormat(trackID); in readAllData()
422 extractor.selectTrack(trackID); in readAllData()
449 sampleInfo.set(0, (int) extractor.getSampleSize(), extractor.getSampleTime(), in readAllData()
450 extractor.getSampleFlags()); in readAllData()
451 extractor.readSampleData(buffer, 0); in readAllData()
[all …]
DMuxerTest.java80 MediaExtractor extractor = new MediaExtractor(); in splitMediaToMuxerParameters() local
81 extractor.setDataSource(mSrcPath); in splitMediaToMuxerParameters()
85 for (int trackID = 0; trackID < extractor.getTrackCount(); trackID++) { in splitMediaToMuxerParameters()
86 extractor.selectTrack(trackID); in splitMediaToMuxerParameters()
87 MediaFormat format = extractor.getTrackFormat(trackID); in splitMediaToMuxerParameters()
110 extractor.unselectTrack(trackID); in splitMediaToMuxerParameters()
116 extractor.release(); in splitMediaToMuxerParameters()
145 bufferInfo.size = extractor.readSampleData(mBuff, offset); in splitMediaToMuxerParameters()
150 bufferInfo.presentationTimeUs = extractor.getSampleTime(); in splitMediaToMuxerParameters()
151 bufferInfo.flags = extractor.getSampleFlags(); in splitMediaToMuxerParameters()
[all …]
/cts/tests/media/jni/
DNativeExtractorUnitTest.cpp28 static media_status_t setExtractorDataSource(AMediaExtractor* extractor, FILE* fp) { in setExtractorDataSource() argument
32 status = AMediaExtractor_setDataSourceFd(extractor, fileno(fp), 0, buf.st_size); in setExtractorDataSource()
38 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetTrackCountBeforeSetDataSource() local
39 bool isPass = (0 == AMediaExtractor_getTrackCount(extractor)); in nativeTestGetTrackCountBeforeSetDataSource()
41 AMediaExtractor_delete(extractor); in nativeTestGetTrackCountBeforeSetDataSource()
46 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestSelectTrackBeforeSetDataSource() local
47 bool isPass = (AMEDIA_OK != AMediaExtractor_selectTrack(extractor, 0)); in nativeTestSelectTrackBeforeSetDataSource()
49 AMediaExtractor_delete(extractor); in nativeTestSelectTrackBeforeSetDataSource()
56 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestSelectTrackForInvalidIndex() local
58 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestSelectTrackForInvalidIndex()
[all …]
DNativeExtractorTest.cpp38 static bool isExtractorOKonEOS(AMediaExtractor* extractor) { in isExtractorOKonEOS() argument
39 return AMediaExtractor_getSampleTrackIndex(extractor) < 0 && in isExtractorOKonEOS()
40 AMediaExtractor_getSampleSize(extractor) < 0 && in isExtractorOKonEOS()
41 (int)AMediaExtractor_getSampleFlags(extractor) < 0 && in isExtractorOKonEOS()
42 AMediaExtractor_getSampleTime(extractor) < 0; in isExtractorOKonEOS()
58 static void inline setSampleInfo(AMediaExtractor* extractor, AMediaCodecBufferInfo* info) { in setSampleInfo() argument
59 info->flags = AMediaExtractor_getSampleFlags(extractor); in setSampleInfo()
61 info->size = AMediaExtractor_getSampleSize(extractor); in setSampleInfo()
62 info->presentationTimeUs = AMediaExtractor_getSampleTime(extractor); in setSampleInfo()
180 static bool validateCachedDuration(AMediaExtractor* extractor, bool isNetworkSource) { in validateCachedDuration() argument
[all …]
DNativeMuxerTest.cpp130 AMediaExtractor* extractor = AMediaExtractor_new(); in splitMediaToMuxerParameters() local
131 if (extractor == nullptr) { in splitMediaToMuxerParameters()
136 media_status_t status = AMediaExtractor_setDataSourceFd(extractor, fd, 0, fileSize); in splitMediaToMuxerParameters()
138 AMediaExtractor_delete(extractor); in splitMediaToMuxerParameters()
145 for (size_t trackID = 0; trackID < AMediaExtractor_getTrackCount(extractor); trackID++) { in splitMediaToMuxerParameters()
146 AMediaExtractor_selectTrack(extractor, trackID); in splitMediaToMuxerParameters()
147 AMediaFormat* format = AMediaExtractor_getTrackFormat(extractor, trackID); in splitMediaToMuxerParameters()
162 AMediaExtractor_unselectTrack(extractor, trackID); in splitMediaToMuxerParameters()
168 AMediaExtractor_delete(extractor); in splitMediaToMuxerParameters()
183 AMediaExtractor_delete(extractor); in splitMediaToMuxerParameters()
[all …]
/cts/tests/video/src/android/video/cts/
DCodecPerformanceTestBase.java131 MediaExtractor extractor = new MediaExtractor(); in getVideoFormat() local
132 extractor.setDataSource(input); in getVideoFormat()
133 for (int trackID = 0; trackID < extractor.getTrackCount(); trackID++) { in getVideoFormat()
134 MediaFormat format = extractor.getTrackFormat(trackID); in getVideoFormat()
136 extractor.release(); in getVideoFormat()
140 extractor.release(); in getVideoFormat()
197 MediaExtractor extractor = new MediaExtractor(); in setUpDecoderInput() local
198 extractor.setDataSource(input); in setUpDecoderInput()
199 for (int trackID = 0; trackID < extractor.getTrackCount(); trackID++) { in setUpDecoderInput()
200 MediaFormat format = extractor.getTrackFormat(trackID); in setUpDecoderInput()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DDecoderTestAacFormat.java117 MediaExtractor extractor = new MediaExtractor(); in decodeUpdateFormat() local
118 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), in decodeUpdateFormat()
122 assertEquals("wrong number of tracks", 1, extractor.getTrackCount()); in decodeUpdateFormat()
123 MediaFormat format = extractor.getTrackFormat(0); in decodeUpdateFormat()
147 extractor.selectTrack(0); in decodeUpdateFormat()
167 extractor.readSampleData(dstBuf, 0 /* offset */); in decodeUpdateFormat()
177 presentationTimeUs = extractor.getSampleTime(); in decodeUpdateFormat()
187 extractor.advance(); in decodeUpdateFormat()
234 extractor.release(); in decodeUpdateFormat()
DMediaExtractorTest.java899 MediaExtractor extractor = new MediaExtractor(); in SKIP_testFlacMovExtraction() local
900 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), in SKIP_testFlacMovExtraction()
903 extractor.selectTrack(0); in SKIP_testFlacMovExtraction()
909 int n = extractor.readSampleData(buf, 0); in SKIP_testFlacMovExtraction()
913 if (!extractor.advance()) { in SKIP_testFlacMovExtraction()
923 MediaExtractor extractor = new MediaExtractor(); in testProgramStreamExtraction() local
924 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), in testProgramStreamExtraction()
927 assertEquals("There must be 2 tracks", 2, extractor.getTrackCount()); in testProgramStreamExtraction()
928 extractor.selectTrack(0); in testProgramStreamExtraction()
929 extractor.selectTrack(1); in testProgramStreamExtraction()
[all …]
DMediaMuxerTest.java715 MediaExtractor extractor = new MediaExtractor(); in cloneMediaUsingMuxer() local
716 extractor.setDataSource(srcFd.getFileDescriptor(), srcFd.getStartOffset(), in cloneMediaUsingMuxer()
719 int trackCount = extractor.getTrackCount(); in cloneMediaUsingMuxer()
729 extractor.selectTrack(i); in cloneMediaUsingMuxer()
730 MediaFormat format = extractor.getTrackFormat(i); in cloneMediaUsingMuxer()
772 bufferInfo.size = extractor.readSampleData(dstBuf, offset); in cloneMediaUsingMuxer()
781 bufferInfo.presentationTimeUs = extractor.getSampleTime(); in cloneMediaUsingMuxer()
782 bufferInfo.flags = extractor.getSampleFlags(); in cloneMediaUsingMuxer()
783 int trackIndex = extractor.getSampleTrackIndex(); in cloneMediaUsingMuxer()
787 extractor.advance(); in cloneMediaUsingMuxer()
[all …]
DDecoderTestAacDrc.java548 MediaExtractor extractor; in decodeToMemory() local
553 extractor = new MediaExtractor(); in decodeToMemory()
554 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), in decodeToMemory()
558 assertEquals("wrong number of tracks", 1, extractor.getTrackCount()); in decodeToMemory()
559 MediaFormat format = extractor.getTrackFormat(0); in decodeToMemory()
613 extractor.selectTrack(0); in decodeToMemory()
631 extractor.readSampleData(dstBuf, 0 /* offset */); in decodeToMemory()
647 presentationTimeUs = extractor.getSampleTime(); in decodeToMemory()
657 extractor.advance(); in decodeToMemory()
DImageReaderDecoderTest.java273 MediaExtractor extractor = null; in videoDecode() local
279 extractor = new MediaExtractor(); in videoDecode()
283 extractor.setDataSource( in videoDecode()
299 extractor.setDataSource(tmpFile.getAbsolutePath()); in videoDecode()
302 mediaFormat = extractor.getTrackFormat(0); in videoDecode()
310 decoder, extractor, mediaFormat, in videoDecode()
324 if (extractor != null) { in videoDecode()
325 extractor.release(); in videoDecode()
487 MediaCodec decoder, MediaExtractor extractor, MediaFormat mediaFormat, in decodeFramesToImage() argument
506 extractor.selectTrack(0); in decodeFramesToImage()
[all …]
DExtractDecodeEditEncodeMuxTest.java594 MediaExtractor extractor; in createExtractor() local
596 extractor = new MediaExtractor(); in createExtractor()
597 extractor.setDataSource(srcFd.getFileDescriptor(), srcFd.getStartOffset(), in createExtractor()
599 return extractor; in createExtractor()
675 private int getAndSelectVideoTrackIndex(MediaExtractor extractor) { in getAndSelectVideoTrackIndex() argument
676 for (int index = 0; index < extractor.getTrackCount(); ++index) { in getAndSelectVideoTrackIndex()
679 + getMimeTypeFor(extractor.getTrackFormat(index))); in getAndSelectVideoTrackIndex()
681 if (isVideoFormat(extractor.getTrackFormat(index))) { in getAndSelectVideoTrackIndex()
682 extractor.selectTrack(index); in getAndSelectVideoTrackIndex()
689 private int getAndSelectAudioTrackIndex(MediaExtractor extractor) { in getAndSelectAudioTrackIndex() argument
[all …]
DVideoDecoderPerfTest.java132 MediaExtractor extractor = new MediaExtractor(); in doDecode() local
133 extractor.setDataSource(video); in doDecode()
134 extractor.selectTrack(0); in doDecode()
135 int trackIndex = extractor.getSampleTrackIndex(); in doDecode()
136 MediaFormat format = extractor.getTrackFormat(trackIndex); in doDecode()
158 while ((sampleSize = extractor.readSampleData(tmpBuf, 0 /* offset */)) > 0) { in doDecode()
163 firstPTS = extractor.getSampleTime(); in doDecode()
170 (extractor.getSampleTime() - firstPTS) * frameRate / 1e6 - index; in doDecode()
175 extractor.advance(); in doDecode()
186 extractor.release(); in doDecode()
DMediaCodecBlockModelTest.java246 public Builder setExtractor(MediaExtractor extractor) { in setExtractor() argument
247 mExtractor = extractor; in setExtractor()
289 MediaExtractor extractor, in ExtractorInputSlotListener() argument
294 mExtractor = extractor; in ExtractorInputSlotListener()
510 MediaExtractor extractor = new MediaExtractor(); in runDecodeShortEncryptedVideo() local
514 extractor.setDataSource(uri.toString(), null); in runDecodeShortEncryptedVideo()
515 extractor.selectTrack(0); in runDecodeShortEncryptedVideo()
516 extractor.seekTo(12083333, MediaExtractor.SEEK_TO_CLOSEST_SYNC); in runDecodeShortEncryptedVideo()
532 extractor, ENCRYPTED_CONTENT_LAST_BUFFER_TIMESTAMP_US, in runDecodeShortEncryptedVideo()
DMediaCodecClearKeyPlayer.java306 private void initCasAndDescrambler(MediaExtractor extractor) throws MediaCasException { in initCasAndDescrambler() argument
307 int trackCount = extractor.getTrackCount(); in initCasAndDescrambler()
309 android.media.MediaFormat format = extractor.getTrackFormat(trackId); in initCasAndDescrambler()
314 MediaExtractor.CasInfo casInfo = extractor.getCasInfo(trackId); in initCasAndDescrambler()
331 extractor.setMediaCas(mMediaCas); in initCasAndDescrambler()
DDecoderTestXheAac.java1250 MediaExtractor extractor;
1255 extractor = new MediaExtractor();
1256 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(),
1260 assertEquals("wrong number of tracks", 1, extractor.getTrackCount());
1261 MediaFormat format = extractor.getTrackFormat(0);
1345 extractor.selectTrack(0);
1350 extractor.seekTo(seek_duration, seek_mode);
1371 extractor.readSampleData(dstBuf, 0 /* offset */);
1388 presentationTimeUs = extractor.getSampleTime();
1399 extractor.advance();
/cts/tests/tests/systemui/src/android/systemui/cts/
DNotificationListener.kt81 return waitForResult(extractor = { in waitForNotificationToAppear()
96 val (success, _) = waitForResult(extractor = condition, validator = { it }) in wait()
103 extractor: () -> R, in waitForResult()
108 val result = extractor()
/cts/tests/tests/mediatranscoding/src/android/media/mediatranscoding/cts/
DMediaTranscodingTestUtil.java178 MediaExtractor extractor = null; in decodeMp4ToYuv() local
187 extractor = new MediaExtractor(); in decodeMp4ToYuv()
188 extractor.setDataSource(fileFd.getFileDescriptor(), fileFd.getStartOffset(), in decodeMp4ToYuv()
192 int trackCount = extractor.getTrackCount(); in decodeMp4ToYuv()
198 extractor.selectTrack(i); in decodeMp4ToYuv()
199 MediaFormat format = extractor.getTrackFormat(i); in decodeMp4ToYuv()
204 extractor.unselectTrack(i); in decodeMp4ToYuv()
210 extractor.selectTrack(videoTrackIndex); in decodeMp4ToYuv()
211 MediaFormat format = extractor.getTrackFormat(videoTrackIndex); in decodeMp4ToYuv()
253 extractor.readSampleData(dstBuf, 0 /* offset */); in decodeMp4ToYuv()
[all …]
/cts/tests/tests/media/libmediandkjni/
Dnative-mediadrm-jni.cpp138 AMediaExtractor* extractor, const char* url) { in setDataSourceFdFromUrl() argument
146 extractor, in setDataSourceFdFromUrl()
160 AMediaExtractor* extractor, const char* url) { in setDataSourceFdOrUrl() argument
164 status = setDataSourceFdFromUrl(extractor, url); in setDataSourceFdOrUrl()
166 status = AMediaExtractor_setDataSource(extractor, url); in setDataSourceFdOrUrl()
377 static void addTracks(const AMediaExtractor* extractor, in addTracks() argument
381 const_cast<AMediaExtractor*>(extractor)); in addTracks()
386 const_cast<AMediaExtractor*>(extractor), i); in addTracks()
400 const_cast<AMediaExtractor*>(extractor), i); in addTracks()
408 const_cast<AMediaExtractor*>(extractor), 0, in addTracks()
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DMediaUtils.java759 MediaExtractor extractor = new MediaExtractor(); in getTrackFormatForResource() local
762 extractor.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getTrackFormatForResource()
766 return getTrackFormatForExtractor(extractor, mimeTypePrefix); in getTrackFormatForResource()
772 MediaExtractor extractor = new MediaExtractor(); in getTrackFormatForResource() local
774 extractor.setDataSource(resource); in getTrackFormatForResource()
778 return getTrackFormatForExtractor(extractor, mimeTypePrefix); in getTrackFormatForResource()
784 MediaExtractor extractor = getExtractorForPath(context, path); in getTrackFormatForPath() local
785 return getTrackFormatForExtractor(extractor, mimeTypePrefix); in getTrackFormatForPath()
789 MediaExtractor extractor, in getTrackFormatForExtractor() argument
793 for (trackIndex = 0; trackIndex < extractor.getTrackCount(); trackIndex++) { in getTrackFormatForExtractor()
[all …]
/cts/tests/tests/mediaparser/
DAndroid.bp42 "exoplayer2-extractor-test-utils",
43 "exoplayer2-extractor-tests-assets",
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DRVCVXCheckAnalyzer.java973 private MediaExtractor extractor=null; field in RVCVXCheckAnalyzer.VideoDecoderForOpenCV
1055 if (extractor!=null) { in teardown()
1056 extractor.release(); in teardown()
1057 extractor = null; in teardown()
1064 extractor = new MediaExtractor(); in setup()
1067 extractor.setDataSource(mVideoFile.getPath()); in setup()
1072 for (int i = 0; i < extractor.getTrackCount(); i++) { in setup()
1073 MediaFormat format = extractor.getTrackFormat(i); in setup()
1079 extractor.selectTrack(i); in setup()
1134 int sampleSize = extractor.readSampleData(buffer, 0); in run()
[all …]
/cts/tests/media/
DREADME.md2 Current folder comprises of files necessary for testing media extractor, media muxer, media codec S…
46 To select extractors by type, *ext-sel* can be passed to extractor tests to select one or more extr…
48 Example: To limit extractor tests to mp4 and webm types
/cts/tests/camera/src/android/hardware/camera2/cts/
DHeifWriterTest.java354 MediaExtractor extractor = new MediaExtractor(); in verifyResult() local
355 extractor.setDataSource(filename); in verifyResult()
356 MediaFormat format = extractor.getTrackFormat(0); in verifyResult()
365 extractor.release(); in verifyResult()

12