Lines Matching refs:muxer
79 bool registerTrack(AMediaMuxer* muxer);
81 bool insertSampleData(AMediaMuxer* muxer);
83 bool writeAFewSamplesData(AMediaMuxer* muxer, uint32_t fromIndex, uint32_t toIndex);
85 bool writeAFewSamplesDataFromTime(AMediaMuxer* muxer, int64_t* fromTime, uint32_t numSamples,
88 bool muxMedia(AMediaMuxer* muxer);
90 bool appendMedia(AMediaMuxer *muxer, uint32_t fromIndex, uint32_t toIndex);
92 bool appendMediaFromTime(AMediaMuxer *muxer, int64_t *appendFromTime,
95 bool combineMedias(AMediaMuxer* muxer, MuxerNativeTestHelper* that, const int* repeater);
216 bool MuxerNativeTestHelper::registerTrack(AMediaMuxer* muxer) { in registerTrack() argument
218 int dstIndex = AMediaMuxer_addTrack(muxer, mFormat[trackID]); in registerTrack()
225 bool MuxerNativeTestHelper::insertSampleData(AMediaMuxer* muxer) { in insertSampleData() argument
231 if (AMediaMuxer_writeSampleData(muxer, mOutIndexMap.at(index), mBuffer, info) != in insertSampleData()
244 bool MuxerNativeTestHelper::writeAFewSamplesData(AMediaMuxer* muxer, uint32_t fromIndex, in writeAFewSamplesData() argument
268 if (AMediaMuxer_writeSampleData(muxer, mOutIndexMap.at(trackIndex), mBuffer, info) != in writeAFewSamplesData()
284 bool MuxerNativeTestHelper::writeAFewSamplesDataFromTime(AMediaMuxer* muxer, int64_t* fromTime, in writeAFewSamplesDataFromTime() argument
306 if (AMediaMuxer_writeSampleData(muxer, mOutIndexMap.at(trackIndex), mBuffer, info) != in writeAFewSamplesDataFromTime()
321 bool MuxerNativeTestHelper::muxMedia(AMediaMuxer* muxer) { in muxMedia() argument
322 return (registerTrack(muxer) && (AMediaMuxer_start(muxer) == AMEDIA_OK) && in muxMedia()
323 insertSampleData(muxer) && (AMediaMuxer_stop(muxer) == AMEDIA_OK)); in muxMedia()
326 bool MuxerNativeTestHelper::appendMedia(AMediaMuxer *muxer, uint32_t fromIndex, uint32_t toIndex) { in appendMedia() argument
330 registerTrack(muxer); in appendMedia()
332 size_t trackCount = AMediaMuxer_getTrackCount(muxer); in appendMedia()
336 ALOGV("%s", AMediaFormat_toString(AMediaMuxer_getTrackFormat(muxer, i))); in appendMedia()
340 AMediaFormat_getString(AMediaMuxer_getTrackFormat(muxer, i), in appendMedia()
352 AMediaMuxer_start(muxer); in appendMedia()
353 bool res = writeAFewSamplesData(muxer, fromIndex, toIndex); in appendMedia()
354 AMediaMuxer_stop(muxer); in appendMedia()
361 bool MuxerNativeTestHelper::appendMediaFromTime(AMediaMuxer *muxer, int64_t *appendFromTime, in appendMediaFromTime() argument
364 size_t trackCount = AMediaMuxer_getTrackCount(muxer); in appendMediaFromTime()
368 ALOGV("%s", AMediaFormat_toString(AMediaMuxer_getTrackFormat(muxer, i))); in appendMediaFromTime()
372 AMediaFormat_getString(AMediaMuxer_getTrackFormat(muxer, i), in appendMediaFromTime()
383 AMediaMuxer_start(muxer); in appendMediaFromTime()
384 bool res = writeAFewSamplesDataFromTime(muxer, appendFromTime, numSamples, lastSplit); in appendMediaFromTime()
385 AMediaMuxer_stop(muxer); in appendMediaFromTime()
391 bool MuxerNativeTestHelper::combineMedias(AMediaMuxer* muxer, MuxerNativeTestHelper* that, in combineMedias() argument
403 int dstIndex = AMediaMuxer_addTrack(muxer, format); in combineMedias()
410 if (AMediaMuxer_start(muxer) != AMEDIA_OK) return false; in combineMedias()
419 if (AMediaMuxer_writeSampleData(muxer, outIndexMap[idx], group[k]->mBuffer, in combineMedias()
431 return (AMediaMuxer_stop(muxer) == AMEDIA_OK); in combineMedias()
561 AMediaMuxer* muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)jformat); in nativeTestSetLocation() local
562 media_status_t status = AMediaMuxer_setLocation(muxer, tooFarNorth, atlanticLong); in nativeTestSetLocation()
567 status = AMediaMuxer_setLocation(muxer, tooFarSouth, atlanticLong); in nativeTestSetLocation()
572 status = AMediaMuxer_setLocation(muxer, atlanticLat, tooFarWest); in nativeTestSetLocation()
577 status = AMediaMuxer_setLocation(muxer, atlanticLat, tooFarEast); in nativeTestSetLocation()
582 status = AMediaMuxer_setLocation(muxer, tooFarNorth, tooFarWest); in nativeTestSetLocation()
587 status = AMediaMuxer_setLocation(muxer, atlanticLat, atlanticLong); in nativeTestSetLocation()
590 status = AMediaMuxer_setLocation(muxer, annapurnaLat, annapurnaLong); in nativeTestSetLocation()
601 if (mediaInfo->registerTrack(muxer) && AMediaMuxer_start(muxer) == AMEDIA_OK) { in nativeTestSetLocation()
602 status = AMediaMuxer_setLocation(muxer, atlanticLat, atlanticLong); in nativeTestSetLocation()
607 if (mediaInfo->insertSampleData(muxer) && AMediaMuxer_stop(muxer) == AMEDIA_OK) { in nativeTestSetLocation()
608 status = AMediaMuxer_setLocation(muxer, atlanticLat, atlanticLong); in nativeTestSetLocation()
623 AMediaMuxer_delete(muxer); in nativeTestSetLocation()
646 AMediaMuxer* muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)jformat); in nativeTestSetOrientationHint() local
649 status = AMediaMuxer_setOrientationHint(muxer, degrees); in nativeTestSetOrientationHint()
655 status = AMediaMuxer_setOrientationHint(muxer, oldRotation); in nativeTestSetOrientationHint()
658 status = AMediaMuxer_setOrientationHint(muxer, currRotation); in nativeTestSetOrientationHint()
669 if (mediaInfo->registerTrack(muxer) && AMediaMuxer_start(muxer) == AMEDIA_OK) { in nativeTestSetOrientationHint()
670 status = AMediaMuxer_setOrientationHint(muxer, currRotation); in nativeTestSetOrientationHint()
675 if (mediaInfo->insertSampleData(muxer) && AMediaMuxer_stop(muxer) == AMEDIA_OK) { in nativeTestSetOrientationHint()
676 status = AMediaMuxer_setOrientationHint(muxer, currRotation); in nativeTestSetOrientationHint()
691 AMediaMuxer_delete(muxer); in nativeTestSetOrientationHint()
716 AMediaMuxer* muxer = AMediaMuxer_new(fileno(rfp), (OutputFormat)jformat); in nativeTestMultiTrack() local
717 bool muxStatus = mediaInfoA->combineMedias(muxer, mediaInfoB, numTracks[0]); in nativeTestMultiTrack()
718 AMediaMuxer_delete(muxer); in nativeTestMultiTrack()
731 muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)jformat); in nativeTestMultiTrack()
733 mediaInfoA->combineMedias(muxer, mediaInfoB, numTracks[i]); in nativeTestMultiTrack()
734 AMediaMuxer_delete(muxer); in nativeTestMultiTrack()
810 AMediaMuxer* muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)format); in nativeTestOffsetPts() local
811 mediaInfo->muxMedia(muxer); in nativeTestOffsetPts()
812 AMediaMuxer_delete(muxer); in nativeTestOffsetPts()
873 AMediaMuxer* muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)fmt); in nativeTestSimpleMux() local
874 bool muxStatus = mediaInfo->muxMedia(muxer); in nativeTestSimpleMux()
876 AMediaMuxer_delete(muxer); in nativeTestSimpleMux()
918 AMediaMuxer *muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)jformat); in nativeTestGetTrackCount() local
919 if (muxer) { in nativeTestGetTrackCount()
921 if (!mediaInfo->registerTrack(muxer)) { in nativeTestGetTrackCount()
925 if (AMediaMuxer_getTrackCount(muxer) != jtrackCount) { in nativeTestGetTrackCount()
930 AMediaMuxer_delete(muxer); in nativeTestGetTrackCount()
961 AMediaMuxer *muxer = AMediaMuxer_append(fileno(ofp), (AppendMode)mode); in nativeTestAppendGetTrackCount() local
962 if (muxer) { in nativeTestAppendGetTrackCount()
963 ssize_t trackCount = AMediaMuxer_getTrackCount(muxer); in nativeTestAppendGetTrackCount()
969 AMediaMuxer_delete(muxer); in nativeTestAppendGetTrackCount()
998 AMediaMuxer *muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)joutFormat); in nativeTestGetTrackFormat() local
999 if (muxer) { in nativeTestGetTrackFormat()
1001 if (!mediaInfo->registerTrack(muxer)) { in nativeTestGetTrackFormat()
1007 AMediaMuxer_getTrackFormat(muxer, i))) { in nativeTestGetTrackFormat()
1013 AMediaMuxer_delete(muxer); in nativeTestGetTrackFormat()
1043 AMediaMuxer *muxer = AMediaMuxer_append(fileno(ofp), (AppendMode)mode); in nativeTestAppendGetTrackFormat() local
1044 if (muxer) { in nativeTestAppendGetTrackFormat()
1048 AMediaMuxer_getTrackFormat(muxer, i))) { in nativeTestAppendGetTrackFormat()
1054 AMediaMuxer_delete(muxer); in nativeTestAppendGetTrackFormat()
1091 AMediaMuxer *muxer = nullptr; in nativeTestSimpleAppend() local
1095 muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)joutFormat); in nativeTestSimpleAppend()
1096 if (muxer) { in nativeTestSimpleAppend()
1101 mediaInfo->appendMedia(muxer, 0, (totalSampleCount/numSplits)-1); in nativeTestSimpleAppend()
1102 AMediaMuxer_delete(muxer); in nativeTestSimpleAppend()
1125 muxer = AMediaMuxer_append(fileno(ofp), AMEDIAMUXER_APPEND_TO_EXISTING_DATA); in nativeTestSimpleAppend()
1126 if (muxer) { in nativeTestSimpleAppend()
1127 ssize_t trackCount = AMediaMuxer_getTrackCount(muxer); in nativeTestSimpleAppend()
1131 AMediaFormat* format = AMediaMuxer_getTrackFormat(muxer, tc); in nativeTestSimpleAppend()
1139 mediaInfo->appendMedia(muxer, totalSampleCount*curSplit/numSplits, in nativeTestSimpleAppend()
1145 AMediaMuxer_delete(muxer); in nativeTestSimpleAppend()
1191 AMediaMuxer *muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat) joutFormat); in nativeTestNoSamples() local
1192 mediaInfo->muxMedia(muxer); in nativeTestNoSamples()
1193 AMediaMuxer_delete(muxer); in nativeTestNoSamples()
1208 AMediaMuxer *muxer = AMediaMuxer_append(fileno(ofp), (AppendMode)mode); in nativeTestNoSamples() local
1209 if (muxer) { in nativeTestNoSamples()
1210 AMediaMuxer_start(muxer); in nativeTestNoSamples()
1211 AMediaMuxer_stop(muxer); in nativeTestNoSamples()
1213 AMediaMuxer_delete(muxer); in nativeTestNoSamples()
1257 AMediaMuxer *muxer = nullptr; in nativeTestIgnoreLastGOPAppend() local
1261 muxer = AMediaMuxer_new(fileno(ofp), (OutputFormat)joutFormat); in nativeTestIgnoreLastGOPAppend()
1262 if (muxer) { in nativeTestIgnoreLastGOPAppend()
1267 mediaInfo->appendMedia(muxer, 0, (totalSampleCount/numSplits)-1); in nativeTestIgnoreLastGOPAppend()
1269 AMediaMuxer_delete(muxer); in nativeTestIgnoreLastGOPAppend()
1292 muxer = AMediaMuxer_append(fileno(ofp), in nativeTestIgnoreLastGOPAppend()
1294 if (muxer) { in nativeTestIgnoreLastGOPAppend()
1295 auto trackCount = AMediaMuxer_getTrackCount(muxer); in nativeTestIgnoreLastGOPAppend()
1300 AMediaFormat* format = AMediaMuxer_getTrackFormat(muxer, tc); in nativeTestIgnoreLastGOPAppend()
1310 mediaInfo->appendMediaFromTime(muxer, appendFromTime, in nativeTestIgnoreLastGOPAppend()
1317 AMediaMuxer_delete(muxer); in nativeTestIgnoreLastGOPAppend()