Clean-up of unused PacingBufferPushback feature.
Bug: webrtc:8171 Change-Id: I2804d6c87fe8b645e6c65784bbc525050c74a375 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131387 Reviewed-by: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27517}
This commit is contained in:
parent
556258af55
commit
412dc5f27e
@ -174,9 +174,6 @@ class DEPRECATED_SendSideCongestionController
|
||||
|
||||
rtc::RaceChecker worker_race_;
|
||||
|
||||
bool pacer_pushback_experiment_ = false;
|
||||
float encoding_rate_ = 1.0;
|
||||
|
||||
std::unique_ptr<CongestionWindowPushbackController>
|
||||
congestion_window_pushback_controller_;
|
||||
|
||||
|
||||
@ -22,12 +22,6 @@
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
|
||||
// When PacerPushbackExperiment is enabled, build-up in the pacer due to
|
||||
// the congestion window and/or data spikes reduces encoder allocations.
|
||||
bool IsPacerPushbackExperimentEnabled() {
|
||||
return field_trial::IsEnabled("WebRTC-PacerPushbackExperiment");
|
||||
}
|
||||
|
||||
// By default, pacer emergency stops encoder when buffer reaches a high level.
|
||||
bool IsPacerEmergencyStopDisabled() {
|
||||
return field_trial::IsEnabled("WebRTC-DisablePacerEmergencyStop");
|
||||
@ -35,8 +29,7 @@ bool IsPacerEmergencyStopDisabled() {
|
||||
|
||||
} // namespace
|
||||
CongestionControlHandler::CongestionControlHandler()
|
||||
: pacer_pushback_experiment_(IsPacerPushbackExperimentEnabled()),
|
||||
disable_pacer_emergency_stop_(IsPacerEmergencyStopDisabled()) {
|
||||
: disable_pacer_emergency_stop_(IsPacerEmergencyStopDisabled()) {
|
||||
sequenced_checker_.Detach();
|
||||
}
|
||||
|
||||
@ -67,19 +60,6 @@ absl::optional<TargetTransferRate> CongestionControlHandler::GetUpdate() {
|
||||
bool pause_encoding = false;
|
||||
if (!network_available_) {
|
||||
pause_encoding = true;
|
||||
} else if (pacer_pushback_experiment_) {
|
||||
const int64_t queue_length_ms = pacer_expected_queue_ms_;
|
||||
if (queue_length_ms == 0) {
|
||||
encoding_rate_ratio_ = 1.0;
|
||||
} else if (queue_length_ms > 50) {
|
||||
double encoding_ratio = 1.0 - queue_length_ms / 1000.0;
|
||||
encoding_rate_ratio_ = std::min(encoding_rate_ratio_, encoding_ratio);
|
||||
encoding_rate_ratio_ = std::max(encoding_rate_ratio_, 0.0);
|
||||
}
|
||||
new_outgoing.target_rate = new_outgoing.target_rate * encoding_rate_ratio_;
|
||||
log_target_rate = new_outgoing.target_rate;
|
||||
if (new_outgoing.target_rate < DataRate::kbps(50))
|
||||
pause_encoding = true;
|
||||
} else if (!disable_pacer_emergency_stop_ &&
|
||||
pacer_expected_queue_ms_ > PacedSender::kMaxQueueLengthMs) {
|
||||
pause_encoding = true;
|
||||
|
||||
@ -43,10 +43,8 @@ class CongestionControlHandler {
|
||||
bool network_available_ = true;
|
||||
bool encoder_paused_in_last_report_ = false;
|
||||
|
||||
const bool pacer_pushback_experiment_;
|
||||
const bool disable_pacer_emergency_stop_;
|
||||
int64_t pacer_expected_queue_ms_ = 0;
|
||||
double encoding_rate_ratio_ = 1.0;
|
||||
|
||||
rtc::SequencedTaskChecker sequenced_checker_;
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(CongestionControlHandler);
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
|
||||
const char kPacerPushbackExperiment[] = "WebRTC-PacerPushbackExperiment";
|
||||
static const int64_t kRetransmitWindowSizeMs = 500;
|
||||
|
||||
// Makes sure that the bitrate and the min, max values are in valid range.
|
||||
@ -74,12 +73,6 @@ void SortPacketFeedbackVector(
|
||||
std::sort(input->begin(), input->end(), PacketFeedbackComparator());
|
||||
}
|
||||
|
||||
bool IsPacerPushbackExperimentEnabled(
|
||||
const WebRtcKeyValueConfig* const key_value_config) {
|
||||
return key_value_config->Lookup(kPacerPushbackExperiment).find("Enabled") ==
|
||||
0;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
DEPRECATED_SendSideCongestionController::
|
||||
@ -116,9 +109,7 @@ DEPRECATED_SendSideCongestionController::
|
||||
send_side_bwe_with_overhead_(
|
||||
key_value_config_->Lookup("WebRTC-SendSideBwe-WithOverhead")
|
||||
.find("Enabled") == 0),
|
||||
transport_overhead_bytes_per_packet_(0),
|
||||
pacer_pushback_experiment_(
|
||||
IsPacerPushbackExperimentEnabled(key_value_config_)) {
|
||||
transport_overhead_bytes_per_packet_(0) {
|
||||
RateControlSettings experiment_params =
|
||||
RateControlSettings::ParseFromKeyValueConfig(key_value_config);
|
||||
if (experiment_params.UseCongestionWindow()) {
|
||||
@ -500,21 +491,8 @@ void DEPRECATED_SendSideCongestionController::MaybeTriggerOnNetworkChanged() {
|
||||
rtc::CritScope lock(&network_state_lock_);
|
||||
bitrate_bps = congestion_window_pushback_controller_->UpdateTargetBitrate(
|
||||
bitrate_bps);
|
||||
} else if (!pacer_pushback_experiment_) {
|
||||
bitrate_bps = IsSendQueueFull() ? 0 : bitrate_bps;
|
||||
} else {
|
||||
int64_t queue_length_ms = pacer_->ExpectedQueueTimeMs();
|
||||
|
||||
if (queue_length_ms == 0) {
|
||||
encoding_rate_ = 1.0;
|
||||
} else if (queue_length_ms > 50) {
|
||||
float encoding_rate = 1.0 - queue_length_ms / 1000.0;
|
||||
encoding_rate_ = std::min(encoding_rate_, encoding_rate);
|
||||
encoding_rate_ = std::max(encoding_rate_, 0.0f);
|
||||
}
|
||||
|
||||
bitrate_bps *= encoding_rate_;
|
||||
bitrate_bps = bitrate_bps < 50000 ? 0 : bitrate_bps;
|
||||
bitrate_bps = IsSendQueueFull() ? 0 : bitrate_bps;
|
||||
}
|
||||
|
||||
if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) {
|
||||
|
||||
@ -365,43 +365,5 @@ TEST_F(LegacySendSideCongestionControllerTest, UpdatesDelayBasedEstimate) {
|
||||
EXPECT_LT(*target_bitrate_bps_, bitrate_before_delay);
|
||||
}
|
||||
|
||||
TEST_F(LegacySendSideCongestionControllerTest, PacerQueueEncodeRatePushback) {
|
||||
ScopedFieldTrials pushback_field_trial(
|
||||
"WebRTC-PacerPushbackExperiment/Enabled/");
|
||||
SetUp();
|
||||
|
||||
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(0));
|
||||
controller_->Process();
|
||||
|
||||
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(100));
|
||||
EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 0.9, _, _, _));
|
||||
controller_->Process();
|
||||
|
||||
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(50));
|
||||
controller_->Process();
|
||||
|
||||
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(0));
|
||||
EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _));
|
||||
controller_->Process();
|
||||
|
||||
const uint32_t kMinAdjustedBps = 50000;
|
||||
int expected_queue_threshold =
|
||||
1000 - kMinAdjustedBps * 1000.0 / kInitialBitrateBps;
|
||||
|
||||
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs())
|
||||
.WillOnce(Return(expected_queue_threshold));
|
||||
EXPECT_CALL(observer_, OnNetworkChanged(Ge(kMinAdjustedBps), _, _, _));
|
||||
controller_->Process();
|
||||
|
||||
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs())
|
||||
.WillOnce(Return(expected_queue_threshold + 1));
|
||||
EXPECT_CALL(observer_, OnNetworkChanged(0, _, _, _));
|
||||
controller_->Process();
|
||||
|
||||
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(0));
|
||||
EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _));
|
||||
controller_->Process();
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
||||
@ -101,7 +101,6 @@ struct CallTestConfig {
|
||||
if (tuning.use_bbr) {
|
||||
trials +=
|
||||
"WebRTC-BweCongestionController/Enabled,BBR/"
|
||||
"WebRTC-PacerPushbackExperiment/Enabled/"
|
||||
"WebRTC-Pacer-DrainQueue/Disabled/"
|
||||
"WebRTC-Pacer-PadInSilence/Enabled/"
|
||||
"WebRTC-Pacer-BlockAudio/Disabled/"
|
||||
|
||||
@ -60,8 +60,6 @@ namespace webrtc {
|
||||
|
||||
namespace {
|
||||
static const int kFullStackTestDurationSecs = 45;
|
||||
const char kPacerPushBackExperiment[] =
|
||||
"WebRTC-PacerPushbackExperiment/Enabled/";
|
||||
const char kVp8TrustedRateControllerFieldTrial[] =
|
||||
"WebRTC-LibvpxVp8TrustedRateController/Enabled/";
|
||||
|
||||
@ -1485,8 +1483,7 @@ class DualStreamsTest : public ::testing::TestWithParam<int> {};
|
||||
TEST_P(DualStreamsTest,
|
||||
ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) {
|
||||
test::ScopedFieldTrials field_trial(
|
||||
AppendFieldTrials(std::string(kPacerPushBackExperiment) +
|
||||
std::string(kScreenshareSimulcastExperiment)));
|
||||
AppendFieldTrials(std::string(kScreenshareSimulcastExperiment)));
|
||||
const int first_stream = GetParam();
|
||||
ParamsWithLogging dual_streams;
|
||||
|
||||
@ -1548,8 +1545,6 @@ TEST_P(DualStreamsTest,
|
||||
// !defined(WEBRTC_MAC)
|
||||
|
||||
TEST_P(DualStreamsTest, Conference_Restricted) {
|
||||
test::ScopedFieldTrials field_trial(
|
||||
AppendFieldTrials(std::string(kPacerPushBackExperiment)));
|
||||
const int first_stream = GetParam();
|
||||
ParamsWithLogging dual_streams;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user