Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1487)

Unified Diff: content/renderer/media/webrtc_audio_capturer.h

Issue 218763007: Update MediaStreamTrack::Stop to latest draft. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments and added tests. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..bad62b9ee843aeef761c9ab8c6a049f9ff52699e 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 guarantee that the blink::WebMediaStreamSource outlives any
tommi (sloooow) - chröme 2014/04/03 08:53:16 guarantees
perkj_chrome 2014/04/03 11:58:34 Done.
+ // 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);
};

Powered by Google App Engine
This is Rietveld 408576698