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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const AudioHardwareConfig& hardware_config, | 64 const AudioHardwareConfig& hardware_config, |
65 const scoped_refptr<MediaLog>& media_log); | 65 const scoped_refptr<MediaLog>& media_log); |
66 ~AudioRendererImpl() override; | 66 ~AudioRendererImpl() override; |
67 | 67 |
68 // TimeSource implementation. | 68 // TimeSource implementation. |
69 void StartTicking() override; | 69 void StartTicking() override; |
70 void StopTicking() override; | 70 void StopTicking() override; |
71 void SetPlaybackRate(double rate) override; | 71 void SetPlaybackRate(double rate) override; |
72 void SetMediaTime(base::TimeDelta time) override; | 72 void SetMediaTime(base::TimeDelta time) override; |
73 base::TimeDelta CurrentMediaTime() override; | 73 base::TimeDelta CurrentMediaTime() override; |
74 base::TimeTicks GetWallClockTime(base::TimeDelta time) override; | 74 bool GetWallClockTimes( |
| 75 const std::vector<base::TimeDelta>& media_timestamps, |
| 76 std::vector<base::TimeTicks>* wall_clock_times) override; |
75 | 77 |
76 // AudioRenderer implementation. | 78 // AudioRenderer implementation. |
77 void Initialize(DemuxerStream* stream, | 79 void Initialize(DemuxerStream* stream, |
78 const PipelineStatusCB& init_cb, | 80 const PipelineStatusCB& init_cb, |
79 const SetDecryptorReadyCB& set_decryptor_ready_cb, | 81 const SetDecryptorReadyCB& set_decryptor_ready_cb, |
80 const StatisticsCB& statistics_cb, | 82 const StatisticsCB& statistics_cb, |
81 const BufferingStateCB& buffering_state_cb, | 83 const BufferingStateCB& buffering_state_cb, |
82 const base::Closure& ended_cb, | 84 const base::Closure& ended_cb, |
83 const PipelineStatusCB& error_cb, | 85 const PipelineStatusCB& error_cb, |
84 const base::Closure& waiting_for_decryption_key_cb) override; | 86 const base::Closure& waiting_for_decryption_key_cb) override; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 264 |
263 // NOTE: Weak pointers must be invalidated before all other member variables. | 265 // NOTE: Weak pointers must be invalidated before all other member variables. |
264 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; | 266 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; |
265 | 267 |
266 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 268 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
267 }; | 269 }; |
268 | 270 |
269 } // namespace media | 271 } // namespace media |
270 | 272 |
271 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ | 273 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ |
OLD | NEW |