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

Unified Diff: talk/app/webrtc/peerconnection.cc

Issue 1231613002: Fixing scenario where track is rejected and later un-rejected. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removing obsolete method Created 5 years, 5 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 | « talk/app/webrtc/mediastreamsignaling.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/peerconnection.cc
diff --git a/talk/app/webrtc/peerconnection.cc b/talk/app/webrtc/peerconnection.cc
index 4c54d6f5feb62c2b4f1b5f25da091ac30d8e4439..d7f7ca1f4768a80597f9e1748bcbee983aa1f8cd 100644
--- a/talk/app/webrtc/peerconnection.cc
+++ b/talk/app/webrtc/peerconnection.cc
@@ -614,6 +614,14 @@ void PeerConnection::SetLocalDescription(
PostSetSessionDescriptionFailure(observer, error);
return;
}
+
+ // This is necessary because an audio/video channel may have been previously
+ // destroyed by removing it from the remote description, which would NOT
+ // destroy the local handler. So upon receiving a new local description,
+ // we may need to tell that local track handler to connect the capturer
+ // to the now re-created audio/video channel.
+ stream_handler_container_->RestartAllLocalTracks();
+
SetSessionDescriptionMsg* msg = new SetSessionDescriptionMsg(observer);
signaling_thread()->Post(this, MSG_SET_SESSIONDESCRIPTION_SUCCESS, msg);
}
@@ -637,6 +645,14 @@ void PeerConnection::SetRemoteDescription(
PostSetSessionDescriptionFailure(observer, error);
return;
}
+
+ // This is necessary because an audio/video channel may have been previously
+ // destroyed by removing it from the local description, which would NOT
+ // destroy the remote handler. So upon receiving a new remote description,
+ // we may need to tell that remote track handler to connect the renderer
+ // to the now re-created audio/video channel.
+ stream_handler_container_->RestartAllRemoteTracks();
+
SetSessionDescriptionMsg* msg = new SetSessionDescriptionMsg(observer);
signaling_thread()->Post(this, MSG_SET_SESSIONDESCRIPTION_SUCCESS, msg);
}
« no previous file with comments | « talk/app/webrtc/mediastreamsignaling.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698