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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test for streaming case to DownloadRateMonitor Created 9 years, 1 month 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/simple_data_source_unittest.cc ('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 22c24d3be8932abb4ba3db6bc2e1225817503bc2..a3dccdf56b77765caf7ed5393be7f62ab2c094a5 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -288,12 +288,19 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url) {
filter_collection_->SelectVideoDecoder(&old_videodecoder);
filter_collection_->AddVideoDecoder(new_decoder.get());
has_video = true;
+
+ // TODO(vrk/wjia): This is under the assumption that the MediaStream
+ // represents a local webcam. This will need to change in the future when
+ // GetVideoDecoder is no longer hardcoded to only return
+ // CaptureVideoDecoders.
+ pipeline_->SetLocalSource(true);
scherkus (not reviewing) 2011/11/28 21:35:03 we should try to have a single way to set this att
}
// TODO(wjia): add audio decoder handling when it's available.
- if (has_video || has_audio)
+ if (has_video || has_audio) {
filter_collection_->SetDemuxerFactory(
new media::DummyDemuxerFactory(has_video, has_audio));
+ }
}
// Handle any volume changes that occured before load().
@@ -746,7 +753,7 @@ void WebMediaPlayerImpl::OnPipelineInitialize(PipelineStatus status) {
is_accelerated_compositing_active_);
}
- if (pipeline_->IsLoaded())
+ if (pipeline_->IsLocalSource())
SetNetworkState(WebKit::WebMediaPlayer::Loaded);
SetReadyState(WebKit::WebMediaPlayer::HaveMetadata);
« no previous file with comments | « webkit/media/simple_data_source_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698