| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Audio rendering unit utilizing audio output stream provided by browser | 5 // Audio rendering unit utilizing audio output stream provided by browser |
| 6 // process through IPC. | 6 // process through IPC. |
| 7 // | 7 // |
| 8 // Relationship of classes. | 8 // Relationship of classes. |
| 9 // | 9 // |
| 10 // AudioRendererHost AudioRendererImpl | 10 // AudioRendererHost AudioRendererImpl |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 class AudioRendererImpl : public media::AudioRendererBase, | 54 class AudioRendererImpl : public media::AudioRendererBase, |
| 55 public AudioMessageFilter::Delegate, | 55 public AudioMessageFilter::Delegate, |
| 56 public MessageLoop::DestructionObserver { | 56 public MessageLoop::DestructionObserver { |
| 57 public: | 57 public: |
| 58 // Methods called on Render thread ------------------------------------------ | 58 // Methods called on Render thread ------------------------------------------ |
| 59 explicit AudioRendererImpl(AudioMessageFilter* filter); | 59 explicit AudioRendererImpl(AudioMessageFilter* filter); |
| 60 virtual ~AudioRendererImpl(); | 60 virtual ~AudioRendererImpl(); |
| 61 | 61 |
| 62 // Methods called on IO thread ---------------------------------------------- | 62 // Methods called on IO thread ---------------------------------------------- |
| 63 // AudioMessageFilter::Delegate methods, called by AudioMessageFilter. | 63 // AudioMessageFilter::Delegate methods, called by AudioMessageFilter. |
| 64 void OnRequestPacket(AudioBuffersState buffers_state); | 64 virtual void OnRequestPacket(AudioBuffersState buffers_state); |
| 65 void OnStateChanged(const ViewMsg_AudioStreamState_Params& state); | 65 virtual void OnStateChanged(const ViewMsg_AudioStreamState_Params& state); |
| 66 void OnCreated(base::SharedMemoryHandle handle, uint32 length); | 66 virtual void OnCreated(base::SharedMemoryHandle handle, uint32 length); |
| 67 void OnLowLatencyCreated(base::SharedMemoryHandle handle, | 67 virtual void OnLowLatencyCreated(base::SharedMemoryHandle handle, |
| 68 base::SyncSocket::Handle socket_handle, | 68 base::SyncSocket::Handle socket_handle, |
| 69 uint32 length); | 69 uint32 length); |
| 70 void OnVolume(double volume); | 70 virtual void OnVolume(double volume); |
| 71 | 71 |
| 72 // Methods called on pipeline thread ---------------------------------------- | 72 // Methods called on pipeline thread ---------------------------------------- |
| 73 // media::Filter implementation. | 73 // media::Filter implementation. |
| 74 virtual void SetPlaybackRate(float rate); | 74 virtual void SetPlaybackRate(float rate); |
| 75 virtual void Pause(media::FilterCallback* callback); | 75 virtual void Pause(media::FilterCallback* callback); |
| 76 virtual void Seek(base::TimeDelta time, media::FilterCallback* callback); | 76 virtual void Seek(base::TimeDelta time, media::FilterCallback* callback); |
| 77 virtual void Play(media::FilterCallback* callback); | 77 virtual void Play(media::FilterCallback* callback); |
| 78 | 78 |
| 79 // media::AudioRenderer implementation. | 79 // media::AudioRenderer implementation. |
| 80 virtual void SetVolume(float volume); | 80 virtual void SetVolume(float volume); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // State variables for prerolling. | 148 // State variables for prerolling. |
| 149 bool prerolling_; | 149 bool prerolling_; |
| 150 | 150 |
| 151 // Remaining bytes for prerolling to complete. | 151 // Remaining bytes for prerolling to complete. |
| 152 uint32 preroll_bytes_; | 152 uint32 preroll_bytes_; |
| 153 | 153 |
| 154 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 154 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 #endif // CHROME_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ | 157 #endif // CHROME_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ |
| OLD | NEW |