Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 // gets the data by pulling, while the data is pushed into | 235 // gets the data by pulling, while the data is pushed into |
| 236 // WebRtcPlayoutDataSource::Sink. | 236 // WebRtcPlayoutDataSource::Sink. |
| 237 class WebRtcPlayoutDataSource { | 237 class WebRtcPlayoutDataSource { |
| 238 public: | 238 public: |
| 239 class Sink { | 239 class Sink { |
| 240 public: | 240 public: |
| 241 // Callback to get the playout data. | 241 // Callback to get the playout data. |
| 242 virtual void OnPlayoutData(media::AudioBus* audio_bus, | 242 virtual void OnPlayoutData(media::AudioBus* audio_bus, |
| 243 int sample_rate, | 243 int sample_rate, |
| 244 int audio_delay_milliseconds) = 0; | 244 int audio_delay_milliseconds) = 0; |
| 245 | |
| 246 // Callback to notify the sink that the source has changed. | |
| 247 virtual void OnPlayoutDataSourceChanged() = 0; | |
|
tommi (sloooow) - chröme
2014/03/04 20:48:39
also document thread semantics
no longer working on chromium
2014/03/05 13:01:04
Done.
| |
| 248 | |
| 245 protected: | 249 protected: |
| 246 virtual ~Sink() {} | 250 virtual ~Sink() {} |
| 247 }; | 251 }; |
| 248 | 252 |
| 249 // Adds/Removes the sink of WebRtcAudioRendererSource to the ADM. | 253 // Adds/Removes the sink of WebRtcAudioRendererSource to the ADM. |
| 250 // These methods are used by the MediaStreamAudioProcesssor to get the | 254 // These methods are used by the MediaStreamAudioProcesssor to get the |
| 251 // rendered data for AEC. | 255 // rendered data for AEC. |
| 252 virtual void AddPlayoutSink(Sink* sink) = 0; | 256 virtual void AddPlayoutSink(Sink* sink) = 0; |
| 253 virtual void RemovePlayoutSink(Sink* sink) = 0; | 257 virtual void RemovePlayoutSink(Sink* sink) = 0; |
| 254 | 258 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 430 // Buffer used for temporary storage during render callback. | 434 // Buffer used for temporary storage during render callback. |
| 431 // It is only accessed by the audio render thread. | 435 // It is only accessed by the audio render thread. |
| 432 std::vector<int16> render_buffer_; | 436 std::vector<int16> render_buffer_; |
| 433 | 437 |
| 434 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 438 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
| 435 }; | 439 }; |
| 436 | 440 |
| 437 } // namespace content | 441 } // namespace content |
| 438 | 442 |
| 439 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 443 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| OLD | NEW |