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

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

Issue 2193043002: congestion controller: Fix network route change handling (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // TODO(honghaiz): Recreate this object once the bitrate controller is 240 // TODO(honghaiz): Recreate this object once the bitrate controller is
241 // no longer exposed outside CongestionController. 241 // no longer exposed outside CongestionController.
242 bitrate_controller_->ResetBitrates(bitrate_bps, min_bitrate_bps, 242 bitrate_controller_->ResetBitrates(bitrate_bps, min_bitrate_bps,
243 max_bitrate_bps); 243 max_bitrate_bps);
244 min_bitrate_bps_ = min_bitrate_bps; 244 min_bitrate_bps_ = min_bitrate_bps;
245 // TODO(honghaiz): Recreate this object once the remote bitrate estimator is 245 // TODO(honghaiz): Recreate this object once the remote bitrate estimator is
246 // no longer exposed outside CongestionController. 246 // no longer exposed outside CongestionController.
247 if (remote_bitrate_estimator_) 247 if (remote_bitrate_estimator_)
248 remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps); 248 remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps);
249 249
250 RemoteBitrateEstimator* rbe = new RemoteBitrateEstimatorAbsSendTime( 250 RemoteBitrateEstimator* rbe = new DelayBasedBwe(
251 &transport_feedback_adapter_, clock_); 251 &transport_feedback_adapter_, clock_);
252 transport_feedback_adapter_.SetBitrateEstimator(rbe); 252 transport_feedback_adapter_.SetBitrateEstimator(rbe);
253 rbe->SetMinBitrate(min_bitrate_bps); 253 rbe->SetMinBitrate(min_bitrate_bps);
254 // TODO(holmer): Trigger a new probe once mid-call probing is implemented. 254 // TODO(holmer): Trigger a new probe once mid-call probing is implemented.
255 MaybeTriggerOnNetworkChanged(); 255 MaybeTriggerOnNetworkChanged();
256 } 256 }
257 257
258 BitrateController* CongestionController::GetBitrateController() const { 258 BitrateController* CongestionController::GetBitrateController() const {
259 return bitrate_controller_.get(); 259 return bitrate_controller_.get();
260 } 260 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 bool CongestionController::IsSendQueueFull() const { 376 bool CongestionController::IsSendQueueFull() const {
377 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; 377 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs;
378 } 378 }
379 379
380 bool CongestionController::IsNetworkDown() const { 380 bool CongestionController::IsNetworkDown() const {
381 rtc::CritScope cs(&critsect_); 381 rtc::CritScope cs(&critsect_);
382 return network_state_ == kNetworkDown; 382 return network_state_ == kNetworkDown;
383 } 383 }
384 384
385 } // namespace webrtc 385 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698