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

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

Issue 2518923003: Pass time constant to bwe smoothing filter. (Closed)
Patch Set: Respond to comments. Created 4 years 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 131
132 DelayBasedBwe::DelayBasedBwe(Clock* clock) 132 DelayBasedBwe::DelayBasedBwe(Clock* clock)
133 : clock_(clock), 133 : clock_(clock),
134 inter_arrival_(), 134 inter_arrival_(),
135 estimator_(), 135 estimator_(),
136 detector_(OverUseDetectorOptions()), 136 detector_(OverUseDetectorOptions()),
137 receiver_incoming_bitrate_(), 137 receiver_incoming_bitrate_(),
138 last_update_ms_(-1), 138 last_update_ms_(-1),
139 last_seen_packet_ms_(-1), 139 last_seen_packet_ms_(-1),
140 uma_recorded_(false) { 140 uma_recorded_(false),
141 probing_interval_estimator_(&rate_control_) {
141 network_thread_.DetachFromThread(); 142 network_thread_.DetachFromThread();
142 } 143 }
143 144
144 DelayBasedBwe::Result DelayBasedBwe::IncomingPacketFeedbackVector( 145 DelayBasedBwe::Result DelayBasedBwe::IncomingPacketFeedbackVector(
145 const std::vector<PacketInfo>& packet_feedback_vector) { 146 const std::vector<PacketInfo>& packet_feedback_vector) {
146 RTC_DCHECK(network_thread_.CalledOnValidThread()); 147 RTC_DCHECK(network_thread_.CalledOnValidThread());
147 if (!uma_recorded_) { 148 if (!uma_recorded_) {
148 RTC_HISTOGRAM_ENUMERATION(kBweTypeHistogram, 149 RTC_HISTOGRAM_ENUMERATION(kBweTypeHistogram,
149 BweNames::kSendSideTransportSeqNum, 150 BweNames::kSendSideTransportSeqNum,
150 BweNames::kBweNamesMax); 151 BweNames::kBweNamesMax);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 *ssrcs = {kFixedSsrc}; 263 *ssrcs = {kFixedSsrc};
263 *bitrate_bps = rate_control_.LatestEstimate(); 264 *bitrate_bps = rate_control_.LatestEstimate();
264 return true; 265 return true;
265 } 266 }
266 267
267 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { 268 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) {
268 // Called from both the configuration thread and the network thread. Shouldn't 269 // Called from both the configuration thread and the network thread. Shouldn't
269 // be called from the network thread in the future. 270 // be called from the network thread in the future.
270 rate_control_.SetMinBitrate(min_bitrate_bps); 271 rate_control_.SetMinBitrate(min_bitrate_bps);
271 } 272 }
273
274 int DelayBasedBwe::GetProbingIntervalMs() const {
275 auto probing_interval_ms = probing_interval_estimator_.GetIntervalMs();
stefan-webrtc 2016/11/22 16:39:05 int
michaelt 2016/11/23 12:28:29 Its not a int. GetIntervalMs() returns a optional.
stefan-webrtc 2016/11/24 10:40:45 Ah. Why do we return an optional from the estimato
michaelt 2016/11/24 13:47:18 Right this don't make sense here. I removed the o
276 if (!probing_interval_ms)
277 return 0;
278
279 return *probing_interval_ms;
280 }
272 } // namespace webrtc 281 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698