| 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 // Where the object is created. | 9 // Where the object is created. |
| 10 // 2. Media thread (provided via constructor) | 10 // 2. Media thread (provided via constructor) |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // The sink (destination) for rendered audio. |sink_| must only be accessed | 213 // The sink (destination) for rendered audio. |sink_| must only be accessed |
| 214 // on |task_runner_|. |sink_| must never be called under |lock_| or else we | 214 // on |task_runner_|. |sink_| must never be called under |lock_| or else we |
| 215 // may deadlock between |task_runner_| and the audio callback thread. | 215 // may deadlock between |task_runner_| and the audio callback thread. |
| 216 scoped_refptr<media::AudioRendererSink> sink_; | 216 scoped_refptr<media::AudioRendererSink> sink_; |
| 217 | 217 |
| 218 std::unique_ptr<AudioBufferStream> audio_buffer_stream_; | 218 std::unique_ptr<AudioBufferStream> audio_buffer_stream_; |
| 219 | 219 |
| 220 MediaLog* media_log_; | 220 MediaLog* media_log_; |
| 221 | 221 |
| 222 // Cached copy of hardware params from |sink_|. | 222 // Cached copy of audio params that the renderer is initialized with. |
| 223 AudioParameters audio_parameters_; | 223 AudioParameters audio_parameters_; |
| 224 | 224 |
| 225 RendererClient* client_; | 225 RendererClient* client_; |
| 226 | 226 |
| 227 // Callback provided during Initialize(). | 227 // Callback provided during Initialize(). |
| 228 PipelineStatusCB init_cb_; | 228 PipelineStatusCB init_cb_; |
| 229 | 229 |
| 230 // Callback provided to Flush(). | 230 // Callback provided to Flush(). |
| 231 base::Closure flush_cb_; | 231 base::Closure flush_cb_; |
| 232 | 232 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 308 |
| 309 // NOTE: Weak pointers must be invalidated before all other member variables. | 309 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 310 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; | 310 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; |
| 311 | 311 |
| 312 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 312 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
| 313 }; | 313 }; |
| 314 | 314 |
| 315 } // namespace media | 315 } // namespace media |
| 316 | 316 |
| 317 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ | 317 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ |
| OLD | NEW |