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

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: 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ProbingResult probe_result = 95 ProbingResult probe_result =
96 probe_bitrate_estimator_.PacketFeedback(info); 96 probe_bitrate_estimator_.PacketFeedback(info);
97 if (probe_result.valid()) { 97 if (probe_result.valid()) {
98 remote_rate_.SetEstimate(probe_result.bps, probe_result.timestamp); 98 remote_rate_.SetEstimate(probe_result.bps, probe_result.timestamp);
99 observer_->OnProbeBitrate(probe_result.bps);
99 update_estimate = true; 100 update_estimate = true;
100 } 101 }
101 } 102 }
102 103
103 uint32_t send_time_24bits = 104 uint32_t send_time_24bits =
104 static_cast<uint32_t>(((static_cast<uint64_t>(info.send_time_ms) 105 static_cast<uint32_t>(((static_cast<uint64_t>(info.send_time_ms)
105 << kAbsSendTimeFraction) + 106 << kAbsSendTimeFraction) +
106 500) / 107 500) /
107 1000) & 108 1000) &
108 0x00FFFFFF; 109 0x00FFFFFF;
(...skipping 79 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