| 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_WEBRTC_AUDIO_CAPTURER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 NON_EXPORTED_BASE(public media::AudioCapturerSource::CaptureCallback), | 45 NON_EXPORTED_BASE(public media::AudioCapturerSource::CaptureCallback), |
| 46 NON_EXPORTED_BASE(public media::AudioCapturerSource::CaptureEventHandler), | 46 NON_EXPORTED_BASE(public media::AudioCapturerSource::CaptureEventHandler), |
| 47 NON_EXPORTED_BASE( | 47 NON_EXPORTED_BASE( |
| 48 public content::WebRtcLocalAudioRenderer::LocalRenderCallback) { | 48 public content::WebRtcLocalAudioRenderer::LocalRenderCallback) { |
| 49 public: | 49 public: |
| 50 // Use to construct the audio capturer. | 50 // Use to construct the audio capturer. |
| 51 // Called on the main render thread. | 51 // Called on the main render thread. |
| 52 static scoped_refptr<WebRtcAudioCapturer> CreateCapturer(); | 52 static scoped_refptr<WebRtcAudioCapturer> CreateCapturer(); |
| 53 | 53 |
| 54 // Creates and configures the default audio capturing source using the | 54 // Creates and configures the default audio capturing source using the |
| 55 // provided audio parameters. | 55 // provided audio parameters. |render_view_id| specifies the render view |
| 56 // Called on the main render thread. | 56 // consuming audio for capture. Called on the main render thread. |
| 57 bool Initialize(media::ChannelLayout channel_layout, int sample_rate); | 57 bool Initialize(int render_view_id, |
| 58 media::ChannelLayout channel_layout, int sample_rate); |
| 58 | 59 |
| 59 // Called by the client on the sink side to add a sink. | 60 // Called by the client on the sink side to add a sink. |
| 60 // WebRtcAudioDeviceImpl calls this method on the main render thread but | 61 // WebRtcAudioDeviceImpl calls this method on the main render thread but |
| 61 // other clients may call it from other threads. The current implementation | 62 // other clients may call it from other threads. The current implementation |
| 62 // does not support multi-thread calling. | 63 // does not support multi-thread calling. |
| 63 // TODO(henrika): add lock if we extend number of supported sinks. | 64 // TODO(henrika): add lock if we extend number of supported sinks. |
| 64 // Called on the main render thread. | 65 // Called on the main render thread. |
| 65 void AddCapturerSink(WebRtcAudioCapturerSink* sink); | 66 void AddCapturerSink(WebRtcAudioCapturerSink* sink); |
| 66 | 67 |
| 67 // Called by the client on the sink side to remove a sink. | 68 // Called by the client on the sink side to remove a sink. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 206 |
| 206 // True when automatic gain control is enabled, false otherwise. | 207 // True when automatic gain control is enabled, false otherwise. |
| 207 bool agc_is_enabled_; | 208 bool agc_is_enabled_; |
| 208 | 209 |
| 209 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); | 210 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); |
| 210 }; | 211 }; |
| 211 | 212 |
| 212 } // namespace content | 213 } // namespace content |
| 213 | 214 |
| 214 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 215 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
| OLD | NEW |