| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void OnData(const media::AudioBus& audio_bus, | 98 void OnData(const media::AudioBus& audio_bus, |
| 99 base::TimeTicks reference_time) override; | 99 base::TimeTicks reference_time) override; |
| 100 | 100 |
| 101 // Called on the AudioInputDevice worker thread. | 101 // Called on the AudioInputDevice worker thread. |
| 102 void OnSetFormat(const media::AudioParameters& params) override; | 102 void OnSetFormat(const media::AudioParameters& params) override; |
| 103 | 103 |
| 104 // media::AudioRendererSink::RenderCallback implementation. | 104 // media::AudioRendererSink::RenderCallback implementation. |
| 105 // Render() is called on the AudioOutputDevice thread and OnRenderError() | 105 // Render() is called on the AudioOutputDevice thread and OnRenderError() |
| 106 // on the IO thread. | 106 // on the IO thread. |
| 107 int Render(media::AudioBus* audio_bus, | 107 int Render(media::AudioBus* audio_bus, |
| 108 uint32_t audio_delay_milliseconds, | 108 uint32_t frames_delayed, |
| 109 uint32_t frames_skipped) override; | 109 uint32_t frames_skipped) override; |
| 110 void OnRenderError() override; | 110 void OnRenderError() override; |
| 111 | 111 |
| 112 // Initializes and starts the |sink_| if | 112 // Initializes and starts the |sink_| if |
| 113 // we have received valid |source_params_| && | 113 // we have received valid |source_params_| && |
| 114 // |playing_| has been set to true. | 114 // |playing_| has been set to true. |
| 115 void MaybeStartSink(); | 115 void MaybeStartSink(); |
| 116 | 116 |
| 117 // Sets new |source_params_| and then re-initializes and restarts |sink_|. | 117 // Sets new |source_params_| and then re-initializes and restarts |sink_|. |
| 118 void ReconfigureSink(const media::AudioParameters& params); | 118 void ReconfigureSink(const media::AudioParameters& params); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 // Used to DCHECK that some methods are called on the audio thread. | 181 // Used to DCHECK that some methods are called on the audio thread. |
| 182 base::ThreadChecker audio_thread_checker_; | 182 base::ThreadChecker audio_thread_checker_; |
| 183 | 183 |
| 184 DISALLOW_COPY_AND_ASSIGN(TrackAudioRenderer); | 184 DISALLOW_COPY_AND_ASSIGN(TrackAudioRenderer); |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 } // namespace content | 187 } // namespace content |
| 188 | 188 |
| 189 #endif // CONTENT_RENDERER_MEDIA_TRACK_AUDIO_RENDERER_H_ | 189 #endif // CONTENT_RENDERER_MEDIA_TRACK_AUDIO_RENDERER_H_ |
| OLD | NEW |