diff options
author | ralphl@chromium.org <ralphl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 19:51:00 +0000 |
---|---|---|
committer | ralphl@chromium.org <ralphl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 19:51:00 +0000 |
commit | 44d568ec954287a29ff14ae3f2217b7ec534e49f (patch) | |
tree | d068c196197eb82303b938aa3d1b35f480d2a466 /chrome | |
parent | 000b6ee0af3d7b362f812352cc2adcdbf4a2c51f (diff) | |
download | chromium_src-44d568ec954287a29ff14ae3f2217b7ec534e49f.zip chromium_src-44d568ec954287a29ff14ae3f2217b7ec534e49f.tar.gz chromium_src-44d568ec954287a29ff14ae3f2217b7ec534e49f.tar.bz2 |
Decoders now use standard callback mechanism for Reads. Removed Assignable<> template.
Also includes an update that should provide more accurate timing from the audio renderer.
Review URL: http://codereview.chromium.org/55031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/renderer/media/audio_renderer_impl.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/media/audio_renderer_impl.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/chrome/renderer/media/audio_renderer_impl.cc b/chrome/renderer/media/audio_renderer_impl.cc index a830b40..9276b0e 100644 --- a/chrome/renderer/media/audio_renderer_impl.cc +++ b/chrome/renderer/media/audio_renderer_impl.cc @@ -63,9 +63,9 @@ void AudioRendererImpl::OnStop() { } } -void AudioRendererImpl::OnAssignment(media::Buffer* buffer_in) { +void AudioRendererImpl::OnReadComplete(media::Buffer* buffer_in) { // Use the base class to queue the buffer. - AudioRendererBase::OnAssignment(buffer_in); + AudioRendererBase::OnReadComplete(buffer_in); // Post a task to render thread to notify a packet reception. render_loop_->PostTask(FROM_HERE, NewRunnableMethod(this, &AudioRendererImpl::OnNotifyAudioPacketReady)); diff --git a/chrome/renderer/media/audio_renderer_impl.h b/chrome/renderer/media/audio_renderer_impl.h index 8834f4ec..6945f8a 100644 --- a/chrome/renderer/media/audio_renderer_impl.h +++ b/chrome/renderer/media/audio_renderer_impl.h @@ -83,7 +83,7 @@ // Called from AudioRendererBase for stop event. // // Audio decoder thread (If there's one.) -// \-- OnAssignment() +// \-- OnReadComplete() // A raw PCM audio packet buffer is received here, this method is called // from pipeline thread if audio decoder thread does not exist. @@ -129,15 +129,15 @@ class AudioRendererImpl : public media::AudioRendererBase { // media::AudioRenderer implementation. virtual void SetVolume(float volume); - // AssignableBuffer<AudioRendererBase, BufferInterface> implementation. - virtual void OnAssignment(media::Buffer* buffer_in); - protected: // Methods called on audio renderer thread ---------------------------------- // These methods are called from AudioRendererBase. virtual bool OnInitialize(const media::MediaFormat& media_format); virtual void OnStop(); + // Called when the decoder completes a Read(). + virtual void OnReadComplete(media::Buffer* buffer_in); + private: friend class media::FilterFactoryImpl1<AudioRendererImpl, WebMediaPlayerDelegateImpl*>; |