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 #ifndef CONTENT_RENDERER_MEDIA_TRACK_AUDIO_RENDERER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_TRACK_AUDIO_RENDERER_H_ |
6 #define CONTENT_RENDERER_MEDIA_TRACK_AUDIO_RENDERER_H_ | 6 #define CONTENT_RENDERER_MEDIA_TRACK_AUDIO_RENDERER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Called on the AudioInputDevice worker thread. | 90 // Called on the AudioInputDevice worker thread. |
91 void OnData(const media::AudioBus& audio_bus, | 91 void OnData(const media::AudioBus& audio_bus, |
92 base::TimeTicks reference_time) override; | 92 base::TimeTicks reference_time) override; |
93 | 93 |
94 // Called on the AudioInputDevice worker thread. | 94 // Called on the AudioInputDevice worker thread. |
95 void OnSetFormat(const media::AudioParameters& params) override; | 95 void OnSetFormat(const media::AudioParameters& params) override; |
96 | 96 |
97 // media::AudioRendererSink::RenderCallback implementation. | 97 // media::AudioRendererSink::RenderCallback implementation. |
98 // Render() is called on the AudioOutputDevice thread and OnRenderError() | 98 // Render() is called on the AudioOutputDevice thread and OnRenderError() |
99 // on the IO thread. | 99 // on the IO thread. |
100 int Render(media::AudioBus* audio_bus, | 100 int Render(base::TimeDelta delay, |
101 uint32_t frames_delayed, | 101 base::TimeTicks delay_timestamp, |
102 uint32_t frames_skipped) override; | 102 int prior_frames_skipped, |
| 103 media::AudioBus* audio_bus) override; |
103 void OnRenderError() override; | 104 void OnRenderError() override; |
104 | 105 |
105 // Initializes and starts the |sink_| if | 106 // Initializes and starts the |sink_| if |
106 // we have received valid |source_params_| && | 107 // we have received valid |source_params_| && |
107 // |playing_| has been set to true. | 108 // |playing_| has been set to true. |
108 void MaybeStartSink(); | 109 void MaybeStartSink(); |
109 | 110 |
110 // Sets new |source_params_| and then re-initializes and restarts |sink_|. | 111 // Sets new |source_params_| and then re-initializes and restarts |sink_|. |
111 void ReconfigureSink(const media::AudioParameters& params); | 112 void ReconfigureSink(const media::AudioParameters& params); |
112 | 113 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 174 |
174 // Used to DCHECK that some methods are called on the audio thread. | 175 // Used to DCHECK that some methods are called on the audio thread. |
175 base::ThreadChecker audio_thread_checker_; | 176 base::ThreadChecker audio_thread_checker_; |
176 | 177 |
177 DISALLOW_COPY_AND_ASSIGN(TrackAudioRenderer); | 178 DISALLOW_COPY_AND_ASSIGN(TrackAudioRenderer); |
178 }; | 179 }; |
179 | 180 |
180 } // namespace content | 181 } // namespace content |
181 | 182 |
182 #endif // CONTENT_RENDERER_MEDIA_TRACK_AUDIO_RENDERER_H_ | 183 #endif // CONTENT_RENDERER_MEDIA_TRACK_AUDIO_RENDERER_H_ |
OLD | NEW |