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

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

Issue 2263973004: Set send side bitrate estimate on successful probing attempt. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Fix 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 (kTimestampGroupLengthMs << kInterArrivalShift) / 1000, 88 (kTimestampGroupLengthMs << kInterArrivalShift) / 1000,
89 kTimestampToMs, true)); 89 kTimestampToMs, true));
90 estimator_.reset(new OveruseEstimator(OverUseDetectorOptions())); 90 estimator_.reset(new OveruseEstimator(OverUseDetectorOptions()));
91 } 91 }
92 last_seen_packet_ms_ = now_ms; 92 last_seen_packet_ms_ = now_ms;
93 93
94 if (info.probe_cluster_id != PacketInfo::kNotAProbe) { 94 if (info.probe_cluster_id != PacketInfo::kNotAProbe) {
95 int bps = probe_bitrate_estimator_.HandleProbeAndEstimateBitrate(info); 95 int bps = probe_bitrate_estimator_.HandleProbeAndEstimateBitrate(info);
96 if (bps > 0) { 96 if (bps > 0) {
97 remote_rate_.SetEstimate(bps, info.arrival_time_ms); 97 remote_rate_.SetEstimate(bps, info.arrival_time_ms);
98 observer_->OnProbeBitrate(bps);
98 update_estimate = true; 99 update_estimate = true;
99 } 100 }
100 } 101 }
101 102
102 uint32_t send_time_24bits = 103 uint32_t send_time_24bits =
103 static_cast<uint32_t>(((static_cast<uint64_t>(info.send_time_ms) 104 static_cast<uint32_t>(((static_cast<uint64_t>(info.send_time_ms)
104 << kAbsSendTimeFraction) + 105 << kAbsSendTimeFraction) +
105 500) / 106 500) /
106 1000) & 107 1000) &
107 0x00FFFFFF; 108 0x00FFFFFF;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return true; 188 return true;
188 } 189 }
189 190
190 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { 191 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) {
191 // Called from both the configuration thread and the network thread. Shouldn't 192 // Called from both the configuration thread and the network thread. Shouldn't
192 // be called from the network thread in the future. 193 // be called from the network thread in the future.
193 rtc::CritScope lock(&crit_); 194 rtc::CritScope lock(&crit_);
194 remote_rate_.SetMinBitrate(min_bitrate_bps); 195 remote_rate_.SetMinBitrate(min_bitrate_bps);
195 } 196 }
196 } // namespace webrtc 197 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698