Lines Matching refs:extractor
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()
60 AMediaExtractor_selectTrack(extractor, AMediaExtractor_getTrackCount(extractor))) { in nativeTestSelectTrackForInvalidIndex()
64 AMediaExtractor_getTrackCount(extractor)); in nativeTestSelectTrackForInvalidIndex()
67 AMediaExtractor_delete(extractor); in nativeTestSelectTrackForInvalidIndex()
76 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestIdempotentSelectTrack() local
78 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestIdempotentSelectTrack()
79 isPass = AMediaExtractor_selectTrack(extractor, 0) == AMEDIA_OK; in nativeTestIdempotentSelectTrack()
80 isPass &= AMediaExtractor_selectTrack(extractor, 0) == AMEDIA_OK; in nativeTestIdempotentSelectTrack()
83 AMediaExtractor_delete(extractor); in nativeTestIdempotentSelectTrack()
90 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestUnselectTrackBeforeSetDataSource() local
91 bool isPass = (AMEDIA_OK != AMediaExtractor_unselectTrack(extractor, 0)); in nativeTestUnselectTrackBeforeSetDataSource()
93 AMediaExtractor_delete(extractor); in nativeTestUnselectTrackBeforeSetDataSource()
100 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestUnselectTrackForInvalidIndex() local
102 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestUnselectTrackForInvalidIndex()
104 AMediaExtractor_unselectTrack(extractor, AMediaExtractor_getTrackCount(extractor))) { in nativeTestUnselectTrackForInvalidIndex()
108 AMediaExtractor_getTrackCount(extractor)); in nativeTestUnselectTrackForInvalidIndex()
111 AMediaExtractor_delete(extractor); in nativeTestUnselectTrackForInvalidIndex()
121 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestUnselectTrackForUnSelectedTrackIndex() local
123 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestUnselectTrackForUnSelectedTrackIndex()
124 isPass = (AMediaExtractor_unselectTrack(extractor, 0) == AMEDIA_OK); in nativeTestUnselectTrackForUnSelectedTrackIndex()
127 AMediaExtractor_delete(extractor); in nativeTestUnselectTrackForUnSelectedTrackIndex()
136 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestIdempotentUnselectTrack() local
138 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestIdempotentUnselectTrack()
139 isPass = AMediaExtractor_selectTrack(extractor, 0) == AMEDIA_OK; in nativeTestIdempotentUnselectTrack()
141 isPass = AMediaExtractor_unselectTrack(extractor, 0) == AMEDIA_OK; in nativeTestIdempotentUnselectTrack()
142 isPass &= AMediaExtractor_unselectTrack(extractor, 0) == AMEDIA_OK; in nativeTestIdempotentUnselectTrack()
148 AMediaExtractor_delete(extractor); in nativeTestIdempotentUnselectTrack()
155 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestSeekToBeforeSetDataSource() local
156 bool isPass = AMediaExtractor_seekTo(extractor, 0, AMEDIAEXTRACTOR_SEEK_NEXT_SYNC) != AMEDIA_OK; in nativeTestSeekToBeforeSetDataSource()
158 AMediaExtractor_delete(extractor); in nativeTestSeekToBeforeSetDataSource()
165 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestSeekToBeforeSelectTrack() local
167 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestSeekToBeforeSelectTrack()
168 isPass = AMediaExtractor_seekTo(extractor, 0, AMEDIAEXTRACTOR_SEEK_NEXT_SYNC) != AMEDIA_OK; in nativeTestSeekToBeforeSelectTrack()
171 AMediaExtractor_delete(extractor); in nativeTestSeekToBeforeSelectTrack()
178 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetCachedDurationBeforeSetDataSource() local
179 bool isPass = AMediaExtractor_getCachedDuration(extractor) == -1; in nativeTestGetCachedDurationBeforeSetDataSource()
181 AMediaExtractor_delete(extractor); in nativeTestGetCachedDurationBeforeSetDataSource()
186 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestIfGetFileFormatSucceedsBeforeSetDataSource() local
188 AMediaFormat* format = AMediaExtractor_getFileFormat(extractor); in nativeTestIfGetFileFormatSucceedsBeforeSetDataSource()
197 AMediaExtractor_delete(extractor); in nativeTestIfGetFileFormatSucceedsBeforeSetDataSource()
202 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestAdvanceBeforeSetDataSource() local
203 bool isPass = !AMediaExtractor_advance(extractor); in nativeTestAdvanceBeforeSetDataSource()
205 AMediaExtractor_delete(extractor); in nativeTestAdvanceBeforeSetDataSource()
212 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestAdvanceBeforeSelectTrack() local
214 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestAdvanceBeforeSelectTrack()
215 isPass = !AMediaExtractor_advance(extractor); in nativeTestAdvanceBeforeSelectTrack()
218 AMediaExtractor_delete(extractor); in nativeTestAdvanceBeforeSelectTrack()
225 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetSampleFlagsBeforeSetDataSource() local
226 bool isPass = AMediaExtractor_getSampleFlags(extractor) == -1; in nativeTestGetSampleFlagsBeforeSetDataSource()
228 AMediaExtractor_delete(extractor); in nativeTestGetSampleFlagsBeforeSetDataSource()
235 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetSampleFlagsBeforeSelectTrack() local
237 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestGetSampleFlagsBeforeSelectTrack()
238 isPass = AMediaExtractor_getSampleFlags(extractor) == -1; in nativeTestGetSampleFlagsBeforeSelectTrack()
241 AMediaExtractor_delete(extractor); in nativeTestGetSampleFlagsBeforeSelectTrack()
248 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetSampleTimeBeforeSetDataSource() local
249 bool isPass = AMediaExtractor_getSampleTime(extractor) == -1; in nativeTestGetSampleTimeBeforeSetDataSource()
251 AMediaExtractor_delete(extractor); in nativeTestGetSampleTimeBeforeSetDataSource()
257 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetSampleTimeBeforeSelectTrack() local
260 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestGetSampleTimeBeforeSelectTrack()
261 isPass = AMediaExtractor_getSampleTime(extractor) == -1; in nativeTestGetSampleTimeBeforeSelectTrack()
264 AMediaExtractor_delete(extractor); in nativeTestGetSampleTimeBeforeSelectTrack()
271 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetSampleSizeBeforeSetDataSource() local
272 bool isPass = AMediaExtractor_getSampleSize(extractor) == -1; in nativeTestGetSampleSizeBeforeSetDataSource()
274 AMediaExtractor_delete(extractor); in nativeTestGetSampleSizeBeforeSetDataSource()
281 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetSampleSizeBeforeSelectTrack() local
283 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestGetSampleSizeBeforeSelectTrack()
284 isPass = AMediaExtractor_getSampleSize(extractor) == -1; in nativeTestGetSampleSizeBeforeSelectTrack()
287 AMediaExtractor_delete(extractor); in nativeTestGetSampleSizeBeforeSelectTrack()
294 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestIfGetSampleFormatBeforeSetDataSource() local
296 bool isPass = AMediaExtractor_getSampleFormat(extractor, format) != AMEDIA_OK; in nativeTestIfGetSampleFormatBeforeSetDataSource()
299 AMediaExtractor_delete(extractor); in nativeTestIfGetSampleFormatBeforeSetDataSource()
307 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestIfGetSampleFormatBeforeSelectTrack() local
310 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestIfGetSampleFormatBeforeSelectTrack()
311 isPass = AMediaExtractor_getSampleFormat(extractor, format) != AMEDIA_OK; in nativeTestIfGetSampleFormatBeforeSelectTrack()
315 AMediaExtractor_delete(extractor); in nativeTestIfGetSampleFormatBeforeSelectTrack()
326 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestVideoSampleFileOffsetByGetSampleFormat() local
329 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestVideoSampleFileOffsetByGetSampleFormat()
330 if (AMEDIA_OK == AMediaExtractor_selectTrack(extractor, 0 /* video */)) { in nativeTestVideoSampleFileOffsetByGetSampleFormat()
332 if (AMEDIA_OK == AMediaExtractor_getSampleFormat(extractor, format)) { in nativeTestVideoSampleFileOffsetByGetSampleFormat()
348 AMediaExtractor_advance(extractor); in nativeTestVideoSampleFileOffsetByGetSampleFormat()
352 AMediaExtractor_delete(extractor); in nativeTestVideoSampleFileOffsetByGetSampleFormat()
364 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestAudioSampleFileOffsetByGetSampleFormat() local
367 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestAudioSampleFileOffsetByGetSampleFormat()
368 if (AMEDIA_OK == AMediaExtractor_selectTrack(extractor, 1 /* audio */)) { in nativeTestAudioSampleFileOffsetByGetSampleFormat()
370 if (AMEDIA_OK == AMediaExtractor_getSampleFormat(extractor, format)) { in nativeTestAudioSampleFileOffsetByGetSampleFormat()
386 AMediaExtractor_advance(extractor); in nativeTestAudioSampleFileOffsetByGetSampleFormat()
390 AMediaExtractor_delete(extractor); in nativeTestAudioSampleFileOffsetByGetSampleFormat()
398 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetSampleTrackIndexBeforeSetDataSource() local
399 bool isPass = AMediaExtractor_getSampleTrackIndex(extractor) == -1; in nativeTestGetSampleTrackIndexBeforeSetDataSource()
401 AMediaExtractor_delete(extractor); in nativeTestGetSampleTrackIndexBeforeSetDataSource()
408 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetSampleTrackIndexBeforeSelectTrack() local
411 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestGetSampleTrackIndexBeforeSelectTrack()
412 isPass = AMediaExtractor_getSampleTrackIndex(extractor) == -1; in nativeTestGetSampleTrackIndexBeforeSelectTrack()
415 AMediaExtractor_delete(extractor); in nativeTestGetSampleTrackIndexBeforeSelectTrack()
423 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetTrackFormatBeforeSetDataSource() local
425 AMediaFormat* format = AMediaExtractor_getTrackFormat(extractor, 0); in nativeTestGetTrackFormatBeforeSetDataSource()
433 AMediaExtractor_delete(extractor); in nativeTestGetTrackFormatBeforeSetDataSource()
440 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestGetTrackFormatForInvalidIndex() local
442 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestGetTrackFormatForInvalidIndex()
444 AMediaExtractor_getTrackFormat(extractor, AMediaExtractor_getTrackCount(extractor)); in nativeTestGetTrackFormatForInvalidIndex()
450 AMediaExtractor_getTrackCount(extractor)); in nativeTestGetTrackFormatForInvalidIndex()
457 AMediaExtractor_delete(extractor); in nativeTestGetTrackFormatForInvalidIndex()
464 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestReadSampleDataBeforeSetDataSource() local
467 bool isPass = AMediaExtractor_readSampleData(extractor, buffer, maxSampleSize) < 0; in nativeTestReadSampleDataBeforeSetDataSource()
470 AMediaExtractor_delete(extractor); in nativeTestReadSampleDataBeforeSetDataSource()
477 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestReadSampleDataBeforeSelectTrack() local
481 if (AMEDIA_OK == setExtractorDataSource(extractor, srcFp)) { in nativeTestReadSampleDataBeforeSelectTrack()
482 isPass = AMediaExtractor_readSampleData(extractor, buffer, maxSampleSize) < 0; in nativeTestReadSampleDataBeforeSelectTrack()
488 AMediaExtractor_delete(extractor); in nativeTestReadSampleDataBeforeSelectTrack()
495 AMediaExtractor* extractor = AMediaExtractor_new(); in nativeTestIfNullLocationIsRejectedBySetDataSource() local
496 bool isPass = AMediaExtractor_setDataSource(extractor, nullptr) != AMEDIA_OK; in nativeTestIfNullLocationIsRejectedBySetDataSource()
498 AMediaExtractor_delete(extractor); in nativeTestIfNullLocationIsRejectedBySetDataSource()