Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 2448763002: FFmpegDemuxer: Clear |extra_data| when enabling bitstream conversion. (Closed)
Patch Set: Restore variant used by fuzzertest. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test_base.cc
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index 5b50e9f23af325e70f9a7116552864e20f7216bf..72ecf7da6d873b13f336eb8ccae9da6345467096 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -130,7 +130,9 @@ void PipelineIntegrationTestBase::OnError(PipelineStatus status) {
PipelineStatus PipelineIntegrationTestBase::StartInternal(
std::unique_ptr<DataSource> data_source,
CdmContext* cdm_context,
- uint8_t test_type) {
+ uint8_t test_type,
+ ScopedVector<VideoDecoder> prepend_video_decoders,
+ ScopedVector<AudioDecoder> prepend_audio_decoders) {
hashing_enabled_ = test_type & kHashed;
clockless_playback_ = test_type & kClockless;
@@ -157,9 +159,11 @@ PipelineStatus PipelineIntegrationTestBase::StartInternal(
// media files are provided in advance.
EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0);
- pipeline_->Start(demuxer_.get(), CreateRenderer(), this,
- base::Bind(&PipelineIntegrationTestBase::OnStatusCallback,
- base::Unretained(this)));
+ pipeline_->Start(
+ demuxer_.get(), CreateRenderer(std::move(prepend_video_decoders),
+ std::move(prepend_audio_decoders)),
+ this, base::Bind(&PipelineIntegrationTestBase::OnStatusCallback,
+ base::Unretained(this)));
base::RunLoop().Run();
return pipeline_status_;
}
@@ -167,12 +171,16 @@ PipelineStatus PipelineIntegrationTestBase::StartInternal(
PipelineStatus PipelineIntegrationTestBase::StartWithFile(
const std::string& filename,
CdmContext* cdm_context,
- uint8_t test_type) {
+ uint8_t test_type,
+ ScopedVector<VideoDecoder> prepend_video_decoders,
+ ScopedVector<AudioDecoder> prepend_audio_decoders) {
std::unique_ptr<FileDataSource> file_data_source(new FileDataSource());
base::FilePath file_path(GetTestDataFilePath(filename));
CHECK(file_data_source->Initialize(file_path)) << "Is " << file_path.value()
<< " missing?";
- return StartInternal(std::move(file_data_source), cdm_context, test_type);
+ return StartInternal(std::move(file_data_source), cdm_context, test_type,
+ std::move(prepend_video_decoders),
+ std::move(prepend_audio_decoders));
}
PipelineStatus PipelineIntegrationTestBase::Start(const std::string& filename) {
@@ -184,9 +192,14 @@ PipelineStatus PipelineIntegrationTestBase::Start(const std::string& filename,
return StartWithFile(filename, cdm_context, kNormal);
}
-PipelineStatus PipelineIntegrationTestBase::Start(const std::string& filename,
- uint8_t test_type) {
- return StartWithFile(filename, nullptr, test_type);
+PipelineStatus PipelineIntegrationTestBase::Start(
+ const std::string& filename,
+ uint8_t test_type,
+ ScopedVector<VideoDecoder> prepend_video_decoders,
+ ScopedVector<AudioDecoder> prepend_audio_decoders) {
+ return StartWithFile(filename, nullptr, test_type,
+ std::move(prepend_video_decoders),
+ std::move(prepend_audio_decoders));
}
PipelineStatus PipelineIntegrationTestBase::Start(const uint8_t* data,
@@ -291,8 +304,10 @@ void PipelineIntegrationTestBase::CreateDemuxer(
#endif
}
-std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() {
- ScopedVector<VideoDecoder> video_decoders;
+std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer(
+ ScopedVector<VideoDecoder> prepend_video_decoders,
+ ScopedVector<AudioDecoder> prepend_audio_decoders) {
+ ScopedVector<VideoDecoder> video_decoders = std::move(prepend_video_decoders);
#if !defined(MEDIA_DISABLE_LIBVPX)
video_decoders.push_back(new VpxVideoDecoder());
#endif // !defined(MEDIA_DISABLE_LIBVPX)
@@ -315,7 +330,7 @@ std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() {
video_sink_.get(), std::move(video_decoders), false, nullptr,
new MediaLog()));
- ScopedVector<AudioDecoder> audio_decoders;
+ ScopedVector<AudioDecoder> audio_decoders = std::move(prepend_audio_decoders);
#if !defined(MEDIA_DISABLE_FFMPEG)
audio_decoders.push_back(
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698