diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 20:37:58 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 20:37:58 +0000 |
commit | 33efc90523113c427a7de06373acdf58b62bb627 (patch) | |
tree | d3addf025097489bf543cbbfd944351965c629a5 /content | |
parent | 0da5829b9f972bdfe6c5e4d2cad91944d4649f62 (diff) | |
download | chromium_src-33efc90523113c427a7de06373acdf58b62bb627.zip chromium_src-33efc90523113c427a7de06373acdf58b62bb627.tar.gz chromium_src-33efc90523113c427a7de06373acdf58b62bb627.tar.bz2 |
Move VideoDecoder out of media pipeline.
This is the first step to move VideoDecoder out of Filter hierarchy. In this CL, VideoDecoder is removed from the pipeline and is owned by the VideoRenderBase now. All calls to Seek()/Pause()/Play() are removed. The video decoder is flushed or stopped from the VideoRenderBase instead of from the composite filter.
In a follow-up CL, VideoDecoder will not be a Filter any more and Seek()/Pause()/Play() methods will be removed from its definition and all implementations.
BUG=108340
TEST=media_unittest, content_unittest and some basic playing of html5 video.
Review URL: http://codereview.chromium.org/9700006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/renderer/media/capture_video_decoder.cc | 2 | ||||
-rw-r--r-- | content/renderer/media/rtc_video_decoder.cc | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/content/renderer/media/capture_video_decoder.cc b/content/renderer/media/capture_video_decoder.cc index 7f0d399..1937115 100644 --- a/content/renderer/media/capture_video_decoder.cc +++ b/content/renderer/media/capture_video_decoder.cc @@ -164,7 +164,7 @@ void CaptureVideoDecoder::PauseOnDecoderThread(const base::Closure& callback) { DVLOG(1) << "PauseOnDecoderThread"; DCHECK(message_loop_proxy_->BelongsToCurrentThread()); state_ = kPaused; - media::VideoDecoder::Pause(callback); + callback.Run(); } void CaptureVideoDecoder::FlushOnDecoderThread(const base::Closure& callback) { diff --git a/content/renderer/media/rtc_video_decoder.cc b/content/renderer/media/rtc_video_decoder.cc index 1a51c1e..1ffb1fb 100644 --- a/content/renderer/media/rtc_video_decoder.cc +++ b/content/renderer/media/rtc_video_decoder.cc @@ -61,14 +61,13 @@ void RTCVideoDecoder::Initialize(DemuxerStream* demuxer_stream, void RTCVideoDecoder::Play(const base::Closure& callback) { if (MessageLoop::current() != message_loop_) { message_loop_->PostTask(FROM_HERE, - base::Bind(&RTCVideoDecoder::Play, - this, callback)); + base::Bind(&RTCVideoDecoder::Play, this, callback)); return; } DCHECK_EQ(MessageLoop::current(), message_loop_); - VideoDecoder::Play(callback); + callback.Run(); } void RTCVideoDecoder::Pause(const base::Closure& callback) { @@ -83,7 +82,7 @@ void RTCVideoDecoder::Pause(const base::Closure& callback) { state_ = kPaused; - VideoDecoder::Pause(callback); + callback.Run(); } void RTCVideoDecoder::Flush(const base::Closure& callback) { |