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

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

Issue 1151603008: Make the BWE threshold adaptive. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Experiment simplified - removed Var2 prefix. Created 5 years, 6 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 6bbb34328e1ca313381f60a0e66f86905aaa3aa2..f91f1ccdf59a1f6aaccd69ebce58d731d6521805 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
@@ -150,9 +150,9 @@ void RemoteBitrateEstimatorImpl::IncomingPacket(int64_t arrival_time_ms,
estimator->estimator.num_of_deltas(), now_ms);
}
if (estimator->detector.State() == kBwOverusing) {
- uint32_t incoming_bitrate = incoming_bitrate_.Rate(now_ms);
+ uint32_t incoming_bitrate_bps = incoming_bitrate_.Rate(now_ms);
if (prior_state != kBwOverusing ||
- remote_rate_->TimeToReduceFurther(now_ms, incoming_bitrate)) {
+ remote_rate_->TimeToReduceFurther(now_ms, incoming_bitrate_bps)) {
// The first overuse should immediately trigger a new estimate.
// We also have to update the estimate immediately if we are overusing
// and the target bitrate is too high compared to what we are receiving.
@@ -218,7 +218,7 @@ void RemoteBitrateEstimatorImpl::UpdateEstimate(int64_t now_ms) {
const RateControlInput input(bw_state,
incoming_bitrate_.Rate(now_ms),
mean_noise_var);
- const RateControlRegion region = remote_rate_->Update(&input, now_ms);
+ remote_rate_->Update(&input, now_ms);
unsigned int target_bitrate = remote_rate_->UpdateBandwidthEstimate(now_ms);
if (remote_rate_->ValidEstimate()) {
process_interval_ms_ = remote_rate_->GetFeedbackInterval();
@@ -226,9 +226,6 @@ void RemoteBitrateEstimatorImpl::UpdateEstimate(int64_t now_ms) {
GetSsrcs(&ssrcs);
observer_->OnReceiveBitrateChanged(ssrcs, target_bitrate);
}
- for (it = overuse_detectors_.begin(); it != overuse_detectors_.end(); ++it) {
- it->second->detector.SetRateControlRegion(region);
- }
}
void RemoteBitrateEstimatorImpl::OnRttUpdate(int64_t rtt) {

Powered by Google App Engine
This is Rietveld 408576698