OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 an AudioRendererSink to output data. | 5 // Audio rendering unit utilizing an AudioRendererSink to output data. |
6 // | 6 // |
7 // This class lives inside three threads during it's lifetime, namely: | 7 // This class lives inside three threads during it's lifetime, namely: |
8 // 1. Render thread. | 8 // 1. Render thread. |
9 // This object is created on the render thread. | 9 // This object is created on the render thread. |
10 // 2. Pipeline thread | 10 // 2. Pipeline thread |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const base::Closure& ended_cb, | 48 const base::Closure& ended_cb, |
49 const base::Closure& disabled_cb, | 49 const base::Closure& disabled_cb, |
50 const PipelineStatusCB& error_cb) OVERRIDE; | 50 const PipelineStatusCB& error_cb) OVERRIDE; |
51 virtual void Play(const base::Closure& callback) OVERRIDE; | 51 virtual void Play(const base::Closure& callback) OVERRIDE; |
52 virtual void Pause(const base::Closure& callback) OVERRIDE; | 52 virtual void Pause(const base::Closure& callback) OVERRIDE; |
53 virtual void Flush(const base::Closure& callback) OVERRIDE; | 53 virtual void Flush(const base::Closure& callback) OVERRIDE; |
54 virtual void Stop(const base::Closure& callback) OVERRIDE; | 54 virtual void Stop(const base::Closure& callback) OVERRIDE; |
55 virtual void SetPlaybackRate(float rate) OVERRIDE; | 55 virtual void SetPlaybackRate(float rate) OVERRIDE; |
56 virtual void Preroll(base::TimeDelta time, | 56 virtual void Preroll(base::TimeDelta time, |
57 const PipelineStatusCB& cb) OVERRIDE; | 57 const PipelineStatusCB& cb) OVERRIDE; |
58 virtual bool HasEnded() OVERRIDE; | |
59 virtual void ResumeAfterUnderflow(bool buffer_more_audio) OVERRIDE; | 58 virtual void ResumeAfterUnderflow(bool buffer_more_audio) OVERRIDE; |
60 virtual void SetVolume(float volume) OVERRIDE; | 59 virtual void SetVolume(float volume) OVERRIDE; |
61 | 60 |
62 // Disables underflow support. When used, |state_| will never transition to | 61 // Disables underflow support. When used, |state_| will never transition to |
63 // kUnderflow resulting in Render calls that underflow returning 0 frames | 62 // kUnderflow resulting in Render calls that underflow returning 0 frames |
64 // instead of some number of silence frames. Must be called prior to | 63 // instead of some number of silence frames. Must be called prior to |
65 // Initialize(). | 64 // Initialize(). |
66 void DisableUnderflowForTesting(); | 65 void DisableUnderflowForTesting(); |
67 | 66 |
68 protected: | 67 protected: |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 bool underflow_disabled_; | 214 bool underflow_disabled_; |
216 | 215 |
217 AudioDecoder::ReadCB read_cb_; | 216 AudioDecoder::ReadCB read_cb_; |
218 | 217 |
219 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 218 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
220 }; | 219 }; |
221 | 220 |
222 } // namespace media | 221 } // namespace media |
223 | 222 |
224 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ | 223 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ |
OLD | NEW |