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

Unified Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 310013002: Fix the race when the WebRtcAudioDeviceImpl goes away before capturers stop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed unittests Created 6 years, 6 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
« no previous file with comments | « no previous file | content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/peer_connection_dependency_factory.cc
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index c4d69dd64a109db2ab9ce5e5107452a876f9acd9..a9652e797cc2303c4b9aa4702d17d951960f9dcd 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -447,9 +447,11 @@ void PeerConnectionDependencyFactory::CreateLocalAudioTrack(
void PeerConnectionDependencyFactory::StartLocalAudioTrack(
WebRtcLocalAudioTrack* audio_track) {
// Add the WebRtcAudioDevice as the sink to the local audio track.
- // TODO(xians): Implement a PeerConnection sink adapter and remove this
- // AddSink() call.
- audio_track->AddSink(GetWebRtcAudioDevice());
+ // TODO(xians): Remove the following line of code after the APM in WebRTC is
+ // completely deprecated. See http://crbug/365672.
+ if (!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled())
+ audio_track->AddSink(GetWebRtcAudioDevice());
+
// Start the audio track. This will hook the |audio_track| to the capturer
// as the sink of the audio, and only start the source of the capturer if
// it is the first audio track connecting to the capturer.
« no previous file with comments | « no previous file | content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698