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

Unified Diff: webrtc/pc/channel.cc

Issue 1803063004: Reset the BWE when the network changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Removed changes in call dir and leave that in a separate CL. Created 4 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
« no previous file with comments | « webrtc/pc/channel.h ('k') | webrtc/pc/channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channel.cc
diff --git a/webrtc/pc/channel.cc b/webrtc/pc/channel.cc
index 8e916f12793802f245313b3c088050b128961cdc..25ba2c0586ccf1020e0ad4bf03743e28721c9f4d 100644
--- a/webrtc/pc/channel.cc
+++ b/webrtc/pc/channel.cc
@@ -19,6 +19,7 @@
#include "webrtc/base/copyonwritebuffer.h"
#include "webrtc/base/dscp.h"
#include "webrtc/base/logging.h"
+#include "webrtc/base/networkroute.h"
#include "webrtc/base/trace_event.h"
#include "webrtc/media/base/mediaconstants.h"
#include "webrtc/media/base/rtputils.h"
@@ -346,6 +347,8 @@ void BaseChannel::ConnectToTransportChannel(TransportChannel* tc) {
tc->SignalReadPacket.connect(this, &BaseChannel::OnChannelRead);
tc->SignalReadyToSend.connect(this, &BaseChannel::OnReadyToSend);
tc->SignalDtlsState.connect(this, &BaseChannel::OnDtlsState);
+ tc->SignalSelectedCandidatePairChanged.connect(
+ this, &BaseChannel::OnSelectedCandidatePairChanged);
}
void BaseChannel::DisconnectFromTransportChannel(TransportChannel* tc) {
@@ -504,6 +507,20 @@ void BaseChannel::OnDtlsState(TransportChannel* channel,
}
}
+void BaseChannel::OnSelectedCandidatePairChanged(
+ TransportChannel* channel,
+ CandidatePairInterface* selected_candidate_pair) {
+ ASSERT(channel == transport_channel_ || channel == rtcp_transport_channel_);
+ NetworkRoute network_route;
+ if (selected_candidate_pair) {
+ network_route =
+ NetworkRoute(selected_candidate_pair->local_candidate().network_id(),
+ selected_candidate_pair->remote_candidate().network_id());
+ }
+ media_channel()->OnNetworkRouteChanged(channel->transport_name(),
+ network_route);
+}
+
void BaseChannel::SetReadyToSend(bool rtcp, bool ready) {
if (rtcp) {
rtcp_ready_to_send_ = ready;
« no previous file with comments | « webrtc/pc/channel.h ('k') | webrtc/pc/channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698