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

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: fix media/event-attributes.html 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
« media/base/pipeline_impl.cc ('K') | « 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..5f18bd706cf4ac8aad96ee950bf96a0b45179774 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -291,9 +291,14 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url) {
}
// TODO(wjia): add audio decoder handling when it's available.
- if (has_video || has_audio)
+ if (has_video || has_audio) {
+ // TODO(vrk/wjia): Setting "true" for is_local 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.
filter_collection_->SetDemuxerFactory(
- new media::DummyDemuxerFactory(has_video, has_audio));
+ new media::DummyDemuxerFactory(has_video, has_audio, true));
+ }
}
// Handle any volume changes that occured before load().
@@ -746,7 +751,7 @@ void WebMediaPlayerImpl::OnPipelineInitialize(PipelineStatus status) {
is_accelerated_compositing_active_);
}
- if (pipeline_->IsLoaded())
+ if (pipeline_->IsLocalSource())
SetNetworkState(WebKit::WebMediaPlayer::Loaded);
SetReadyState(WebKit::WebMediaPlayer::HaveMetadata);
« media/base/pipeline_impl.cc ('K') | « 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