Revert "Add new field trial for controlling congestion window settings"
This reverts commit dd33d8ec7113ae7bee1511dc9f3f2d6336a7f083. Reason for revert: Breaks upstream tests Original change's description: > Add new field trial for controlling congestion window settings > > Bug: None > Change-Id: Idb7425e394db74a9dfb4f3764a58710497adff56 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131127 > Reviewed-by: Magnus Flodman <mflodman@webrtc.org> > Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org> > Commit-Queue: Evan Shrubsole <eshr@google.com> > Cr-Commit-Position: refs/heads/master@{#27538} TBR=mflodman@webrtc.org,crodbro@webrtc.org,eshr@google.com Change-Id: I17c6c2ed109f4427657457065abe186ec8b3d10c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132322 Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Minyue Li <minyue@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27541}
This commit is contained in:
committed by
Commit Bot
parent
6fe6b5aad9
commit
bd167cf140
@ -16,7 +16,6 @@
|
||||
#include <string>
|
||||
|
||||
#include "api/transport/field_trial_based_config.h"
|
||||
#include "rtc_base/experiments/field_trial_parser.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
|
||||
@ -24,8 +23,11 @@ namespace webrtc {
|
||||
|
||||
namespace {
|
||||
|
||||
const char* kCongestionWindowFieldTrialName = "WebRTC-CwndExperiment";
|
||||
const int kDefaultAcceptedQueueMs = 250;
|
||||
|
||||
const char* kCongestionWindowPushbackFieldTrialName =
|
||||
"WebRTC-CongestionWindowPushback";
|
||||
const int kDefaultMinPushbackTargetBitrateBps = 30000;
|
||||
|
||||
const char kVp8TrustedRateControllerFieldTrialName[] =
|
||||
@ -41,6 +43,40 @@ const char* kScreenshareHysteresisFieldTrialname =
|
||||
// Default to 35% hysteresis for simulcast screenshare.
|
||||
const double kDefaultScreenshareHysteresisFactor = 1.35;
|
||||
|
||||
absl::optional<int> MaybeReadCwndExperimentParameter(
|
||||
const WebRtcKeyValueConfig* const key_value_config) {
|
||||
int64_t accepted_queue_ms;
|
||||
std::string experiment_string =
|
||||
key_value_config->Lookup(kCongestionWindowFieldTrialName);
|
||||
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 rtc::checked_cast<int>(accepted_queue_ms);
|
||||
} else if (experiment_string.find("Enabled") == 0) {
|
||||
return kDefaultAcceptedQueueMs;
|
||||
}
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
absl::optional<int> MaybeReadCongestionWindowPushbackExperimentParameter(
|
||||
const WebRtcKeyValueConfig* const key_value_config) {
|
||||
uint32_t min_pushback_target_bitrate_bps;
|
||||
std::string experiment_string =
|
||||
key_value_config->Lookup(kCongestionWindowPushbackFieldTrialName);
|
||||
int parsed_values = sscanf(experiment_string.c_str(), "Enabled-%" PRIu32,
|
||||
&min_pushback_target_bitrate_bps);
|
||||
if (parsed_values == 1) {
|
||||
RTC_CHECK_GE(min_pushback_target_bitrate_bps, 0)
|
||||
<< "Min pushback target bitrate must be greater than or equal to 0.";
|
||||
return rtc::checked_cast<int>(min_pushback_target_bitrate_bps);
|
||||
} else if (experiment_string.find("Enabled") == 0) {
|
||||
return kDefaultMinPushbackTargetBitrateBps;
|
||||
}
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
bool IsEnabled(const WebRtcKeyValueConfig* const key_value_config,
|
||||
absl::string_view key) {
|
||||
return key_value_config->Lookup(key).find("Enabled") == 0;
|
||||
@ -62,8 +98,12 @@ double ParseHysteresisFactor(const WebRtcKeyValueConfig* const key_value_config,
|
||||
|
||||
RateControlSettings::RateControlSettings(
|
||||
const WebRtcKeyValueConfig* const key_value_config)
|
||||
: congestion_window_("QueueSize"),
|
||||
congestion_window_pushback_("MinBitrate"),
|
||||
: congestion_window_("cwnd",
|
||||
MaybeReadCwndExperimentParameter(key_value_config)),
|
||||
congestion_window_pushback_(
|
||||
"cwnd_pushback",
|
||||
MaybeReadCongestionWindowPushbackExperimentParameter(
|
||||
key_value_config)),
|
||||
pacing_factor_("pacing_factor"),
|
||||
alr_probing_("alr_probing", false),
|
||||
trust_vp8_(
|
||||
@ -84,9 +124,8 @@ RateControlSettings::RateControlSettings(
|
||||
probe_max_allocation_("probe_max_allocation", true),
|
||||
bitrate_adjuster_("bitrate_adjuster", false),
|
||||
vp8_s0_boost_("vp8_s0_boost", true) {
|
||||
ParseFieldTrial({&congestion_window_, &congestion_window_pushback_},
|
||||
key_value_config->Lookup("WebRTC-CongestionWindow"));
|
||||
ParseFieldTrial({&pacing_factor_, &alr_probing_, &trust_vp8_, &trust_vp9_,
|
||||
ParseFieldTrial({&congestion_window_, &congestion_window_pushback_,
|
||||
&pacing_factor_, &alr_probing_, &trust_vp8_, &trust_vp9_,
|
||||
&video_hysteresis_, &screenshare_hysteresis_,
|
||||
&probe_max_allocation_, &bitrate_adjuster_, &vp8_s0_boost_},
|
||||
key_value_config->Lookup("WebRTC-VideoRateControl"));
|
||||
|
||||
Reference in New Issue
Block a user