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

Unified Diff: webrtc/modules/congestion_controller/probe_bitrate_estimator.cc

Issue 2407143002: Remove GetFeedbackInterval in sender side BWE. (Closed)
Patch Set: Respond to comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/congestion_controller/probe_bitrate_estimator.cc
diff --git a/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc b/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc
index 8406387eceb8aaa158d3883594e6a29211be60b0..2d66198ef833744eadf6c4184c00bdbc00b76ef4 100644
--- a/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc
+++ b/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc
@@ -133,10 +133,19 @@ int ProbeBitrateEstimator::HandleProbeAndEstimateBitrate(
<< " [receive: " << receive_size << " bytes / "
<< receive_interval_ms << " ms = " << receive_bps / 1000
<< " kb/s]";
+
float res = std::min(send_bps, receive_bps);
if (event_log_)
event_log_->LogProbeResultSuccess(cluster_id, res);
- return res;
+ estimated_bitrate_bps_ = rtc::Optional<int>(std::min(send_bps, res));
+ return *estimated_bitrate_bps_;
+}
+
+rtc::Optional<int>
+ProbeBitrateEstimator::FetchAndResetLastEstimatedBitrateBps() {
+ rtc::Optional<int> estimated_bitrate_bps = estimated_bitrate_bps_;
+ estimated_bitrate_bps_.reset();
+ return estimated_bitrate_bps;
}
void ProbeBitrateEstimator::EraseOldClusters(int64_t timestamp_ms) {

Powered by Google App Engine
This is Rietveld 408576698