| Index: content/renderer/media/webrtc_audio_capturer.h
|
| diff --git a/content/renderer/media/webrtc_audio_capturer.h b/content/renderer/media/webrtc_audio_capturer.h
|
| index 78a21811c4fab6675946cd317a5a1a8e7241d681..e130926a7a8d8a390c6c358e81124cf6282133e1 100644
|
| --- a/content/renderer/media/webrtc_audio_capturer.h
|
| +++ b/content/renderer/media/webrtc_audio_capturer.h
|
| @@ -27,6 +27,7 @@ class AudioBus;
|
| namespace content {
|
|
|
| class MediaStreamAudioProcessor;
|
| +class MediaStreamAudioSource;
|
| class WebRtcAudioDeviceImpl;
|
| class WebRtcLocalAudioRenderer;
|
| class WebRtcLocalAudioTrack;
|
| @@ -56,7 +57,8 @@ class CONTENT_EXPORT WebRtcAudioCapturer
|
| int render_view_id,
|
| const StreamDeviceInfo& device_info,
|
| const blink::WebMediaConstraints& constraints,
|
| - WebRtcAudioDeviceImpl* audio_device);
|
| + WebRtcAudioDeviceImpl* audio_device,
|
| + MediaStreamAudioSource* audio_source);
|
|
|
|
|
| // Add a audio track to the sinks of the capturer.
|
| @@ -99,8 +101,8 @@ class CONTENT_EXPORT WebRtcAudioCapturer
|
|
|
| // Stops recording audio. This method will empty its track lists since
|
| // stopping the capturer will implicitly invalidate all its tracks.
|
| - // This method is exposed to the public because the media stream track can
|
| - // call Stop() on its source.
|
| + // This method is exposed to the public because the MediaStreamAudioSource can
|
| + // call Stop()
|
| void Stop();
|
|
|
| // Called by the WebAudioCapturerSource to get the audio processing params.
|
| @@ -128,7 +130,8 @@ class CONTENT_EXPORT WebRtcAudioCapturer
|
| WebRtcAudioCapturer(int render_view_id,
|
| const StreamDeviceInfo& device_info,
|
| const blink::WebMediaConstraints& constraints,
|
| - WebRtcAudioDeviceImpl* audio_device);
|
| + WebRtcAudioDeviceImpl* audio_device,
|
| + MediaStreamAudioSource* audio_source);
|
|
|
| // AudioCapturerSource::CaptureCallback implementation.
|
| // Called on the AudioInputDevice audio thread.
|
| @@ -207,6 +210,15 @@ class CONTENT_EXPORT WebRtcAudioCapturer
|
| // of RenderThread.
|
| WebRtcAudioDeviceImpl* audio_device_;
|
|
|
| + // Raw pointer to the MediaStreamAudioSource object that holds a reference
|
| + // to this WebRtcAudioCapturer.
|
| + // Since |audio_source_| is owned by a blink::WebMediaStreamSource object and
|
| + // blink guarantees that the blink::WebMediaStreamSource outlives any
|
| + // blink::WebMediaStreamTrack connected to the source, |audio_source_| is
|
| + // guaranteed to exist as long as a WebRtcLocalAudioTrack is connected to this
|
| + // WebRtcAudioCapturer.
|
| + MediaStreamAudioSource* const audio_source_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer);
|
| };
|
|
|
|
|