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

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

Issue 2296253002: Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true (Closed)
Patch Set: synchronizing remote_bitrate_estimator.gypi Created 4 years, 3 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // so wrapping works properly. 110 // so wrapping works properly.
111 uint32_t timestamp = send_time_24bits << kAbsSendTimeInterArrivalUpshift; 111 uint32_t timestamp = send_time_24bits << kAbsSendTimeInterArrivalUpshift;
112 112
113 uint32_t ts_delta = 0; 113 uint32_t ts_delta = 0;
114 int64_t t_delta = 0; 114 int64_t t_delta = 0;
115 int size_delta = 0; 115 int size_delta = 0;
116 if (inter_arrival_->ComputeDeltas(timestamp, info.arrival_time_ms, now_ms, 116 if (inter_arrival_->ComputeDeltas(timestamp, info.arrival_time_ms, now_ms,
117 info.payload_size, &ts_delta, &t_delta, 117 info.payload_size, &ts_delta, &t_delta,
118 &size_delta)) { 118 &size_delta)) {
119 double ts_delta_ms = (1000.0 * ts_delta) / (1 << kInterArrivalShift); 119 double ts_delta_ms = (1000.0 * ts_delta) / (1 << kInterArrivalShift);
120 estimator_->Update(t_delta, ts_delta_ms, size_delta, detector_.State()); 120 estimator_->Update(t_delta, ts_delta_ms, size_delta, detector_.State(),
121 info.arrival_time_ms);
121 detector_.Detect(estimator_->offset(), ts_delta_ms, 122 detector_.Detect(estimator_->offset(), ts_delta_ms,
122 estimator_->num_of_deltas(), info.arrival_time_ms); 123 estimator_->num_of_deltas(), info.arrival_time_ms);
123 } 124 }
124 125
125 if (!update_estimate) { 126 if (!update_estimate) {
126 // Check if it's time for a periodic update or if we should update because 127 // Check if it's time for a periodic update or if we should update because
127 // of an over-use. 128 // of an over-use.
128 if (last_update_ms_ == -1 || 129 if (last_update_ms_ == -1 ||
129 now_ms - last_update_ms_ > remote_rate_.GetFeedbackInterval()) { 130 now_ms - last_update_ms_ > remote_rate_.GetFeedbackInterval()) {
130 update_estimate = true; 131 update_estimate = true;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return true; 189 return true;
189 } 190 }
190 191
191 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { 192 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) {
192 // Called from both the configuration thread and the network thread. Shouldn't 193 // Called from both the configuration thread and the network thread. Shouldn't
193 // be called from the network thread in the future. 194 // be called from the network thread in the future.
194 rtc::CritScope lock(&crit_); 195 rtc::CritScope lock(&crit_);
195 remote_rate_.SetMinBitrate(min_bitrate_bps); 196 remote_rate_.SetMinBitrate(min_bitrate_bps);
196 } 197 }
197 } // namespace webrtc 198 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698