Make congestion window pushback drop frame experiment config default.

Bug: None
Change-Id: Ic3138b691cdf535e3d0e95ee6c1d63794414a1e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204803
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33177}
This commit is contained in:
Ying Wang 2021-02-05 11:07:00 +01:00 committed by Commit Bot
parent 1184b5537f
commit 4593047ee1
3 changed files with 38 additions and 8 deletions

View File

@ -24,10 +24,13 @@ namespace webrtc {
namespace {
const int kDefaultAcceptedQueueMs = 250;
const int kDefaultAcceptedQueueMs = 350;
const int kDefaultMinPushbackTargetBitrateBps = 30000;
const char kCongestionWindowDefaultFieldTrialString[] =
"QueueSize:350,MinBitrate:30000,DropFrame:true";
const char kUseBaseHeavyVp8Tl3RateAllocationFieldTrialName[] =
"WebRTC-UseBaseHeavyVP8TL3RateAllocation";
@ -91,9 +94,13 @@ std::unique_ptr<StructParametersParser> VideoRateControlConfig::Parser() {
}
RateControlSettings::RateControlSettings(
const WebRtcKeyValueConfig* const key_value_config)
: congestion_window_config_(CongestionWindowConfig::Parse(
key_value_config->Lookup(CongestionWindowConfig::kKey))) {
const WebRtcKeyValueConfig* const key_value_config) {
std::string congestion_window_config =
key_value_config->Lookup(CongestionWindowConfig::kKey).empty()
? kCongestionWindowDefaultFieldTrialString
: key_value_config->Lookup(CongestionWindowConfig::kKey);
congestion_window_config_ =
CongestionWindowConfig::Parse(congestion_window_config);
video_config_.vp8_base_heavy_tl3_alloc = IsEnabled(
key_value_config, kUseBaseHeavyVp8Tl3RateAllocationFieldTrialName);
ParseHysteresisFactor(key_value_config, kVideoHysteresisFieldTrialname,

View File

@ -96,7 +96,7 @@ class RateControlSettings final {
explicit RateControlSettings(
const WebRtcKeyValueConfig* const key_value_config);
const CongestionWindowConfig congestion_window_config_;
CongestionWindowConfig congestion_window_config_;
VideoRateControlConfig video_config_;
};

View File

@ -20,7 +20,7 @@ namespace webrtc {
namespace {
TEST(RateControlSettingsTest, CongestionWindow) {
EXPECT_FALSE(
EXPECT_TRUE(
RateControlSettings::ParseFromFieldTrials().UseCongestionWindow());
test::ScopedFieldTrials field_trials(
@ -32,8 +32,8 @@ TEST(RateControlSettingsTest, CongestionWindow) {
}
TEST(RateControlSettingsTest, CongestionWindowPushback) {
EXPECT_FALSE(RateControlSettings::ParseFromFieldTrials()
.UseCongestionWindowPushback());
EXPECT_TRUE(RateControlSettings::ParseFromFieldTrials()
.UseCongestionWindowPushback());
test::ScopedFieldTrials field_trials(
"WebRTC-CongestionWindow/QueueSize:100,MinBitrate:100000/");
@ -44,6 +44,29 @@ TEST(RateControlSettingsTest, CongestionWindowPushback) {
100000u);
}
TEST(RateControlSettingsTest, CongestionWindowPushbackDropframe) {
EXPECT_TRUE(RateControlSettings::ParseFromFieldTrials()
.UseCongestionWindowPushback());
test::ScopedFieldTrials field_trials(
"WebRTC-CongestionWindow/"
"QueueSize:100,MinBitrate:100000,DropFrame:true/");
const RateControlSettings settings_after =
RateControlSettings::ParseFromFieldTrials();
EXPECT_TRUE(settings_after.UseCongestionWindowPushback());
EXPECT_EQ(settings_after.CongestionWindowMinPushbackTargetBitrateBps(),
100000u);
EXPECT_TRUE(settings_after.UseCongestionWindowDropFrameOnly());
}
TEST(RateControlSettingsTest, CongestionWindowPushbackDefaultConfig) {
const RateControlSettings settings =
RateControlSettings::ParseFromFieldTrials();
EXPECT_TRUE(settings.UseCongestionWindowPushback());
EXPECT_EQ(settings.CongestionWindowMinPushbackTargetBitrateBps(), 30000u);
EXPECT_TRUE(settings.UseCongestionWindowDropFrameOnly());
}
TEST(RateControlSettingsTest, PacingFactor) {
EXPECT_FALSE(RateControlSettings::ParseFromFieldTrials().GetPacingFactor());