summaryrefslogtreecommitdiffstats
path: root/content/renderer/media/webrtc_local_audio_track.h
diff options
context:
space:
mode:
authorxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 18:36:15 +0000
committerxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 18:36:15 +0000
commitf45f5b8eedd63cd8c01d5c5ebde50c86b79599e5 (patch)
tree1f114743e2eeec3dd9f4a1ca34436cc0b85e902c /content/renderer/media/webrtc_local_audio_track.h
parent125ef48aec816c059bdbd90764b59a1ff5a3f185 (diff)
downloadchromium_src-f45f5b8eedd63cd8c01d5c5ebde50c86b79599e5.zip
chromium_src-f45f5b8eedd63cd8c01d5c5ebde50c86b79599e5.tar.gz
chromium_src-f45f5b8eedd63cd8c01d5c5ebde50c86b79599e5.tar.bz2
This patch starts the source of the capturer when the first audiotrack is added to the capturer; and stops the source of the capturer when the last audiotrack is removed from the capturer.
BUG=242520 TEST=content_unittests --gtest_filter=="*WebRtcLocalAudioTrackTest*" open chrome, go to https://apprtc.appspot.com/?debug=loopback after the call setup, open javascript console, run: navigator.webkitGetUserMedia({audio:true},function(s){s.stop();}) It should not stop the audio. Review URL: https://chromiumcodereview.appspot.com/15979027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media/webrtc_local_audio_track.h')
-rw-r--r--content/renderer/media/webrtc_local_audio_track.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/content/renderer/media/webrtc_local_audio_track.h b/content/renderer/media/webrtc_local_audio_track.h
index 660d696..7a4eeb7 100644
--- a/content/renderer/media/webrtc_local_audio_track.h
+++ b/content/renderer/media/webrtc_local_audio_track.h
@@ -44,6 +44,14 @@ class CONTENT_EXPORT WebRtcLocalAudioTrack
// Called on the main render thread.
void RemoveSink(WebRtcAudioCapturerSink* sink);
+ // Starts the local audio track. Called on the main render thread and
+ // should be called only once when audio track is created.
+ void Start();
+
+ // Stops the local audio track. Called on the main render thread and
+ // should be called only once when audio track going away.
+ void Stop();
+
protected:
WebRtcLocalAudioTrack(const std::string& label,
const scoped_refptr<WebRtcAudioCapturer>& capturer,