From dda037db07df96f62df32c47637fa55d068516ee Mon Sep 17 00:00:00 2001 From: Danil Chapovalov Date: Tue, 9 Jan 2024 11:48:13 +0100 Subject: [PATCH] Remove unused field trial DisablePacerEmergencyStop This field trial was added 5 years ago in https://webrtc-review.googlesource.com/c/src/+/111883 probably as a safe guard, but looks never used. Bug: webrtc:11503 Change-Id: Ia9544b652b25fad4c614d66fe020f3d994c96505 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333380 Commit-Queue: Danil Chapovalov Reviewed-by: Per Kjellander Cr-Commit-Position: refs/heads/main@{#41490} --- experiments/field_trials.py | 3 --- modules/congestion_controller/rtp/BUILD.gn | 1 - .../rtp/control_handler.cc | 18 ++---------------- .../rtp/control_handler.h | 6 +++--- 4 files changed, 5 insertions(+), 23 deletions(-) diff --git a/experiments/field_trials.py b/experiments/field_trials.py index 7e1643647d..82761a2659 100755 --- a/experiments/field_trials.py +++ b/experiments/field_trials.py @@ -568,9 +568,6 @@ POLICY_EXEMPT_FIELD_TRIALS: FrozenSet[FieldTrial] = frozenset([ FieldTrial('WebRTC-DependencyDescriptorAdvertised', 'webrtc:10342', date(2024, 4, 1)), - FieldTrial('WebRTC-DisablePacerEmergencyStop', - '', - date(2024, 4, 1)), FieldTrial('WebRTC-DisableUlpFecExperiment', '', date(2024, 4, 1)), diff --git a/modules/congestion_controller/rtp/BUILD.gn b/modules/congestion_controller/rtp/BUILD.gn index cd13332b7f..8ec755e1aa 100644 --- a/modules/congestion_controller/rtp/BUILD.gn +++ b/modules/congestion_controller/rtp/BUILD.gn @@ -34,7 +34,6 @@ rtc_library("control_handler") { "../../../rtc_base:safe_conversions", "../../../rtc_base:safe_minmax", "../../../rtc_base/system:no_unique_address", - "../../../system_wrappers:field_trial", "../../pacing", ] absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] diff --git a/modules/congestion_controller/rtp/control_handler.cc b/modules/congestion_controller/rtp/control_handler.cc index da6451c97e..357a0f0798 100644 --- a/modules/congestion_controller/rtp/control_handler.cc +++ b/modules/congestion_controller/rtp/control_handler.cc @@ -18,21 +18,8 @@ #include "rtc_base/logging.h" #include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/safe_minmax.h" -#include "system_wrappers/include/field_trial.h" namespace webrtc { -namespace { - -// By default, pacer emergency stops encoder when buffer reaches a high level. -bool IsPacerEmergencyStopDisabled() { - return field_trial::IsEnabled("WebRTC-DisablePacerEmergencyStop"); -} - -} // namespace -CongestionControlHandler::CongestionControlHandler() - : disable_pacer_emergency_stop_(IsPacerEmergencyStopDisabled()) {} - -CongestionControlHandler::~CongestionControlHandler() {} void CongestionControlHandler::SetTargetRate( TargetTransferRate new_target_rate) { @@ -60,9 +47,8 @@ absl::optional CongestionControlHandler::GetUpdate() { bool pause_encoding = false; if (!network_available_) { pause_encoding = true; - } else if (!disable_pacer_emergency_stop_ && - pacer_expected_queue_ms_ > - PacingController::kMaxExpectedQueueLength.ms()) { + } else if (pacer_expected_queue_ms_ > + PacingController::kMaxExpectedQueueLength.ms()) { pause_encoding = true; } if (pause_encoding) diff --git a/modules/congestion_controller/rtp/control_handler.h b/modules/congestion_controller/rtp/control_handler.h index d8e7263a02..649d2f911e 100644 --- a/modules/congestion_controller/rtp/control_handler.h +++ b/modules/congestion_controller/rtp/control_handler.h @@ -28,12 +28,13 @@ namespace webrtc { // destruction unless members are properly ordered. class CongestionControlHandler { public: - CongestionControlHandler(); - ~CongestionControlHandler(); + CongestionControlHandler() = default; CongestionControlHandler(const CongestionControlHandler&) = delete; CongestionControlHandler& operator=(const CongestionControlHandler&) = delete; + ~CongestionControlHandler() = default; + void SetTargetRate(TargetTransferRate new_target_rate); void SetNetworkAvailability(bool network_available); void SetPacerQueue(TimeDelta expected_queue_time); @@ -45,7 +46,6 @@ class CongestionControlHandler { bool network_available_ = true; bool encoder_paused_in_last_report_ = false; - const bool disable_pacer_emergency_stop_; int64_t pacer_expected_queue_ms_ = 0; RTC_NO_UNIQUE_ADDRESS SequenceChecker sequenced_checker_;