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

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

Issue 1803063004: Reset the BWE when the network changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Updated comments 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 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 bitrate_controller_->SetStartBitrate(start_bitrate_bps); 182 bitrate_controller_->SetStartBitrate(start_bitrate_bps);
183 } 183 }
184 bitrate_controller_->SetMinMaxBitrate(min_bitrate_bps, max_bitrate_bps); 184 bitrate_controller_->SetMinMaxBitrate(min_bitrate_bps, max_bitrate_bps);
185 if (remote_bitrate_estimator_) 185 if (remote_bitrate_estimator_)
186 remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps); 186 remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps);
187 min_bitrate_bps_ = min_bitrate_bps; 187 min_bitrate_bps_ = min_bitrate_bps;
188 transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate( 188 transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate(
189 min_bitrate_bps_); 189 min_bitrate_bps_);
190 } 190 }
191 191
192 void CongestionController::ResetBweBitrates(int target_bitrate_bps) {
193 LOG(LS_INFO) << "Reset BWE bitrate to " << target_bitrate_bps;
194 // TODO(holmer): Reset the BWE bitrate.
195 }
196
192 BitrateController* CongestionController::GetBitrateController() const { 197 BitrateController* CongestionController::GetBitrateController() const {
193 return bitrate_controller_.get(); 198 return bitrate_controller_.get();
194 } 199 }
195 200
196 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( 201 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator(
197 bool send_side_bwe) { 202 bool send_side_bwe) {
198 if (send_side_bwe) { 203 if (send_side_bwe) {
199 return &remote_estimator_proxy_; 204 return &remote_estimator_proxy_;
200 } else { 205 } else {
201 return remote_bitrate_estimator_.get(); 206 return remote_bitrate_estimator_.get();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return std::min(bitrate_controller_->TimeUntilNextProcess(), 244 return std::min(bitrate_controller_->TimeUntilNextProcess(),
240 remote_bitrate_estimator_->TimeUntilNextProcess()); 245 remote_bitrate_estimator_->TimeUntilNextProcess());
241 } 246 }
242 247
243 void CongestionController::Process() { 248 void CongestionController::Process() {
244 bitrate_controller_->Process(); 249 bitrate_controller_->Process();
245 remote_bitrate_estimator_->Process(); 250 remote_bitrate_estimator_->Process();
246 } 251 }
247 252
248 } // namespace webrtc 253 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698