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

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

Issue 1207563002: Add flakiness check if there is no received packets in a certain period. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Address comments except for naming. Created 5 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
Index: talk/app/webrtc/webrtcsession.cc
diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc
index 5c8b2df754fe8d69dd5928e2a0477e3f2e8e50ab..0138513dcf184f26104c83ea3796ec63d7f7e4c1 100644
--- a/talk/app/webrtc/webrtcsession.cc
+++ b/talk/app/webrtc/webrtcsession.cc
@@ -489,6 +489,7 @@ WebRtcSession::WebRtcSession(
mediastream_signaling_(mediastream_signaling),
ice_observer_(NULL),
ice_connection_state_(PeerConnectionInterface::kIceConnectionNew),
+ ice_flaky_(false),
older_version_remote_peer_(false),
dtls_enabled_(false),
data_channel_type_(cricket::DCT_NONE),
@@ -1401,6 +1402,23 @@ void WebRtcSession::OnTransportFailed(cricket::Transport* transport) {
SetIceConnectionState(PeerConnectionInterface::kIceConnectionFailed);
}
+void WebRtcSession::OnTransportFlaky(cricket::Transport* transport) {
+ ASSERT(signaling_thread()->IsCurrent());
+ if (transport->HasChannels()) {
+ SetIceFlaky(transport->all_channels_flaky());
+ }
+}
+
+void WebRtcSession::SetIceFlaky(bool flaky) {
+ if (ice_flaky_ == flaky) {
+ return;
+ }
+ ice_flaky_ = flaky;
+ if (ice_observer_) {
+ ice_observer_->OnIceFlakinessChange(flaky);
+ }
+}
+
void WebRtcSession::OnTransportProxyCandidatesReady(
cricket::TransportProxy* proxy, const cricket::Candidates& candidates) {
ASSERT(signaling_thread()->IsCurrent());

Powered by Google App Engine
This is Rietveld 408576698