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 c69bd1a429da5b0eb3e867644d4eaf5b97706cf1..8fe82c4997a69ccbbc5d411ea7e3cc935fda1676 100644 |
--- a/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc |
+++ b/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc |
@@ -112,7 +112,15 @@ int ProbeBitrateEstimator::HandleProbeAndEstimateBitrate( |
<< " [receive: " << receive_size << " bytes / " |
<< receive_interval_ms << " ms = " << receive_bps / 1000 |
<< " kb/s]"; |
- return std::min(send_bps, receive_bps); |
+ |
+ estimated_bitrate_bps_ = rtc::Optional<int>(std::min(send_bps, receive_bps)); |
+ return *estimated_bitrate_bps_; |
+} |
+ |
+rtc::Optional<int> ProbeBitrateEstimator::FetchLastEstimatedBitrateBps() { |
stefan-webrtc
2017/03/28 08:38:28
FetchAndReset...
michaelt
2017/03/28 09:59:13
Done.
|
+ rtc::Optional<int> estimated_bitrate_bps = estimated_bitrate_bps_; |
+ estimated_bitrate_bps_.reset(); |
+ return estimated_bitrate_bps; |
} |
void ProbeBitrateEstimator::EraseOldClusters(int64_t timestamp_ms) { |