diff options
author | xians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-11 18:36:15 +0000 |
---|---|---|
committer | xians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-11 18:36:15 +0000 |
commit | f45f5b8eedd63cd8c01d5c5ebde50c86b79599e5 (patch) | |
tree | 1f114743e2eeec3dd9f4a1ca34436cc0b85e902c /content/renderer/media/webrtc_local_audio_track.h | |
parent | 125ef48aec816c059bdbd90764b59a1ff5a3f185 (diff) | |
download | chromium_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.h | 8 |
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, |