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

Side by Side Diff: webrtc/modules/congestion_controller/congestion_controller.cc

Issue 2458863002: Start probes only after network is connected. (Closed)
Patch Set: sync Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 << (state == kNetworkUp ? "Up" : "Down"); 290 << (state == kNetworkUp ? "Up" : "Down");
291 if (state == kNetworkUp) { 291 if (state == kNetworkUp) {
292 pacer_->Resume(); 292 pacer_->Resume();
293 } else { 293 } else {
294 pacer_->Pause(); 294 pacer_->Pause();
295 } 295 }
296 { 296 {
297 rtc::CritScope cs(&critsect_); 297 rtc::CritScope cs(&critsect_);
298 network_state_ = state; 298 network_state_ = state;
299 } 299 }
300 probe_controller_->OnNetworkStateChanged(state);
300 MaybeTriggerOnNetworkChanged(); 301 MaybeTriggerOnNetworkChanged();
301 } 302 }
302 303
303 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { 304 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) {
304 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, 305 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id,
305 sent_packet.send_time_ms); 306 sent_packet.send_time_ms);
306 } 307 }
307 308
308 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { 309 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) {
309 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); 310 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 bool CongestionController::IsSendQueueFull() const { 369 bool CongestionController::IsSendQueueFull() const {
369 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; 370 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs;
370 } 371 }
371 372
372 bool CongestionController::IsNetworkDown() const { 373 bool CongestionController::IsNetworkDown() const {
373 rtc::CritScope cs(&critsect_); 374 rtc::CritScope cs(&critsect_);
374 return network_state_ == kNetworkDown; 375 return network_state_ == kNetworkDown;
375 } 376 }
376 377
377 } // namespace webrtc 378 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2_unittest.cc ('k') | webrtc/modules/congestion_controller/probe_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698