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

Unified Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc

Issue 1368943002: Fix suspend below min bitrate in new API by making it possible to set min bitrate at the receive-si… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
index 6fd54e97f932dfc0f55998e70c93c6964f062902..08e076e540ad3e834b603127b8b3089413134102 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
@@ -44,11 +44,10 @@ struct RemoteBitrateEstimatorSingleStream::Detector {
RemoteBitrateEstimatorSingleStream::RemoteBitrateEstimatorSingleStream(
RemoteBitrateObserver* observer,
- Clock* clock,
- uint32_t min_bitrate_bps)
+ Clock* clock)
: clock_(clock),
incoming_bitrate_(kBitrateWindowMs, 8000),
- remote_rate_(new AimdRateControl(min_bitrate_bps)),
+ remote_rate_(new AimdRateControl()),
observer_(observer),
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
last_process_time_(-1),
@@ -164,7 +163,7 @@ void RemoteBitrateEstimatorSingleStream::UpdateEstimate(int64_t now_ms) {
}
// We can't update the estimate if we don't have any active streams.
if (overuse_detectors_.empty()) {
- remote_rate_.reset(new AimdRateControl(remote_rate_->GetMinBitrate()));
+ remote_rate_.reset(new AimdRateControl());
return;
}
double mean_noise_var = sum_var_noise /
@@ -230,4 +229,9 @@ void RemoteBitrateEstimatorSingleStream::GetSsrcs(
}
}
+void RemoteBitrateEstimatorSingleStream::SetMinBitrate(int min_bitrate_bps) {
+ CriticalSectionScoped cs(crit_sect_.get());
+ remote_rate_->SetMinBitrate(min_bitrate_bps);
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698