diff options
author | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-24 16:49:01 +0000 |
---|---|---|
committer | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-24 16:49:01 +0000 |
commit | 08107faa3479caaf8350e6af3a55b87ee1608b52 (patch) | |
tree | 1d082b3c14b6cb7925a35b53ae9745c7f8994d1c /webkit | |
parent | 25daf10d3e2a833c5aa4bed76d8446e484ca1953 (diff) | |
download | chromium_src-08107faa3479caaf8350e6af3a55b87ee1608b52.zip chromium_src-08107faa3479caaf8350e6af3a55b87ee1608b52.tar.gz chromium_src-08107faa3479caaf8350e6af3a55b87ee1608b52.tar.bz2 |
make URL handling transparent to media pipeline.
BUG=none
TEST=trybots
Review URL: http://codereview.chromium.org/7631016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index 7aa9a58..b30e013 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -18,6 +18,7 @@ #include "media/base/video_frame.h" #include "media/filters/adaptive_demuxer.h" #include "media/filters/chunk_demuxer_factory.h" +#include "media/filters/dummy_demuxer_factory.h" #include "media/filters/ffmpeg_audio_decoder.h" #include "media/filters/ffmpeg_demuxer_factory.h" #include "media/filters/ffmpeg_video_decoder.h" @@ -211,6 +212,8 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url) { DCHECK(proxy_); if (media_stream_client_) { + bool has_video = false; + bool has_audio = false; scoped_refptr<media::VideoDecoder> new_decoder = media_stream_client_->GetVideoDecoder(url, message_loop_factory_.get()); if (new_decoder.get()) { @@ -218,7 +221,13 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url) { scoped_refptr<media::VideoDecoder> old_videodecoder; filter_collection_->SelectVideoDecoder(&old_videodecoder); filter_collection_->AddVideoDecoder(new_decoder.get()); + has_video = true; } + + // TODO(wjia): add audio decoder handling when it's available. + if (has_video || has_audio) + filter_collection_->SetDemuxerFactory( + new media::DummyDemuxerFactory(has_video, has_audio)); } // Handle any volume changes that occured before load(). |