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

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: adding macro declaration 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // so wrapping works properly. 97 // so wrapping works properly.
98 uint32_t timestamp = send_time_24bits << kAbsSendTimeInterArrivalUpshift; 98 uint32_t timestamp = send_time_24bits << kAbsSendTimeInterArrivalUpshift;
99 99
100 uint32_t ts_delta = 0; 100 uint32_t ts_delta = 0;
101 int64_t t_delta = 0; 101 int64_t t_delta = 0;
102 int size_delta = 0; 102 int size_delta = 0;
103 if (inter_arrival_->ComputeDeltas(timestamp, info.arrival_time_ms, now_ms, 103 if (inter_arrival_->ComputeDeltas(timestamp, info.arrival_time_ms, now_ms,
104 info.payload_size, &ts_delta, &t_delta, 104 info.payload_size, &ts_delta, &t_delta,
105 &size_delta)) { 105 &size_delta)) {
106 double ts_delta_ms = (1000.0 * ts_delta) / (1 << kInterArrivalShift); 106 double ts_delta_ms = (1000.0 * ts_delta) / (1 << kInterArrivalShift);
107 estimator_->Update(t_delta, ts_delta_ms, size_delta, detector_.State()); 107 estimator_->Update(t_delta, ts_delta_ms, size_delta, detector_.State(),
108 info.arrival_time_ms);
108 detector_.Detect(estimator_->offset(), ts_delta_ms, 109 detector_.Detect(estimator_->offset(), ts_delta_ms,
109 estimator_->num_of_deltas(), info.arrival_time_ms); 110 estimator_->num_of_deltas(), info.arrival_time_ms);
110 } 111 }
111 112
112 int probing_bps = 0; 113 int probing_bps = 0;
113 if (info.probe_cluster_id != PacketInfo::kNotAProbe) { 114 if (info.probe_cluster_id != PacketInfo::kNotAProbe) {
114 probing_bps = 115 probing_bps =
115 probe_bitrate_estimator_.HandleProbeAndEstimateBitrate(info); 116 probe_bitrate_estimator_.HandleProbeAndEstimateBitrate(info);
116 } 117 }
117 118
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return true; 191 return true;
191 } 192 }
192 193
193 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { 194 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) {
194 // Called from both the configuration thread and the network thread. Shouldn't 195 // Called from both the configuration thread and the network thread. Shouldn't
195 // be called from the network thread in the future. 196 // be called from the network thread in the future.
196 rtc::CritScope lock(&crit_); 197 rtc::CritScope lock(&crit_);
197 remote_rate_.SetMinBitrate(min_bitrate_bps); 198 remote_rate_.SetMinBitrate(min_bitrate_bps);
198 } 199 }
199 } // namespace webrtc 200 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/bitrate_controller/bitrate_controller_impl.cc ('k') | webrtc/modules/remote_bitrate_estimator/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698