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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 9195001: Remove --simple-data-source and convert WebMediaPlayerImpl::Initialize() to a void function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: no dcheck Created 8 years, 11 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 | « webkit/media/webmediaplayer_impl.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index c9aa47fadbcad00cf60cf8693d3c9db639a86b71..8a181c7cdd0cc4b9d569ee1fc9088974b1bc4ea8 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -132,16 +132,11 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED));
}
-bool WebMediaPlayerImpl::Initialize(
- WebKit::WebFrame* frame,
- bool use_simple_data_source) {
+void WebMediaPlayerImpl::Initialize(WebKit::WebFrame* frame) {
DCHECK_EQ(main_loop_, MessageLoop::current());
MessageLoop* pipeline_message_loop =
message_loop_factory_->GetMessageLoop("PipelineThread");
- if (!pipeline_message_loop) {
- NOTREACHED() << "Could not start PipelineThread";
- return false;
- }
+ CHECK(pipeline_message_loop) << "Failed to create a new thread";
// Let V8 know we started new thread if we did not did it yet.
// Made separate task to avoid deletion of player currently being created.
@@ -195,14 +190,8 @@ bool WebMediaPlayerImpl::Initialize(
scoped_ptr<media::CompositeDataSourceFactory> data_source_factory(
new media::CompositeDataSourceFactory());
-
- if (use_simple_data_source) {
- data_source_factory->AddFactory(simple_data_source_factory.Pass());
- data_source_factory->AddFactory(buffered_data_source_factory.Pass());
- } else {
- data_source_factory->AddFactory(buffered_data_source_factory.Pass());
- data_source_factory->AddFactory(simple_data_source_factory.Pass());
- }
+ data_source_factory->AddFactory(buffered_data_source_factory.Pass());
+ data_source_factory->AddFactory(simple_data_source_factory.Pass());
scoped_ptr<media::DemuxerFactory> demuxer_factory(
// TODO(fischman): replace the extra scoped_ptr+release() with Pass() when
@@ -226,8 +215,6 @@ bool WebMediaPlayerImpl::Initialize(
filter_collection_->AddVideoDecoder(new media::FFmpegVideoDecoder(
message_loop_factory_->GetMessageLoop("VideoDecoderThread")));
filter_collection_->AddAudioRenderer(new media::NullAudioRenderer());
-
- return true;
}
WebMediaPlayerImpl::~WebMediaPlayerImpl() {
« no previous file with comments | « webkit/media/webmediaplayer_impl.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698