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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 9860027: Remove DemuxerFactory and URL parameter from Pipeline. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: again Created 8 years, 9 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') | no next file » | 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 3fdda4ab6212db36a1012da9b62a03272647c664..146f2839c89e11e8dafe8992074d01807714b188 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -221,7 +221,7 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url) {
if (BuildMediaStreamCollection(url, media_stream_client_,
message_loop_factory_.get(),
filter_collection_.get())) {
- StartPipeline(gurl);
+ StartPipeline();
return;
}
@@ -231,8 +231,8 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url) {
message_loop_factory_.get(),
filter_collection_.get(),
&video_decoder)) {
- StartPipeline(gurl);
proxy_->set_video_decoder(video_decoder);
+ StartPipeline();
return;
}
@@ -367,7 +367,7 @@ void WebMediaPlayerImpl::setVisible(bool visible) {
#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, chromium_name) \
COMPILE_ASSERT(static_cast<int>(WebKit::WebMediaPlayer::webkit_name) == \
- static_cast<int>(media::chromium_name), \
+ static_cast<int>(webkit_media::chromium_name), \
mismatching_enums)
COMPILE_ASSERT_MATCHING_ENUM(None, NONE);
COMPILE_ASSERT_MATCHING_ENUM(MetaData, METADATA);
@@ -376,7 +376,11 @@ COMPILE_ASSERT_MATCHING_ENUM(Auto, AUTO);
void WebMediaPlayerImpl::setPreload(WebKit::WebMediaPlayer::Preload preload) {
DCHECK_EQ(main_loop_, MessageLoop::current());
- pipeline_->SetPreload(static_cast<media::Preload>(preload));
+ if (proxy_ && proxy_->data_source()) {
+ // XXX: Why do I need to use webkit_media:: prefix? clang complains!
+ proxy_->data_source()->SetPreload(
+ static_cast<webkit_media::Preload>(preload));
+ }
}
bool WebMediaPlayerImpl::totalBytesKnown() {
@@ -823,20 +827,24 @@ void WebMediaPlayerImpl::DataSourceInitialized(
return;
}
+ // TODO(scherkus): this is leftover from removing DemuxerFactory -- instead
+ // our DataSource should report this information. See http://crbug.com/120426
+ bool local_source = !gurl.SchemeIs("http") && !gurl.SchemeIs("https");
+
scoped_refptr<media::FFmpegVideoDecoder> video_decoder;
BuildDefaultCollection(proxy_->data_source(),
+ local_source,
message_loop_factory_.get(),
filter_collection_.get(),
&video_decoder);
proxy_->set_video_decoder(video_decoder);
- StartPipeline(gurl);
+ StartPipeline();
}
-void WebMediaPlayerImpl::StartPipeline(const GURL& gurl) {
+void WebMediaPlayerImpl::StartPipeline() {
started_ = true;
pipeline_->Start(
filter_collection_.Pass(),
- gurl.spec(),
base::Bind(&WebMediaPlayerProxy::PipelineEndedCallback, proxy_.get()),
base::Bind(&WebMediaPlayerProxy::PipelineErrorCallback, proxy_.get()),
base::Bind(&WebMediaPlayerProxy::NetworkEventCallback, proxy_.get()),
« no previous file with comments | « webkit/media/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698