/cts/tests/media/src/android/mediav2/cts/ |
D | ExtractorUnitTest.java | 55 MediaExtractor extractor = new MediaExtractor(); in testGetTrackCountBeforeSetDataSource() local 58 extractor.getTrackCount() <= 0); in testGetTrackCountBeforeSetDataSource() 62 extractor.release(); in testGetTrackCountBeforeSetDataSource() 68 MediaExtractor extractor = new MediaExtractor(); in testGetTrackCountAfterRelease() local 69 extractor.release(); in testGetTrackCountAfterRelease() 71 extractor.getTrackCount(); in testGetTrackCountAfterRelease() 80 MediaExtractor extractor = new MediaExtractor(); in testSelectTrackBeforeSetDataSource() local 82 extractor.selectTrack(0); in testSelectTrackBeforeSetDataSource() 87 extractor.release(); in testSelectTrackBeforeSetDataSource() 93 MediaExtractor extractor = new MediaExtractor(); in testSelectTrackForInvalidIndex() local [all …]
|
D | ExtractorTest.java | 180 private static boolean isExtractorOKonEOS(MediaExtractor extractor) { in isExtractorOKonEOS() argument 181 return extractor.getSampleTrackIndex() < 0 && extractor.getSampleSize() < 0 && in isExtractorOKonEOS() 182 extractor.getSampleFlags() < 0 && extractor.getSampleTime() < 0; in isExtractorOKonEOS() 715 MediaExtractor extractor = new MediaExtractor(); 716 extractor.setDataSource(mInpPrefix + srcFile); 717 for (int trackID = 0; trackID < extractor.getTrackCount(); trackID++) { 718 MediaFormat format = extractor.getTrackFormat(trackID); 720 extractor.selectTrack(trackID); 723 int sampleFlags = extractor.getSampleFlags(); 726 sampleInfo.set(0, (int) extractor.getSampleSize(), [all …]
|
D | MuxerTest.java | 77 MediaExtractor extractor = new MediaExtractor(); in splitMediaToMuxerParameters() local 78 extractor.setDataSource(mSrcPath); in splitMediaToMuxerParameters() 82 for (int trackID = 0; trackID < extractor.getTrackCount(); trackID++) { in splitMediaToMuxerParameters() 83 extractor.selectTrack(trackID); in splitMediaToMuxerParameters() 84 MediaFormat format = extractor.getTrackFormat(trackID); in splitMediaToMuxerParameters() 97 extractor.unselectTrack(trackID); in splitMediaToMuxerParameters() 103 extractor.release(); in splitMediaToMuxerParameters() 132 bufferInfo.size = extractor.readSampleData(mBuff, offset); in splitMediaToMuxerParameters() 137 bufferInfo.presentationTimeUs = extractor.getSampleTime(); in splitMediaToMuxerParameters() 138 bufferInfo.flags = extractor.getSampleFlags(); in splitMediaToMuxerParameters() [all …]
|
/cts/tests/media/jni/ |
D | NativeExtractorUnitTest.cpp | 28 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 …]
|
D | NativeExtractorTest.cpp | 30 static bool isExtractorOKonEOS(AMediaExtractor* extractor) { in isExtractorOKonEOS() argument 31 return AMediaExtractor_getSampleTrackIndex(extractor) < 0 && in isExtractorOKonEOS() 32 AMediaExtractor_getSampleSize(extractor) < 0 && in isExtractorOKonEOS() 33 (int)AMediaExtractor_getSampleFlags(extractor) < 0 && in isExtractorOKonEOS() 34 AMediaExtractor_getSampleTime(extractor) < 0; in isExtractorOKonEOS() 82 static void inline setSampleInfo(AMediaExtractor* extractor, AMediaCodecBufferInfo* info) { in setSampleInfo() argument 83 info->flags = AMediaExtractor_getSampleFlags(extractor); in setSampleInfo() 85 info->size = AMediaExtractor_getSampleSize(extractor); in setSampleInfo() 86 info->presentationTimeUs = AMediaExtractor_getSampleTime(extractor); in setSampleInfo() 206 static bool validateCachedDuration(AMediaExtractor* extractor, bool isNetworkSource) { in validateCachedDuration() argument [all …]
|
D | NativeMuxerTest.cpp | 102 AMediaExtractor* extractor = AMediaExtractor_new(); in splitMediaToMuxerParameters() local 103 if (extractor == nullptr) { in splitMediaToMuxerParameters() 108 media_status_t status = AMediaExtractor_setDataSourceFd(extractor, fd, 0, fileSize); in splitMediaToMuxerParameters() 110 AMediaExtractor_delete(extractor); in splitMediaToMuxerParameters() 117 for (size_t trackID = 0; trackID < AMediaExtractor_getTrackCount(extractor); trackID++) { in splitMediaToMuxerParameters() 118 AMediaExtractor_selectTrack(extractor, trackID); in splitMediaToMuxerParameters() 119 AMediaFormat* format = AMediaExtractor_getTrackFormat(extractor, trackID); in splitMediaToMuxerParameters() 134 AMediaExtractor_unselectTrack(extractor, trackID); in splitMediaToMuxerParameters() 140 AMediaExtractor_delete(extractor); in splitMediaToMuxerParameters() 155 AMediaExtractor_delete(extractor); in splitMediaToMuxerParameters() [all …]
|
/cts/tests/tests/media/src/android/media/cts/ |
D | MediaMuxerTest.java | 484 MediaExtractor extractor = new MediaExtractor(); in cloneMediaUsingMuxer() local 485 extractor.setDataSource(srcFd.getFileDescriptor(), srcFd.getStartOffset(), in cloneMediaUsingMuxer() 488 int trackCount = extractor.getTrackCount(); in cloneMediaUsingMuxer() 498 extractor.selectTrack(i); in cloneMediaUsingMuxer() 499 MediaFormat format = extractor.getTrackFormat(i); in cloneMediaUsingMuxer() 541 bufferInfo.size = extractor.readSampleData(dstBuf, offset); in cloneMediaUsingMuxer() 550 bufferInfo.presentationTimeUs = extractor.getSampleTime(); in cloneMediaUsingMuxer() 551 bufferInfo.flags = extractor.getSampleFlags(); in cloneMediaUsingMuxer() 552 int trackIndex = extractor.getSampleTrackIndex(); in cloneMediaUsingMuxer() 556 extractor.advance(); in cloneMediaUsingMuxer() [all …]
|
D | DecoderTest.java | 863 MediaExtractor extractor = null; in testHdrStaticMetadata() local 867 extractor = new MediaExtractor(); in testHdrStaticMetadata() 868 extractor.setDataSource(infd.getFileDescriptor(), in testHdrStaticMetadata() 873 for (int i = 0; i < extractor.getTrackCount(); i++) { in testHdrStaticMetadata() 874 format = extractor.getTrackFormat(i); in testHdrStaticMetadata() 887 extractor.selectTrack(trackIndex); in testHdrStaticMetadata() 917 final MediaExtractor finalExtractor = extractor; in testHdrStaticMetadata() 922 extractor.seekTo(0, MediaExtractor.SEEK_TO_PREVIOUS_SYNC); in testHdrStaticMetadata() 991 if (extractor != null) { in testHdrStaticMetadata() 992 extractor.release(); in testHdrStaticMetadata() [all …]
|
D | MediaExtractorTest.java | 699 MediaExtractor extractor = new MediaExtractor(); in testFlacMovExtraction() local 700 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), in testFlacMovExtraction() 703 extractor.selectTrack(0); in testFlacMovExtraction() 709 int n = extractor.readSampleData(buf, 0); in testFlacMovExtraction() 713 if (!extractor.advance()) { in testFlacMovExtraction() 723 MediaExtractor extractor = new MediaExtractor(); in doTestAdvance() local 724 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), in doTestAdvance() 727 extractor.selectTrack(0); in doTestAdvance() 732 int n = extractor.readSampleData(buf, 0); in doTestAdvance() 737 extractor.getSampleTime() >= 0); in doTestAdvance() [all …]
|
D | DecoderTestAacDrc.java | 407 MediaExtractor extractor; in decodeToMemory() local 412 extractor = new MediaExtractor(); in decodeToMemory() 413 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), in decodeToMemory() 417 assertEquals("wrong number of tracks", 1, extractor.getTrackCount()); in decodeToMemory() 418 MediaFormat format = extractor.getTrackFormat(0); in decodeToMemory() 446 extractor.selectTrack(0); in decodeToMemory() 464 extractor.readSampleData(dstBuf, 0 /* offset */); in decodeToMemory() 480 presentationTimeUs = extractor.getSampleTime(); in decodeToMemory() 490 extractor.advance(); in decodeToMemory()
|
D | ExtractDecodeEditEncodeMuxTest.java | 585 MediaExtractor extractor; in createExtractor() local 588 extractor = new MediaExtractor(); in createExtractor() 589 extractor.setDataSource(srcFd.getFileDescriptor(), srcFd.getStartOffset(), in createExtractor() 591 return extractor; in createExtractor() 667 private int getAndSelectVideoTrackIndex(MediaExtractor extractor) { in getAndSelectVideoTrackIndex() argument 668 for (int index = 0; index < extractor.getTrackCount(); ++index) { in getAndSelectVideoTrackIndex() 671 + getMimeTypeFor(extractor.getTrackFormat(index))); in getAndSelectVideoTrackIndex() 673 if (isVideoFormat(extractor.getTrackFormat(index))) { in getAndSelectVideoTrackIndex() 674 extractor.selectTrack(index); in getAndSelectVideoTrackIndex() 681 private int getAndSelectAudioTrackIndex(MediaExtractor extractor) { in getAndSelectAudioTrackIndex() argument [all …]
|
D | ImageReaderDecoderTest.java | 259 MediaExtractor extractor = null; in videoDecode() local 265 extractor = new MediaExtractor(); in videoDecode() 269 extractor.setDataSource( in videoDecode() 285 extractor.setDataSource(tmpFile.getAbsolutePath()); in videoDecode() 288 mediaFormat = extractor.getTrackFormat(0); in videoDecode() 296 decoder, extractor, mediaFormat, in videoDecode() 310 if (extractor != null) { in videoDecode() 311 extractor.release(); in videoDecode() 468 MediaCodec decoder, MediaExtractor extractor, MediaFormat mediaFormat, in decodeFramesToImage() argument 487 extractor.selectTrack(0); in decodeFramesToImage() [all …]
|
D | MediaCodecClearKeyPlayer.java | 299 private void setDataSource(MediaExtractor extractor, Uri uri, Map<String, String> headers) in setDataSource() argument 303 extractor.setDataSource(uri.toString(), headers); in setDataSource() 305 extractor.setDataSource(uri.toString().substring(FILE_SCHEME.length()), headers); in setDataSource() 309 extractor.setDataSource(fd.getFileDescriptor(), fd.getStartOffset(), fd.getLength()); in setDataSource() 315 private void initCasAndDescrambler(MediaExtractor extractor) throws MediaCasException { in initCasAndDescrambler() argument 316 int trackCount = extractor.getTrackCount(); in initCasAndDescrambler() 318 android.media.MediaFormat format = extractor.getTrackFormat(trackId); in initCasAndDescrambler() 323 MediaExtractor.CasInfo casInfo = extractor.getCasInfo(trackId); in initCasAndDescrambler() 330 extractor.setMediaCas(mMediaCas); in initCasAndDescrambler()
|
D | DecoderTestXheAac.java | 830 MediaExtractor extractor; 835 extractor = new MediaExtractor(); 836 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), 840 assertEquals("wrong number of tracks", 1, extractor.getTrackCount()); 841 MediaFormat format = extractor.getTrackFormat(0); 874 extractor.selectTrack(0); 894 extractor.readSampleData(dstBuf, 0 /* offset */); 911 presentationTimeUs = extractor.getSampleTime(); 922 extractor.advance();
|
D | VideoDecoderPerfTest.java | 163 MediaExtractor extractor = new MediaExtractor(); in doDecode() local 164 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), in doDecode() 166 extractor.selectTrack(0); in doDecode() 167 int trackIndex = extractor.getSampleTrackIndex(); in doDecode() 168 MediaFormat format = extractor.getTrackFormat(trackIndex); in doDecode() 190 while ((sampleSize = extractor.readSampleData(tmpBuf, 0 /* offset */)) > 0) { in doDecode() 195 firstPTS = extractor.getSampleTime(); in doDecode() 202 (extractor.getSampleTime() - firstPTS) * frameRate / 1e6 - index; in doDecode() 207 extractor.advance(); in doDecode() 218 extractor.release(); in doDecode()
|
D | DecodeAccuracyTestBase.java | 148 private final MediaExtractor extractor; field in DecodeAccuracyTestBase.SimplePlayer 163 this.extractor = new MediaExtractor(); in SimplePlayer() 229 extractor.selectTrack(trackNum); in prepareExtractor() 230 return extractor.getTrackFormat(trackNum); in prepareExtractor() 309 final int sampleSize = extractor.readSampleData(inputBuffer, 0); in queueDecoderInputBuffer() 312 inputBufferIndex, 0, sampleSize, extractor.getSampleTime(), 0); in queueDecoderInputBuffer() 313 extractor.advance(); in queueDecoderInputBuffer() 366 extractor.setDataSource( in setExtractorDataSource() 464 if (extractor == null) { in extractorRelease() 468 extractor.release(); in extractorRelease() [all …]
|
D | MediaMetadataRetrieverTest.java | 705 MediaExtractor extractor = null; in testGetImage() local 780 extractor = new MediaExtractor(); in testGetImage() 781 extractor.setDataSource( in testGetImage() 783 MediaFormat format = extractor.getTrackFormat(0); in testGetImage() 799 if (extractor != null) { in testGetImage() 800 extractor.release(); in testGetImage()
|
D | AdaptivePlaybackTest.java | 1348 MediaExtractor extractor = new MediaExtractor(); 1350 extractor.setDataSource(testFd.getFileDescriptor(), testFd.getStartOffset(), 1354 extractor.getTrackFormat(0), extractor.getTrackFormat(0), numFrames); 1355 extractor.selectTrack(0); 1370 int sampleSize = extractor.readSampleData(readBuf, 0 /* offset */); 1395 extractor.getSampleTime(), 1396 extractor.getSampleFlags(), 1398 extractor.advance(); 1401 extractor.release();
|
D | HeifWriterTest.java | 638 MediaExtractor extractor = new MediaExtractor(); in verifyResult() local 639 extractor.setDataSource(filename); in verifyResult() 640 MediaFormat format = extractor.getTrackFormat(0); in verifyResult() 649 extractor.release(); in verifyResult()
|
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
D | MediaUtils.java | 617 MediaExtractor extractor = new MediaExtractor(); in getTrackFormatForResource() local 620 extractor.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getTrackFormatForResource() 624 return getTrackFormatForExtractor(extractor, mimeTypePrefix); in getTrackFormatForResource() 630 MediaExtractor extractor = getExtractorForPath(context, path); in getTrackFormatForPath() local 631 return getTrackFormatForExtractor(extractor, mimeTypePrefix); in getTrackFormatForPath() 635 MediaExtractor extractor, in getTrackFormatForExtractor() argument 639 for (trackIndex = 0; trackIndex < extractor.getTrackCount(); trackIndex++) { in getTrackFormatForExtractor() 640 MediaFormat trackMediaFormat = extractor.getTrackFormat(trackIndex); in getTrackFormatForExtractor() 646 extractor.release(); in getTrackFormatForExtractor() 657 MediaExtractor extractor = new MediaExtractor(); in createMediaExtractorForMimeType() local [all …]
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | MediaUtils.java | 708 MediaExtractor extractor = new MediaExtractor(); in getTrackFormatForResource() local 711 extractor.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getTrackFormatForResource() 715 return getTrackFormatForExtractor(extractor, mimeTypePrefix); in getTrackFormatForResource() 721 MediaExtractor extractor = getExtractorForPath(context, path); in getTrackFormatForPath() local 722 return getTrackFormatForExtractor(extractor, mimeTypePrefix); in getTrackFormatForPath() 726 MediaExtractor extractor, in getTrackFormatForExtractor() argument 730 for (trackIndex = 0; trackIndex < extractor.getTrackCount(); trackIndex++) { in getTrackFormatForExtractor() 731 MediaFormat trackMediaFormat = extractor.getTrackFormat(trackIndex); in getTrackFormatForExtractor() 737 extractor.release(); in getTrackFormatForExtractor() 748 MediaExtractor extractor = new MediaExtractor(); in createMediaExtractorForMimeType() local [all …]
|
/cts/tests/tests/media/libmediandkjni/ |
D | native-mediadrm-jni.cpp | 340 static void addTracks(const AMediaExtractor* extractor, in addTracks() argument 344 const_cast<AMediaExtractor*>(extractor)); in addTracks() 349 const_cast<AMediaExtractor*>(extractor), i); in addTracks() 363 const_cast<AMediaExtractor*>(extractor), i); in addTracks() 371 const_cast<AMediaExtractor*>(extractor), 0, in addTracks() 385 static void fillDecoder(AMediaCodec* codec, AMediaExtractor* extractor, in fillDecoder() argument 394 int sampleSize = AMediaExtractor_readSampleData(extractor, buf, bufsize); in fillDecoder() 400 *presentationTimeUs = AMediaExtractor_getSampleTime(extractor); in fillDecoder() 403 AMediaExtractor_getSampleCryptoInfo(extractor); in fillDecoder() 417 AMediaExtractor_advance(extractor); in fillDecoder()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
D | RVCVXCheckAnalyzer.java | 956 private MediaExtractor extractor=null; field in RVCVXCheckAnalyzer.VideoDecoderForOpenCV 1038 if (extractor!=null) { in teardown() 1039 extractor.release(); in teardown() 1040 extractor = null; in teardown() 1047 extractor = new MediaExtractor(); in setup() 1050 extractor.setDataSource(mVideoFile.getPath()); in setup() 1055 for (int i = 0; i < extractor.getTrackCount(); i++) { in setup() 1056 MediaFormat format = extractor.getTrackFormat(i); in setup() 1062 extractor.selectTrack(i); in setup() 1117 int sampleSize = extractor.readSampleData(buffer, 0); in run() [all …]
|
/cts/tests/camera/src/android/hardware/camera2/cts/ |
D | HeifWriterTest.java | 348 MediaExtractor extractor = new MediaExtractor(); in verifyResult() local 349 extractor.setDataSource(filename); in verifyResult() 350 MediaFormat format = extractor.getTrackFormat(0); in verifyResult() 359 extractor.release(); in verifyResult()
|
/cts/tests/media/ |
D | README.md | 2 Current folder comprises of files necessary for testing media extractor, media muxer, media codec S… 13 …t of components on which the tests are to be tried. Similarly for Media extractor and media muxer …
|