| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 class WebRtcAudioCapturer; | 182 class WebRtcAudioCapturer; |
| 183 class WebRtcAudioRenderer; | 183 class WebRtcAudioRenderer; |
| 184 | 184 |
| 185 // TODO(xians): Move the following two interfaces to webrtc so that | 185 // TODO(xians): Move the following two interfaces to webrtc so that |
| 186 // libjingle can own references to the renderer and capturer. | 186 // libjingle can own references to the renderer and capturer. |
| 187 class WebRtcAudioRendererSource { | 187 class WebRtcAudioRendererSource { |
| 188 public: | 188 public: |
| 189 // Callback to get the rendered data. | 189 // Callback to get the rendered data. |
| 190 virtual void RenderData(media::AudioBus* audio_bus, | 190 virtual void RenderData(media::AudioBus* audio_bus, |
| 191 int sample_rate, | 191 int sample_rate, |
| 192 int audio_delay_milliseconds) = 0; | 192 int audio_delay_milliseconds, |
| 193 base::TimeDelta* current_time) = 0; |
| 193 | 194 |
| 194 // Callback to notify the client that the renderer is going away. | 195 // Callback to notify the client that the renderer is going away. |
| 195 virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) = 0; | 196 virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) = 0; |
| 196 | 197 |
| 197 protected: | 198 protected: |
| 198 virtual ~WebRtcAudioRendererSource() {} | 199 virtual ~WebRtcAudioRendererSource() {} |
| 199 }; | 200 }; |
| 200 | 201 |
| 201 class PeerConnectionAudioSink { | 202 class PeerConnectionAudioSink { |
| 202 public: | 203 public: |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 bool key_pressed) OVERRIDE; | 384 bool key_pressed) OVERRIDE; |
| 384 | 385 |
| 385 // Called on the AudioInputDevice worker thread. | 386 // Called on the AudioInputDevice worker thread. |
| 386 virtual void OnSetFormat(const media::AudioParameters& params) OVERRIDE; | 387 virtual void OnSetFormat(const media::AudioParameters& params) OVERRIDE; |
| 387 | 388 |
| 388 // WebRtcAudioRendererSource implementation. | 389 // WebRtcAudioRendererSource implementation. |
| 389 | 390 |
| 390 // Called on the AudioOutputDevice worker thread. | 391 // Called on the AudioOutputDevice worker thread. |
| 391 virtual void RenderData(media::AudioBus* audio_bus, | 392 virtual void RenderData(media::AudioBus* audio_bus, |
| 392 int sample_rate, | 393 int sample_rate, |
| 393 int audio_delay_milliseconds) OVERRIDE; | 394 int audio_delay_milliseconds, |
| 395 base::TimeDelta* current_time) OVERRIDE; |
| 394 | 396 |
| 395 // Called on the main render thread. | 397 // Called on the main render thread. |
| 396 virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) OVERRIDE; | 398 virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) OVERRIDE; |
| 397 | 399 |
| 398 // WebRtcPlayoutDataSource implementation. | 400 // WebRtcPlayoutDataSource implementation. |
| 399 virtual void AddPlayoutSink(WebRtcPlayoutDataSource::Sink* sink) OVERRIDE; | 401 virtual void AddPlayoutSink(WebRtcPlayoutDataSource::Sink* sink) OVERRIDE; |
| 400 virtual void RemovePlayoutSink(WebRtcPlayoutDataSource::Sink* sink) OVERRIDE; | 402 virtual void RemovePlayoutSink(WebRtcPlayoutDataSource::Sink* sink) OVERRIDE; |
| 401 | 403 |
| 402 // Helper to start the Aec dump if the default capturer exists. | 404 // Helper to start the Aec dump if the default capturer exists. |
| 403 void MaybeStartAecDump(); | 405 void MaybeStartAecDump(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 | 457 |
| 456 // Flag to tell if audio processing is enabled in MediaStreamAudioProcessor. | 458 // Flag to tell if audio processing is enabled in MediaStreamAudioProcessor. |
| 457 const bool is_audio_track_processing_enabled_; | 459 const bool is_audio_track_processing_enabled_; |
| 458 | 460 |
| 459 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 461 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
| 460 }; | 462 }; |
| 461 | 463 |
| 462 } // namespace content | 464 } // namespace content |
| 463 | 465 |
| 464 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 466 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| OLD | NEW |