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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 base::TimeTicks stop_rendering_time_; | 301 base::TimeTicks stop_rendering_time_; |
302 | 302 |
303 // Set upon receipt of the first decoded buffer after a StartPlayingFrom(). | 303 // Set upon receipt of the first decoded buffer after a StartPlayingFrom(). |
304 // Used to determine how long to delay playback. | 304 // Used to determine how long to delay playback. |
305 base::TimeDelta first_packet_timestamp_; | 305 base::TimeDelta first_packet_timestamp_; |
306 | 306 |
307 // Set by OnSuspend() and OnResume() to indicate when the system is about to | 307 // Set by OnSuspend() and OnResume() to indicate when the system is about to |
308 // suspend/is suspended and when it resumes. | 308 // suspend/is suspended and when it resumes. |
309 bool is_suspending_; | 309 bool is_suspending_; |
310 | 310 |
| 311 // Whether to pass compressed audio bitstream to audio sink directly. |
| 312 bool is_passthrough_; |
| 313 |
| 314 // Track the last reported media time. |
| 315 base::TimeDelta last_reported_media_time_; |
| 316 |
311 // End variables which must be accessed under |lock_|. ---------------------- | 317 // End variables which must be accessed under |lock_|. ---------------------- |
312 | 318 |
313 // NOTE: Weak pointers must be invalidated before all other member variables. | 319 // NOTE: Weak pointers must be invalidated before all other member variables. |
314 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; | 320 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; |
315 | 321 |
316 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 322 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
317 }; | 323 }; |
318 | 324 |
319 } // namespace media | 325 } // namespace media |
320 | 326 |
321 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ | 327 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ |
OLD | NEW |