Lines Matching refs:testExtractor
65 static bool isMediaSimilar(AMediaExtractor* refExtractor, AMediaExtractor* testExtractor, in isMediaSimilar() argument
80 for (size_t testTrackID = 0; testTrackID < AMediaExtractor_getTrackCount(testExtractor); in isMediaSimilar()
82 AMediaFormat* testFormat = AMediaExtractor_getTrackFormat(testExtractor, testTrackID); in isMediaSimilar()
88 AMediaExtractor_selectTrack(testExtractor, testTrackID); in isMediaSimilar()
94 setSampleInfo(testExtractor, &testSampleInfo); in isMediaSimilar()
113 AMediaExtractor_readSampleData(testExtractor, testBuffer, maxSampleSize); in isMediaSimilar()
127 trackIndex = AMediaExtractor_getSampleTrackIndex(testExtractor); in isMediaSimilar()
140 bool haveTestSamples = AMediaExtractor_advance(testExtractor); in isMediaSimilar()
152 if (!haveTestSamples && !isExtractorOKonEOS(testExtractor)) { in isMediaSimilar()
164 AMediaExtractor_unselectTrack(testExtractor, testTrackID); in isMediaSimilar()
453 static bool isFileFormatIdentical(AMediaExtractor* refExtractor, AMediaExtractor* testExtractor) { in isFileFormatIdentical() argument
455 if (refExtractor && testExtractor) { in isFileFormatIdentical()
457 AMediaFormat* testFormat = AMediaExtractor_getFileFormat(testExtractor); in isFileFormatIdentical()
477 static bool isSeekOk(AMediaExtractor* refExtractor, AMediaExtractor* testExtractor) { in isSeekOk() argument
485 AMediaExtractor_selectTrack(testExtractor, trackID); in isSeekOk()
492 AMediaExtractor_seekTo(testExtractor, pts, (SeekMode)mode); in isSeekOk()
494 setSampleInfo(testExtractor, &testSampleInfo); in isSeekOk()
503 int testTrackIdx = AMediaExtractor_getSampleTrackIndex(testExtractor); in isSeekOk()
511 AMediaExtractor_unselectTrack(testExtractor, trackID); in isSeekOk()
660 AMediaExtractor* testExtractor = createExtractorFromFD(testFp); in nativeTestExtract() local
661 if (srcExtractor && testExtractor) { in nativeTestExtract()
662 isPass = isMediaSimilar(srcExtractor, testExtractor, cMediaType); in nativeTestExtract()
667 AMediaExtractor_delete(testExtractor); in nativeTestExtract()
819 AMediaExtractor* testExtractor = nullptr; in nativeTestDataSource() local
820 if (createExtractorFromUrl(env, nullptr, nullptr, &testExtractor, &dataSource, csrcUrl)) { in nativeTestDataSource()
821 isPass &= validateCachedDuration(testExtractor, true); in nativeTestDataSource()
822 if (!(isMediaSimilar(refExtractor, testExtractor, nullptr) && in nativeTestDataSource()
823 isFileFormatIdentical(refExtractor, testExtractor) && in nativeTestDataSource()
824 isSeekOk(refExtractor, testExtractor))) { in nativeTestDataSource()
828 if (testExtractor) AMediaExtractor_delete(testExtractor); in nativeTestDataSource()
832 testExtractor = createExtractorFromFD(testFp); in nativeTestDataSource()
833 if (testExtractor == nullptr) { in nativeTestDataSource()
837 isPass &= validateCachedDuration(testExtractor, false); in nativeTestDataSource()
838 if (!(isMediaSimilar(refExtractor, testExtractor, nullptr) && in nativeTestDataSource()
839 isFileFormatIdentical(refExtractor, testExtractor) && in nativeTestDataSource()
840 isSeekOk(refExtractor, testExtractor))) { in nativeTestDataSource()
844 if (testExtractor) AMediaExtractor_delete(testExtractor); in nativeTestDataSource()