diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-05 08:34:49 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-05 08:34:49 +0000 |
commit | c3c9af1cbf896627bc9dfcc224ee83c23b79b6be (patch) | |
tree | eb2170260e899732a17df200d79f3fe1e7c1fff2 /chrome/renderer/media | |
parent | bfe0d724ef301309eceb431767658f4cbe7b08c1 (diff) | |
download | chromium_src-c3c9af1cbf896627bc9dfcc224ee83c23b79b6be.zip chromium_src-c3c9af1cbf896627bc9dfcc224ee83c23b79b6be.tar.gz chromium_src-c3c9af1cbf896627bc9dfcc224ee83c23b79b6be.tar.bz2 |
Rename all FillThisBuffer and EmptyThisBuffer to something more meaningful
The FillThisBuffer and EmptyThisBuffer names are very confusing. Anyone
new working on the code probably won't understand the code at all. I'm changing
the names to something more meaningful, which state the actual action taken by
the methods. It is also easier to tell whether the method is for input pin or
for output pin by their names.
Review URL: http://codereview.chromium.org/3201013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/media')
-rw-r--r-- | chrome/renderer/media/audio_renderer_impl.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/media/ipc_video_decoder.cc | 13 | ||||
-rw-r--r-- | chrome/renderer/media/ipc_video_decoder.h | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/chrome/renderer/media/audio_renderer_impl.cc b/chrome/renderer/media/audio_renderer_impl.cc index b7e021f..77cc0e3 100644 --- a/chrome/renderer/media/audio_renderer_impl.cc +++ b/chrome/renderer/media/audio_renderer_impl.cc @@ -96,7 +96,7 @@ void AudioRendererImpl::OnReadComplete(media::Buffer* buffer_in) { // TODO(hclam): handle end of stream here. // Use the base class to queue the buffer. - AudioRendererBase::OnFillBufferDone(buffer_in); + AudioRendererBase::ConsumeAudioSamples(buffer_in); // Post a task to render thread to notify a packet reception. io_loop_->PostTask(FROM_HERE, diff --git a/chrome/renderer/media/ipc_video_decoder.cc b/chrome/renderer/media/ipc_video_decoder.cc index 94f506b..98f7abb 100644 --- a/chrome/renderer/media/ipc_video_decoder.cc +++ b/chrome/renderer/media/ipc_video_decoder.cc @@ -253,13 +253,12 @@ void IpcVideoDecoder::ReadCompleteTask( gpu_video_decoder_host_->EmptyThisBuffer(buffer); } -void IpcVideoDecoder::FillThisBuffer( - scoped_refptr<media::VideoFrame> video_frame) { +void IpcVideoDecoder::ProduceVideoFrame(scoped_refptr<VideoFrame> video_frame) { if (MessageLoop::current() != renderer_thread_message_loop_) { renderer_thread_message_loop_->PostTask( FROM_HERE, NewRunnableMethod(this, - &IpcVideoDecoder::FillThisBuffer, + &IpcVideoDecoder::ProduceVideoFrame, video_frame)); return; } @@ -285,7 +284,7 @@ void IpcVideoDecoder::OnFillBufferDone( if (video_frame.get()) { --pending_requests_; - fill_buffer_done_callback()->Run(video_frame); + VideoFrameReady(video_frame); if (state_ == kFlushing && pending_reads_ == 0 && pending_requests_ == 0) { CHECK(flush_callback_.get()); flush_callback_->Run(); @@ -298,9 +297,9 @@ void IpcVideoDecoder::OnFillBufferDone( // When in kFlushCodec, any errored decode, or a 0-lengthed frame, // is taken as a signal to stop decoding. state_ = kEnded; - scoped_refptr<media::VideoFrame> video_frame; - media::VideoFrame::CreateEmptyFrame(&video_frame); - fill_buffer_done_callback()->Run(video_frame); + scoped_refptr<VideoFrame> video_frame; + VideoFrame::CreateEmptyFrame(&video_frame); + VideoFrameReady(video_frame); } } } diff --git a/chrome/renderer/media/ipc_video_decoder.h b/chrome/renderer/media/ipc_video_decoder.h index b82f605..4754ef5 100644 --- a/chrome/renderer/media/ipc_video_decoder.h +++ b/chrome/renderer/media/ipc_video_decoder.h @@ -38,7 +38,7 @@ class IpcVideoDecoder : public media::VideoDecoder, virtual void Initialize(media::DemuxerStream* demuxer_stream, media::FilterCallback* callback); virtual const media::MediaFormat& media_format() { return media_format_; } - virtual void FillThisBuffer(scoped_refptr<VideoFrame> video_frame); + virtual void ProduceVideoFrame(scoped_refptr<media::VideoFrame> video_frame); // GpuVideoDecoderHost::EventHandler. virtual void OnInitializeDone(bool success, |