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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 base::TimeTicks stop_rendering_time_; | 283 base::TimeTicks stop_rendering_time_; |
284 | 284 |
285 // Set upon receipt of the first decoded buffer after a StartPlayingFrom(). | 285 // Set upon receipt of the first decoded buffer after a StartPlayingFrom(). |
286 // Used to determine how long to delay playback. | 286 // Used to determine how long to delay playback. |
287 base::TimeDelta first_packet_timestamp_; | 287 base::TimeDelta first_packet_timestamp_; |
288 | 288 |
289 // Set by OnSuspend() and OnResume() to indicate when the system is about to | 289 // Set by OnSuspend() and OnResume() to indicate when the system is about to |
290 // suspend/is suspended and when it resumes. | 290 // suspend/is suspended and when it resumes. |
291 bool is_suspending_; | 291 bool is_suspending_; |
292 | 292 |
| 293 // Whether to pass compressed audio bitstream to audio sink directly. |
| 294 bool is_passthrough_; |
| 295 |
293 // Track the last reported media time. | 296 // Track the last reported media time. |
294 base::TimeDelta last_reported_media_time_; | 297 base::TimeDelta last_reported_media_time_; |
295 | 298 |
296 // End variables which must be accessed under |lock_|. ---------------------- | 299 // End variables which must be accessed under |lock_|. ---------------------- |
297 | 300 |
298 // NOTE: Weak pointers must be invalidated before all other member variables. | 301 // NOTE: Weak pointers must be invalidated before all other member variables. |
299 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; | 302 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; |
300 | 303 |
301 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 304 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
302 }; | 305 }; |
303 | 306 |
304 } // namespace media | 307 } // namespace media |
305 | 308 |
306 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ | 309 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ |
OLD | NEW |