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

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

Issue 2735423002: Mark |Clock*| as |const Clock*| (for some CongestionController and BWE related modules) (Closed)
Patch Set: Rebased Created 3 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 sum_ += bytes; 223 sum_ += bytes;
224 return bitrate_sample; 224 return bitrate_sample;
225 } 225 }
226 226
227 rtc::Optional<uint32_t> DelayBasedBwe::BitrateEstimator::bitrate_bps() const { 227 rtc::Optional<uint32_t> DelayBasedBwe::BitrateEstimator::bitrate_bps() const {
228 if (bitrate_estimate_ < 0.f) 228 if (bitrate_estimate_ < 0.f)
229 return rtc::Optional<uint32_t>(); 229 return rtc::Optional<uint32_t>();
230 return rtc::Optional<uint32_t>(bitrate_estimate_ * 1000); 230 return rtc::Optional<uint32_t>(bitrate_estimate_ * 1000);
231 } 231 }
232 232
233 DelayBasedBwe::DelayBasedBwe(RtcEventLog* event_log, Clock* clock) 233 DelayBasedBwe::DelayBasedBwe(RtcEventLog* event_log, const Clock* clock)
234 : in_trendline_experiment_(TrendlineFilterExperimentIsEnabled()), 234 : in_trendline_experiment_(TrendlineFilterExperimentIsEnabled()),
235 in_median_slope_experiment_(MedianSlopeFilterExperimentIsEnabled()), 235 in_median_slope_experiment_(MedianSlopeFilterExperimentIsEnabled()),
236 event_log_(event_log), 236 event_log_(event_log),
237 clock_(clock), 237 clock_(clock),
238 inter_arrival_(), 238 inter_arrival_(),
239 kalman_estimator_(), 239 kalman_estimator_(),
240 trendline_estimator_(), 240 trendline_estimator_(),
241 detector_(), 241 detector_(),
242 receiver_incoming_bitrate_(), 242 receiver_incoming_bitrate_(),
243 last_update_ms_(-1), 243 last_update_ms_(-1),
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { 477 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) {
478 // Called from both the configuration thread and the network thread. Shouldn't 478 // Called from both the configuration thread and the network thread. Shouldn't
479 // be called from the network thread in the future. 479 // be called from the network thread in the future.
480 rate_control_.SetMinBitrate(min_bitrate_bps); 480 rate_control_.SetMinBitrate(min_bitrate_bps);
481 } 481 }
482 482
483 int64_t DelayBasedBwe::GetProbingIntervalMs() const { 483 int64_t DelayBasedBwe::GetProbingIntervalMs() const {
484 return probing_interval_estimator_.GetIntervalMs(); 484 return probing_interval_estimator_.GetIntervalMs();
485 } 485 }
486 } // namespace webrtc 486 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698