/frameworks/av/media/libmediatranscoding/transcoder/tests/ |
D | VideoTrackTranscoderTests.cpp | 89 static int32_t getConfiguredBitrate(const std::shared_ptr<VideoTrackTranscoder>& transcoder) { in getConfiguredBitrate() argument 90 return transcoder->mConfiguredBitrate; in getConfiguredBitrate() 102 auto transcoder = VideoTrackTranscoder::create(callback); in TEST_F() local 105 EXPECT_EQ(transcoder->configure(mMediaSampleReader, mTrackIndex, mDestinationFormat), in TEST_F() 107 ASSERT_TRUE(transcoder->start()); in TEST_F() 111 transcoder->setSampleConsumer([&sampleCount, &eos](const std::shared_ptr<MediaSample>& sample) { in TEST_F() 147 auto transcoder = VideoTrackTranscoder::create(callback); in TEST_F() local 158 ASSERT_EQ(transcoder->configure(mMediaSampleReader, mTrackIndex, destFormat), AMEDIA_OK); in TEST_F() 159 ASSERT_TRUE(transcoder->start()); in TEST_F() 162 transcoder->stop(); in TEST_F() [all …]
|
D | TranscoderTestUtils.h | 87 void onTrackFormatAvailable(const MediaTrackTranscoder* transcoder __unused) { in onTrackFormatAvailable() 93 void onTrackFinished(const MediaTrackTranscoder* transcoder __unused) { in onTrackFinished() 99 virtual void onTrackStopped(const MediaTrackTranscoder* transcoder __unused) override { in onTrackStopped() 106 void onTrackError(const MediaTrackTranscoder* transcoder __unused, media_status_t status) { in onTrackError() 146 virtual void onFinished(const MediaTranscoder* transcoder __unused) override { in onFinished() 153 virtual void onError(const MediaTranscoder* transcoder __unused, in onError() 163 virtual void onProgressUpdate(const MediaTranscoder* transcoder __unused, in onProgressUpdate() 172 virtual void onHeartBeat(const MediaTranscoder* transcoder __unused) override { in onHeartBeat() 177 virtual void onCodecResourceLost(const MediaTranscoder* transcoder __unused, in onCodecResourceLost()
|
D | HdrTranscodeTests.cpp | 61 auto transcoder = MediaTranscoder::create(mCallbacks, -1 /*heartBeatIntervalUs*/); in transcode() local 62 EXPECT_NE(transcoder, nullptr); in transcode() 65 EXPECT_EQ(transcoder->configureSource(srcFd), AMEDIA_OK); in transcode() 68 std::vector<std::shared_ptr<AMediaFormat>> trackFormats = transcoder->getTrackFormats(); in transcode() 81 media_status_t status = transcoder->configureTrackFormat(i, format.get()); in transcode() 88 EXPECT_EQ(transcoder->configureDestination(dstFd), AMEDIA_OK); in transcode() 91 media_status_t startStatus = transcoder->start(); in transcode()
|
D | MediaTranscoderTests.cpp | 106 auto transcoder = MediaTranscoder::create(mCallbacks, heartBeatIntervalUs); in transcodeHelper() local 107 EXPECT_NE(transcoder, nullptr); in transcodeHelper() 110 EXPECT_EQ(transcoder->configureSource(srcFd), AMEDIA_OK); in transcodeHelper() 112 std::vector<std::shared_ptr<AMediaFormat>> trackFormats = transcoder->getTrackFormats(); in transcodeHelper() 117 EXPECT_EQ(transcoder->configureTrackFormat(i, format), AMEDIA_OK); in transcodeHelper() 132 EXPECT_EQ(transcoder->configureDestination(dstFd), AMEDIA_OK); in transcodeHelper() 134 media_status_t startStatus = transcoder->start(); in transcodeHelper() 145 transcoder->cancel(); in transcodeHelper() 151 transcoder->pause(&pausedState); in transcodeHelper()
|
D | PassthroughTrackTranscoderTests.cpp | 156 PassthroughTrackTranscoder transcoder{callback}; in TEST_F() local 163 EXPECT_EQ(transcoder.configure(mediaSampleReader, mTrackIndex, nullptr /* destinationFormat */), in TEST_F() 165 ASSERT_TRUE(transcoder.start()); in TEST_F() 170 transcoder.setSampleConsumer( in TEST_F()
|
D | README.md | 4 To run all transcoder unit tests, run the supplied script from this folder:
|
/frameworks/av/media/libmediatranscoding/transcoder/ |
D | MediaTranscoder.cpp | 145 void MediaTranscoder::onTrackFormatAvailable(const MediaTrackTranscoder* transcoder) { in onTrackFormatAvailable() argument 146 LOG(DEBUG) << "TrackTranscoder " << transcoder << " format available."; in onTrackFormatAvailable() 152 if (mTracksAdded.count(transcoder) > 0) { in onTrackFormatAvailable() 157 auto consumer = mSampleWriter->addTrack(transcoder->getOutputFormat()); in onTrackFormatAvailable() 169 MediaTrackTranscoder* mutableTranscoder = const_cast<MediaTrackTranscoder*>(transcoder); in onTrackFormatAvailable() 172 mTracksAdded.insert(transcoder); in onTrackFormatAvailable() 201 void MediaTranscoder::onTrackFinished(const MediaTrackTranscoder* transcoder) { in onTrackFinished() argument 202 LOG(DEBUG) << "TrackTranscoder " << transcoder << " finished"; in onTrackFinished() 203 onThreadFinished(static_cast<const void*>(transcoder), AMEDIA_OK, false /* stopped */); in onTrackFinished() 206 void MediaTranscoder::onTrackStopped(const MediaTrackTranscoder* transcoder) { in onTrackStopped() argument [all …]
|
D | VideoTrackTranscoder.cpp | 98 CodecWrapper(AMediaCodec* codec, const std::weak_ptr<VideoTrackTranscoder>& transcoder) in CodecWrapper() argument 99 : mCodec(codec), mTranscoder(transcoder), mCodecStarted(false) {} in CodecWrapper() 122 if (auto transcoder = wrapper->getTranscoder()) { in onAsyncInputAvailable() local 123 if (codec == transcoder->mDecoder) { in onAsyncInputAvailable() 124 transcoder->mCodecMessageQueue.push( in onAsyncInputAvailable() 125 [transcoder, index] { transcoder->enqueueInputSample(index); }); in onAsyncInputAvailable() 135 if (auto transcoder = wrapper->getTranscoder()) { in onAsyncOutputAvailable() local 136 transcoder->mCodecMessageQueue.push([transcoder, index, codec, bufferInfo] { in onAsyncOutputAvailable() 137 if (codec == transcoder->mDecoder) { in onAsyncOutputAvailable() 138 transcoder->transferBuffer(index, bufferInfo); in onAsyncOutputAvailable() [all …]
|
D | setloglevel.sh | 27 echo Setting transcoder log level to $level
|
/frameworks/av/media/libmediatranscoding/transcoder/tests/fuzzer/ |
D | media_transcoder_fuzzer.cpp | 69 virtual void onFinished(const MediaTranscoder* transcoder UNUSED_PARAM) override { in onFinished() 75 virtual void onError(const MediaTranscoder* transcoder UNUSED_PARAM, in onError() 82 virtual void onProgressUpdate(const MediaTranscoder* transcoder UNUSED_PARAM, in onProgressUpdate() 91 virtual void onHeartBeat(const MediaTranscoder* transcoder UNUSED_PARAM) override {} in onHeartBeat() 93 virtual void onCodecResourceLost(const MediaTranscoder* transcoder UNUSED_PARAM, in onCodecResourceLost() 161 auto transcoder = MediaTranscoder::create(mCallbacks); in invokeTranscoder() local 162 if (transcoder == nullptr) { in invokeTranscoder() 182 transcoder->configureSource(mSrcFd); in invokeTranscoder() 183 vector<shared_ptr<AMediaFormat>> trackFormats = transcoder->getTrackFormats(); in invokeTranscoder() 186 transcoder->configureTrackFormat(i, format); in invokeTranscoder() [all …]
|
D | README.md | 5 transcoder and tries to achieve the following: 30 The plugin feeds the entire input data to the transcoder.
|
/frameworks/av/media/libmediatranscoding/transcoder/include/media/ |
D | MediaTranscoder.h | 45 virtual void onFinished(const MediaTranscoder* transcoder) = 0; 48 virtual void onError(const MediaTranscoder* transcoder, media_status_t error) = 0; 51 virtual void onProgressUpdate(const MediaTranscoder* transcoder, int32_t progress) = 0; 54 virtual void onHeartBeat(const MediaTranscoder* transcoder) = 0; 64 const MediaTranscoder* transcoder, 130 virtual void onTrackFormatAvailable(const MediaTrackTranscoder* transcoder) override; 131 virtual void onTrackFinished(const MediaTrackTranscoder* transcoder) override; 132 virtual void onTrackStopped(const MediaTrackTranscoder* transcoder) override; 133 virtual void onTrackError(const MediaTrackTranscoder* transcoder,
|
D | MediaTrackTranscoderCallback.h | 33 virtual void onTrackFormatAvailable(const MediaTrackTranscoder* transcoder); 39 virtual void onTrackFinished(const MediaTrackTranscoder* transcoder); 45 virtual void onTrackStopped(const MediaTrackTranscoder* transcoder); 52 virtual void onTrackError(const MediaTrackTranscoder* transcoder, media_status_t status);
|
/frameworks/av/media/libmediatranscoding/transcoder/benchmark/ |
D | MediaTrackTranscoderBenchmark.cpp | 56 virtual void onTrackFormatAvailable(const MediaTrackTranscoder* transcoder __unused) override {} in onTrackFormatAvailable() 58 virtual void onTrackFinished(const MediaTrackTranscoder* transcoder __unused) override { in onTrackFinished() 64 virtual void onTrackStopped(const MediaTrackTranscoder* transcoder __unused) override { in onTrackStopped() 70 virtual void onTrackError(const MediaTrackTranscoder* transcoder __unused, in onTrackError() 281 static void ConfigureEmptySampleConsumer(const std::shared_ptr<MediaTrackTranscoder>& transcoder, in ConfigureEmptySampleConsumer() argument 283 transcoder->setSampleConsumer([&sampleCount](const std::shared_ptr<MediaSample>& sample) { in ConfigureEmptySampleConsumer() 300 static bool ConfigureSampleReader(const std::shared_ptr<MediaTrackTranscoder>& transcoder, in ConfigureSampleReader() argument 337 status = transcoder->configure(sampleReader, srcTrackIndex, destinationFormat); in ConfigureSampleReader() 355 std::shared_ptr<MediaTrackTranscoder> transcoder; in BenchmarkTranscoder() local 358 transcoder = VideoTrackTranscoder::create(callbacks); in BenchmarkTranscoder() [all …]
|
D | MediaTranscoderBenchmark.cpp | 46 virtual void onFinished(const MediaTranscoder* transcoder __unused) override { in onFinished() 52 virtual void onError(const MediaTranscoder* transcoder __unused, in onError() 60 virtual void onProgressUpdate(const MediaTranscoder* transcoder __unused, in onProgressUpdate() 63 virtual void onHeartBeat(const MediaTranscoder* transcoder __unused) override {} in onHeartBeat() 65 virtual void onCodecResourceLost(const MediaTranscoder* transcoder __unused, in onCodecResourceLost() 145 auto transcoder = MediaTranscoder::create(callbacks); in TranscodeMediaFile() local 147 status = transcoder->configureSource(srcFd); in TranscodeMediaFile() 153 status = transcoder->configureDestination(dstFd); in TranscodeMediaFile() 159 std::vector<std::shared_ptr<AMediaFormat>> trackFormats = transcoder->getTrackFormats(); in TranscodeMediaFile() 189 status = transcoder->configureTrackFormat(i, dstFormat); in TranscodeMediaFile() [all …]
|
/frameworks/av/media/libmediatranscoding/transcoder/tools/ |
D | Transcode.cpp | 82 auto transcoder = MediaTranscoder::create(callbacks, -1 /*heartBeatIntervalUs*/); in transcode() local 90 media_status_t status = transcoder->configureSource(srcFd); in transcode() 97 std::vector<std::shared_ptr<AMediaFormat>> trackFormats = transcoder->getTrackFormats(); in transcode() 118 status = transcoder->configureTrackFormat(i, dstFormat); in transcode() 137 status = transcoder->configureDestination(dstFd); in transcode() 144 status = transcoder->start(); in transcode()
|
/frameworks/av/services/mediatranscoding/tests/ |
D | README.txt | 2 Tests media transcoding service with simulated transcoder. 5 Tests media transcoding service with real transcoder. Uses the same test assets
|
D | Android.bp | 49 // MediaTranscodingService unit test using simulated transcoder 57 // MediaTranscodingService unit test using real transcoder
|
/frameworks/av/media/libmediatranscoding/ |
D | build_and_run_all_unit_tests.sh | 28 pushd transcoder/tests/
|
D | TranscoderWrapper.cpp | 142 virtual void onFinished(const MediaTranscoder* transcoder __unused) override { in onFinished() 149 virtual void onError(const MediaTranscoder* transcoder __unused, in onError() 157 virtual void onProgressUpdate(const MediaTranscoder* transcoder __unused, in onProgressUpdate() 165 virtual void onHeartBeat(const MediaTranscoder* transcoder __unused) override { in onHeartBeat() 172 virtual void onCodecResourceLost(const MediaTranscoder* transcoder __unused, in onCodecResourceLost()
|