| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 PipelineStatusCB error_cb_; | 215 PipelineStatusCB error_cb_; |
| 216 | 216 |
| 217 // Callback provided to Flush(). | 217 // Callback provided to Flush(). |
| 218 base::Closure flush_cb_; | 218 base::Closure flush_cb_; |
| 219 | 219 |
| 220 // After Initialize() has completed, all variables below must be accessed | 220 // After Initialize() has completed, all variables below must be accessed |
| 221 // under |lock_|. ------------------------------------------------------------ | 221 // under |lock_|. ------------------------------------------------------------ |
| 222 base::Lock lock_; | 222 base::Lock lock_; |
| 223 | 223 |
| 224 // Algorithm for scaling audio. | 224 // Algorithm for scaling audio. |
| 225 float playback_rate_; |
| 225 scoped_ptr<AudioRendererAlgorithm> algorithm_; | 226 scoped_ptr<AudioRendererAlgorithm> algorithm_; |
| 226 | 227 |
| 227 // Simple state tracking variable. | 228 // Simple state tracking variable. |
| 228 State state_; | 229 State state_; |
| 229 | 230 |
| 230 BufferingState buffering_state_; | 231 BufferingState buffering_state_; |
| 231 | 232 |
| 232 // Keep track of whether or not the sink is playing and whether we should be | 233 // Keep track of whether or not the sink is playing and whether we should be |
| 233 // rendering. | 234 // rendering. |
| 234 bool rendering_; | 235 bool rendering_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 249 | 250 |
| 250 // NOTE: Weak pointers must be invalidated before all other member variables. | 251 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 251 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; | 252 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; |
| 252 | 253 |
| 253 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 254 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
| 254 }; | 255 }; |
| 255 | 256 |
| 256 } // namespace media | 257 } // namespace media |
| 257 | 258 |
| 258 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ | 259 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ |
| OLD | NEW |