Chromium Code Reviews

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: Changing method names Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: talk/app/webrtc/webrtcsession.cc
diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc
index c0898ff79f3696ddc3ed2b0129503c5ab616bb97..0df5d848d6ba66273c1a09f19ba32e6cd3a4c43d 100644
--- a/talk/app/webrtc/webrtcsession.cc
+++ b/talk/app/webrtc/webrtcsession.cc
@@ -490,6 +490,7 @@ WebRtcSession::WebRtcSession(
mediastream_signaling_(mediastream_signaling),
ice_observer_(NULL),
ice_connection_state_(PeerConnectionInterface::kIceConnectionNew),
+ ice_connection_receiving_(true),
older_version_remote_peer_(false),
dtls_enabled_(false),
data_channel_type_(cricket::DCT_NONE),
@@ -1406,6 +1407,23 @@ void WebRtcSession::OnTransportFailed(cricket::Transport* transport) {
SetIceConnectionState(PeerConnectionInterface::kIceConnectionFailed);
}
+void WebRtcSession::OnTransportReceiving(cricket::Transport* transport) {
+ ASSERT(signaling_thread()->IsCurrent());
+ if (transport->HasChannels()) {
+ SetIceConnectionReceiving(transport->no_channel_receiving());
pthatcher1 2015/07/06 22:04:47 The session is receiving if no channel is receivin
honghaiz3 2015/08/05 23:56:57 Done. Modified as discussed.
+ }
+}
+
+void WebRtcSession::SetIceConnectionReceiving(bool receiving) {
+ if (ice_connection_receiving_ == receiving) {
+ return;
+ }
+ ice_connection_receiving_ = receiving;
+ if (ice_observer_) {
+ ice_observer_->OnIceConnectionReceivingChange(receiving);
+ }
+}
+
void WebRtcSession::OnTransportProxyCandidatesReady(
cricket::TransportProxy* proxy, const cricket::Candidates& candidates) {
ASSERT(signaling_thread()->IsCurrent());

Powered by Google App Engine