From 33efc90523113c427a7de06373acdf58b62bb627 Mon Sep 17 00:00:00 2001 From: "xhwang@chromium.org" Date: Thu, 22 Mar 2012 20:37:58 +0000 Subject: 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 --- content/renderer/media/capture_video_decoder.cc | 2 +- content/renderer/media/rtc_video_decoder.cc | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'content') 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) { -- cgit v1.1