| Index: webrtc/modules/congestion_controller/send_side_congestion_controller.cc
|
| diff --git a/webrtc/modules/congestion_controller/send_side_congestion_controller.cc b/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
|
| index 77203d6a8b9e6563070974585e4e2ee503935311..751b54151700027dfd803c1973ae04da20b1af08 100644
|
| --- a/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
|
| +++ b/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
|
| @@ -20,7 +20,6 @@
|
| #include "webrtc/modules/pacing/alr_detector.h"
|
| #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
|
| #include "webrtc/rtc_base/checks.h"
|
| -#include "webrtc/rtc_base/format_macros.h"
|
| #include "webrtc/rtc_base/logging.h"
|
| #include "webrtc/rtc_base/ptr_util.h"
|
| #include "webrtc/rtc_base/rate_limiter.h"
|
| @@ -32,27 +31,12 @@
|
| namespace {
|
|
|
| const char kCwndExperiment[] = "WebRTC-CwndExperiment";
|
| -const int64_t kDefaultAcceptedQueueMs = 250;
|
|
|
| bool CwndExperimentEnabled() {
|
| std::string experiment_string =
|
| webrtc::field_trial::FindFullName(kCwndExperiment);
|
| // The experiment is enabled iff the field trial string begins with "Enabled".
|
| return experiment_string.find("Enabled") == 0;
|
| -}
|
| -
|
| -bool ReadCwndExperimentParameter(int64_t* accepted_queue_ms) {
|
| - RTC_DCHECK(accepted_queue_ms);
|
| - std::string experiment_string =
|
| - webrtc::field_trial::FindFullName(kCwndExperiment);
|
| - int parsed_values =
|
| - sscanf(experiment_string.c_str(), "Enabled-%" PRId64, accepted_queue_ms);
|
| - if (parsed_values == 1) {
|
| - RTC_CHECK_GE(*accepted_queue_ms, 0)
|
| - << "Accepted must be greater than or equal to 0.";
|
| - return true;
|
| - }
|
| - return false;
|
| }
|
|
|
| static const int64_t kRetransmitWindowSizeMs = 500;
|
| @@ -131,15 +115,8 @@
|
| min_bitrate_bps_(congestion_controller::GetMinBitrateBps()),
|
| delay_based_bwe_(new DelayBasedBwe(event_log_, clock_)),
|
| in_cwnd_experiment_(CwndExperimentEnabled()),
|
| - accepted_queue_ms_(kDefaultAcceptedQueueMs),
|
| was_in_alr_(0) {
|
| delay_based_bwe_->SetMinBitrate(min_bitrate_bps_);
|
| - if (in_cwnd_experiment_ &&
|
| - !ReadCwndExperimentParameter(&accepted_queue_ms_)) {
|
| - LOG(LS_WARNING) << "Failed to parse parameters for CwndExperiment "
|
| - "from field trial string. Experiment disabled.";
|
| - in_cwnd_experiment_ = false;
|
| - }
|
| }
|
|
|
| SendSideCongestionController::~SendSideCongestionController() {}
|
| @@ -367,9 +344,10 @@
|
| // we don't try to limit the outstanding packets.
|
| if (!min_rtt_ms)
|
| return;
|
| + const int64_t kAcceptedQueueMs = 250;
|
| const size_t kMinCwndBytes = 2 * 1500;
|
| size_t max_outstanding_bytes =
|
| - std::max<size_t>((*min_rtt_ms + accepted_queue_ms_) *
|
| + std::max<size_t>((*min_rtt_ms + kAcceptedQueueMs) *
|
| last_reported_bitrate_bps_ / 1000 / 8,
|
| kMinCwndBytes);
|
| LOG(LS_INFO) << clock_->TimeInMilliseconds()
|
|
|