| Index: content/renderer/media/webrtc_audio_device_impl.h
|
| diff --git a/content/renderer/media/webrtc_audio_device_impl.h b/content/renderer/media/webrtc_audio_device_impl.h
|
| index 1d904fa496202277130bc900edb0aea72b525472..f9279f5f6ff5c4986b1afd62e5223228426ae690 100644
|
| --- a/content/renderer/media/webrtc_audio_device_impl.h
|
| +++ b/content/renderer/media/webrtc_audio_device_impl.h
|
| @@ -299,14 +299,21 @@ class CONTENT_EXPORT WebRtcAudioDeviceImpl
|
| // Called on the main renderer thread.
|
| bool SetAudioRenderer(WebRtcAudioRenderer* renderer);
|
|
|
| - // Adds the capturer to the ADM.
|
| + // Adds/Removes the capturer to the ADM.
|
| + // TODO(xians): Remove these two methods once the ADM does not need to pass
|
| + // hardware information up to WebRtc.
|
| void AddAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer);
|
| -
|
| - // Gets the default capturer, which is the capturer in the list with
|
| - // a valid |device_id|. Microphones are represented by capturers with a valid
|
| - // |device_id|, since only one microphone is supported today, only one
|
| - // capturer in the |capturers_| can have a valid |device_id|.
|
| - scoped_refptr<WebRtcAudioCapturer> GetDefaultCapturer() const;
|
| + void RemoveAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer);
|
| +
|
| + // Gets paired device information of the capture device for the audio
|
| + // renderer. This is used to pass on a session id, sample rate and buffer
|
| + // size to a webrtc audio renderer (either local or remote), so that audio
|
| + // will be rendered to a matching output device.
|
| + // Returns true if the capture device has a paired output device, otherwise
|
| + // false. Note that if there are more than one open capture device the
|
| + // function will not be able to pick an appropriate device and return false.
|
| + bool GetAuthorizedDeviceInfoForAudioRenderer(
|
| + int* session_id, int* output_sample_rate, int* output_buffer_size);
|
|
|
| const scoped_refptr<WebRtcAudioRenderer>& renderer() const {
|
| return renderer_;
|
| @@ -355,6 +362,10 @@ class CONTENT_EXPORT WebRtcAudioDeviceImpl
|
| virtual void SetRenderFormat(const media::AudioParameters& params) OVERRIDE;
|
| virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) OVERRIDE;
|
|
|
| + // Helper to get the default capturer, which is the last capturer in
|
| + // |capturers_|.
|
| + scoped_refptr<WebRtcAudioCapturer> GetDefaultCapturer() const;
|
| +
|
| // Used to DCHECK that we are called on the correct thread.
|
| base::ThreadChecker thread_checker_;
|
|
|
|
|