Chromium Code Reviews| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 238 int64_t last_audio_memory_usage_; | 238 int64_t last_audio_memory_usage_; |
| 239 | 239 |
| 240 // Sample rate of the last decoded audio buffer. Allows for detection of | 240 // Sample rate of the last decoded audio buffer. Allows for detection of |
| 241 // sample rate changes due to implicit AAC configuration change. | 241 // sample rate changes due to implicit AAC configuration change. |
| 242 int last_decoded_sample_rate_; | 242 int last_decoded_sample_rate_; |
| 243 | 243 |
| 244 // Similar to |last_decoded_sample_rate_|, used to configure the channel mask | 244 // Similar to |last_decoded_sample_rate_|, used to configure the channel mask |
| 245 // given to the |algorithm_| for efficient playback rate changes. | 245 // given to the |algorithm_| for efficient playback rate changes. |
| 246 ChannelLayout last_decoded_channel_layout_; | 246 ChannelLayout last_decoded_channel_layout_; |
| 247 | 247 |
| 248 // Whether the stream is possibly encrypted. | |
| 249 bool encrypted_; | |
|
xhwang
2017/05/06 03:52:13
I am not seeing this initialized and/or set anywhe
watk
2017/05/09 17:51:28
Done.
| |
| 250 | |
| 248 // After Initialize() has completed, all variables below must be accessed | 251 // After Initialize() has completed, all variables below must be accessed |
| 249 // under |lock_|. ------------------------------------------------------------ | 252 // under |lock_|. ------------------------------------------------------------ |
| 250 base::Lock lock_; | 253 base::Lock lock_; |
| 251 | 254 |
| 252 // Algorithm for scaling audio. | 255 // Algorithm for scaling audio. |
| 253 double playback_rate_; | 256 double playback_rate_; |
| 254 std::unique_ptr<AudioRendererAlgorithm> algorithm_; | 257 std::unique_ptr<AudioRendererAlgorithm> algorithm_; |
| 255 | 258 |
| 256 // Simple state tracking variable. | 259 // Simple state tracking variable. |
| 257 State state_; | 260 State state_; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 | 308 |
| 306 // NOTE: Weak pointers must be invalidated before all other member variables. | 309 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 307 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; | 310 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; |
| 308 | 311 |
| 309 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 312 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
| 310 }; | 313 }; |
| 311 | 314 |
| 312 } // namespace media | 315 } // namespace media |
| 313 | 316 |
| 314 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ | 317 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ |
| OLD | NEW |