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

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

Issue 1746683002: Remove thread checker from CongestionController. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/include/congestion_controller.h » ('j') | 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 min_bitrate_bps_); 161 min_bitrate_bps_);
162 } 162 }
163 163
164 CongestionController::~CongestionController() { 164 CongestionController::~CongestionController() {
165 } 165 }
166 166
167 167
168 void CongestionController::SetBweBitrates(int min_bitrate_bps, 168 void CongestionController::SetBweBitrates(int min_bitrate_bps,
169 int start_bitrate_bps, 169 int start_bitrate_bps,
170 int max_bitrate_bps) { 170 int max_bitrate_bps) {
171 RTC_DCHECK(config_thread_checker_.CalledOnValidThread());
172 // TODO(holmer): We should make sure the default bitrates are set to 10 kbps, 171 // TODO(holmer): We should make sure the default bitrates are set to 10 kbps,
173 // and that we don't try to set the min bitrate to 0 from any applications. 172 // and that we don't try to set the min bitrate to 0 from any applications.
174 // The congestion controller should allow a min bitrate of 0. 173 // The congestion controller should allow a min bitrate of 0.
175 const int kMinBitrateBps = 10000; 174 const int kMinBitrateBps = 10000;
176 if (min_bitrate_bps < kMinBitrateBps) 175 if (min_bitrate_bps < kMinBitrateBps)
177 min_bitrate_bps = kMinBitrateBps; 176 min_bitrate_bps = kMinBitrateBps;
178 if (max_bitrate_bps > 0) 177 if (max_bitrate_bps > 0)
179 max_bitrate_bps = std::max(min_bitrate_bps, max_bitrate_bps); 178 max_bitrate_bps = std::max(min_bitrate_bps, max_bitrate_bps);
180 if (start_bitrate_bps > 0) { 179 if (start_bitrate_bps > 0) {
181 start_bitrate_bps = std::max(min_bitrate_bps, start_bitrate_bps); 180 start_bitrate_bps = std::max(min_bitrate_bps, start_bitrate_bps);
(...skipping 15 matching lines...) Expand all
197 bool send_side_bwe) { 196 bool send_side_bwe) {
198 if (send_side_bwe) { 197 if (send_side_bwe) {
199 return &remote_estimator_proxy_; 198 return &remote_estimator_proxy_;
200 } else { 199 } else {
201 return remote_bitrate_estimator_.get(); 200 return remote_bitrate_estimator_.get();
202 } 201 }
203 } 202 }
204 203
205 TransportFeedbackObserver* 204 TransportFeedbackObserver*
206 CongestionController::GetTransportFeedbackObserver() { 205 CongestionController::GetTransportFeedbackObserver() {
207 RTC_DCHECK(config_thread_checker_.CalledOnValidThread());
208 return &transport_feedback_adapter_; 206 return &transport_feedback_adapter_;
209 } 207 }
210 208
211 void CongestionController::UpdatePacerBitrate(int bitrate_kbps, 209 void CongestionController::UpdatePacerBitrate(int bitrate_kbps,
212 int max_bitrate_kbps, 210 int max_bitrate_kbps,
213 int min_bitrate_kbps) { 211 int min_bitrate_kbps) {
214 pacer_->UpdateBitrate(bitrate_kbps, max_bitrate_kbps, min_bitrate_kbps); 212 pacer_->UpdateBitrate(bitrate_kbps, max_bitrate_kbps, min_bitrate_kbps);
215 } 213 }
216 214
217 int64_t CongestionController::GetPacerQueuingDelayMs() const { 215 int64_t CongestionController::GetPacerQueuingDelayMs() const {
(...skipping 22 matching lines...) Expand all
240 return std::min(bitrate_controller_->TimeUntilNextProcess(), 238 return std::min(bitrate_controller_->TimeUntilNextProcess(),
241 remote_bitrate_estimator_->TimeUntilNextProcess()); 239 remote_bitrate_estimator_->TimeUntilNextProcess());
242 } 240 }
243 241
244 void CongestionController::Process() { 242 void CongestionController::Process() {
245 bitrate_controller_->Process(); 243 bitrate_controller_->Process();
246 remote_bitrate_estimator_->Process(); 244 remote_bitrate_estimator_->Process();
247 } 245 }
248 246
249 } // namespace webrtc 247 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/include/congestion_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698