OLD | NEW |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 bitrate_controller_->SetStartBitrate(start_bitrate_bps); | 181 bitrate_controller_->SetStartBitrate(start_bitrate_bps); |
182 } | 182 } |
183 bitrate_controller_->SetMinMaxBitrate(min_bitrate_bps, max_bitrate_bps); | 183 bitrate_controller_->SetMinMaxBitrate(min_bitrate_bps, max_bitrate_bps); |
184 if (remote_bitrate_estimator_) | 184 if (remote_bitrate_estimator_) |
185 remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps); | 185 remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps); |
186 min_bitrate_bps_ = min_bitrate_bps; | 186 min_bitrate_bps_ = min_bitrate_bps; |
187 transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate( | 187 transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate( |
188 min_bitrate_bps_); | 188 min_bitrate_bps_); |
189 } | 189 } |
190 | 190 |
| 191 void CongestionController::ResetBweBitrates(int start_bitrate_bps) { |
| 192 LOG(LS_INFO) << "Reset BWE bitrate to " << start_bitrate_bps; |
| 193 // TODO(holmer): Reset the BWE bitrate. |
| 194 } |
| 195 |
191 BitrateController* CongestionController::GetBitrateController() const { | 196 BitrateController* CongestionController::GetBitrateController() const { |
192 return bitrate_controller_.get(); | 197 return bitrate_controller_.get(); |
193 } | 198 } |
194 | 199 |
195 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( | 200 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( |
196 bool send_side_bwe) { | 201 bool send_side_bwe) { |
197 if (send_side_bwe) { | 202 if (send_side_bwe) { |
198 return &remote_estimator_proxy_; | 203 return &remote_estimator_proxy_; |
199 } else { | 204 } else { |
200 return remote_bitrate_estimator_.get(); | 205 return remote_bitrate_estimator_.get(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 return std::min(bitrate_controller_->TimeUntilNextProcess(), | 243 return std::min(bitrate_controller_->TimeUntilNextProcess(), |
239 remote_bitrate_estimator_->TimeUntilNextProcess()); | 244 remote_bitrate_estimator_->TimeUntilNextProcess()); |
240 } | 245 } |
241 | 246 |
242 void CongestionController::Process() { | 247 void CongestionController::Process() { |
243 bitrate_controller_->Process(); | 248 bitrate_controller_->Process(); |
244 remote_bitrate_estimator_->Process(); | 249 remote_bitrate_estimator_->Process(); |
245 } | 250 } |
246 | 251 |
247 } // namespace webrtc | 252 } // namespace webrtc |
OLD | NEW |