Adding direct congestion window pushback to encoders.

When CongestionWindowPushback experiment is enabled, the pacer is oblivious to the congestion window. The relation between outstanding data and the congestion window affects encoder allocations directly.

Bug: None
Change-Id: Iaacc1d460d44a4ff2d586934c4f9ceb067109337
Reviewed-on: https://webrtc-review.googlesource.com/74922
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23411}
This commit is contained in:
Ying Wang
2018-05-28 13:32:36 +02:00
committed by Commit Bot
parent 4e6cd5eaeb
commit 66eaed0393
3 changed files with 67 additions and 7 deletions

View File

@ -348,7 +348,13 @@ rtc::Optional<DataSize> GoogCcNetworkController::MaybeUpdateCongestionWindow() {
TimeDelta time_window =
TimeDelta::ms(*min_feedback_rtt_ms_ + accepted_queue_ms_);
DataSize data_window = last_bandwidth_ * time_window;
data_window = std::max(kMinCwnd, data_window);
if (current_data_window_) {
data_window =
std::max(kMinCwnd, (data_window + current_data_window_.value()) / 2);
} else {
data_window = std::max(kMinCwnd, data_window);
}
current_data_window_ = data_window;
RTC_LOG(LS_INFO) << "Feedback rtt: " << *min_feedback_rtt_ms_
<< " Bitrate: " << last_bandwidth_.bps();
return data_window;

View File

@ -89,6 +89,8 @@ class GoogCcNetworkController : public NetworkControllerInterface {
int64_t accepted_queue_ms_;
bool previously_in_alr = false;
rtc::Optional<DataSize> current_data_window_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GoogCcNetworkController);
};