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); |