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

Unified Diff: media/filters/pipeline_integration_test_base.cc

Issue 511323003: media: Remove FilterCollection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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/filters/pipeline_integration_test_base.h ('k') | media/filters/renderer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test_base.cc
diff --git a/media/filters/pipeline_integration_test_base.cc b/media/filters/pipeline_integration_test_base.cc
index 039a3d89ee05bbee69c8a0436ac68a803feeff10..420db91a7d098d763739dfea371a9f5e527f26c0 100644
--- a/media/filters/pipeline_integration_test_base.cc
+++ b/media/filters/pipeline_integration_test_base.cc
@@ -110,8 +110,10 @@ bool PipelineIntegrationTestBase::Start(const base::FilePath& file_path,
.WillRepeatedly(SaveArg<0>(&metadata_));
EXPECT_CALL(*this, OnBufferingStateChanged(BUFFERING_HAVE_ENOUGH))
.Times(AtMost(1));
+ CreateDemuxer(file_path);
pipeline_->Start(
- CreateFilterCollection(file_path, NULL),
+ demuxer_.get(),
+ CreateRenderer(NULL),
base::Bind(&PipelineIntegrationTestBase::OnEnded, base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnError, base::Unretained(this)),
QuitOnStatusCB(expected_status),
@@ -119,7 +121,9 @@ bool PipelineIntegrationTestBase::Start(const base::FilePath& file_path,
base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnBufferingStateChanged,
base::Unretained(this)),
- base::Closure());
+ base::Closure(),
+ base::Bind(&PipelineIntegrationTestBase::OnAddTextTrack,
+ base::Unretained(this)));
message_loop_.Run();
return (pipeline_status_ == PIPELINE_OK);
}
@@ -143,8 +147,11 @@ bool PipelineIntegrationTestBase::Start(const base::FilePath& file_path,
.WillRepeatedly(SaveArg<0>(&metadata_));
EXPECT_CALL(*this, OnBufferingStateChanged(BUFFERING_HAVE_ENOUGH))
.Times(AtMost(1));
+
+ CreateDemuxer(file_path);
pipeline_->Start(
- CreateFilterCollection(file_path, decryptor),
+ demuxer_.get(),
+ CreateRenderer(decryptor),
base::Bind(&PipelineIntegrationTestBase::OnEnded, base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnError, base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnStatusCallback,
@@ -153,7 +160,9 @@ bool PipelineIntegrationTestBase::Start(const base::FilePath& file_path,
base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnBufferingStateChanged,
base::Unretained(this)),
- base::Closure());
+ base::Closure(),
+ base::Bind(&PipelineIntegrationTestBase::OnAddTextTrack,
+ base::Unretained(this)));
message_loop_.Run();
return (pipeline_status_ == PIPELINE_OK);
}
@@ -212,10 +221,8 @@ bool PipelineIntegrationTestBase::WaitUntilCurrentTimeIsAfter(
return (pipeline_status_ == PIPELINE_OK);
}
-scoped_ptr<FilterCollection>
-PipelineIntegrationTestBase::CreateFilterCollection(
- const base::FilePath& file_path,
- Decryptor* decryptor) {
+void PipelineIntegrationTestBase::CreateDemuxer(
+ const base::FilePath& file_path) {
FileDataSource* file_data_source = new FileDataSource();
CHECK(file_data_source->Initialize(file_path)) << "Is " << file_path.value()
<< " missing?";
@@ -223,23 +230,15 @@ PipelineIntegrationTestBase::CreateFilterCollection(
Demuxer::NeedKeyCB need_key_cb = base::Bind(
&PipelineIntegrationTestBase::DemuxerNeedKeyCB, base::Unretained(this));
- scoped_ptr<Demuxer> demuxer(
- new FFmpegDemuxer(message_loop_.message_loop_proxy(),
- data_source_.get(),
- need_key_cb,
- new MediaLog()));
- return CreateFilterCollection(demuxer.Pass(), decryptor);
+ demuxer_ =
+ scoped_ptr<Demuxer>(new FFmpegDemuxer(message_loop_.message_loop_proxy(),
+ data_source_.get(),
+ need_key_cb,
+ new MediaLog()));
}
-scoped_ptr<FilterCollection>
-PipelineIntegrationTestBase::CreateFilterCollection(
- scoped_ptr<Demuxer> demuxer,
+scoped_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer(
Decryptor* decryptor) {
- demuxer_ = demuxer.Pass();
-
- scoped_ptr<FilterCollection> collection(new FilterCollection());
- collection->SetDemuxer(demuxer_.get());
-
ScopedVector<VideoDecoder> video_decoders;
#if !defined(MEDIA_DISABLE_LIBVPX)
video_decoders.push_back(
@@ -306,9 +305,7 @@ PipelineIntegrationTestBase::CreateFilterCollection(
new TimeDeltaInterpolator(&dummy_clock_));
}
- collection->SetRenderer(renderer_impl.PassAs<Renderer>());
-
- return collection.Pass();
+ return renderer_impl.PassAs<Renderer>();
}
void PipelineIntegrationTestBase::SetDecryptor(
« no previous file with comments | « media/filters/pipeline_integration_test_base.h ('k') | media/filters/renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698