diff --git a/modules/congestion_controller/rtp/BUILD.gn b/modules/congestion_controller/rtp/BUILD.gn index 9bf78bcbe6..7330572e6f 100644 --- a/modules/congestion_controller/rtp/BUILD.gn +++ b/modules/congestion_controller/rtp/BUILD.gn @@ -23,11 +23,6 @@ rtc_source_set("control_handler") { "control_handler.h", ] - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - deps = [ "../:congestion_controller", "../../../api/transport:network_control", @@ -38,7 +33,6 @@ rtc_source_set("control_handler") { "../../../rtc_base:rate_limiter", "../../../rtc_base:safe_minmax", "../../../rtc_base:sequenced_task_checker", - "../../../rtc_base/experiments:congestion_controller_experiment", "../../../system_wrappers", "../../../system_wrappers:field_trial", "../../pacing", diff --git a/pc/BUILD.gn b/pc/BUILD.gn index e8ac9b960a..2a07e71e73 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -208,12 +208,10 @@ rtc_static_library("peerconnection") { "../logging:rtc_event_log_impl_output", "../media:rtc_data", "../media:rtc_media_base", - "../modules/congestion_controller/bbr", "../p2p:rtc_p2p", "../rtc_base:checks", "../rtc_base:rtc_base", "../rtc_base:rtc_base_approved", - "../rtc_base/experiments:congestion_controller_experiment", "../rtc_base/system:rtc_export", "../rtc_base/third_party/base64", "../rtc_base/third_party/sigslot", diff --git a/pc/peerconnectionfactory.cc b/pc/peerconnectionfactory.cc index 37c6a0b0bc..e1b3e6c0a3 100644 --- a/pc/peerconnectionfactory.cc +++ b/pc/peerconnectionfactory.cc @@ -37,7 +37,6 @@ #include "media/engine/webrtcvideodecoderfactory.h" // nogncheck #include "media/engine/webrtcvideoencoderfactory.h" // nogncheck #include "modules/audio_device/include/audio_device.h" // nogncheck -#include "modules/congestion_controller/bbr/bbr_factory.h" #include "p2p/base/basicpacketsocketfactory.h" #include "p2p/client/basicportallocator.h" #include "pc/audiotrack.h" @@ -46,7 +45,6 @@ #include "pc/peerconnection.h" #include "pc/videocapturertracksource.h" #include "pc/videotrack.h" -#include "rtc_base/experiments/congestion_controller_experiment.h" #include "system_wrappers/include/field_trial.h" namespace webrtc { @@ -147,9 +145,7 @@ PeerConnectionFactory::PeerConnectionFactory( event_log_factory_(std::move(event_log_factory)), fec_controller_factory_(std::move(fec_controller_factory)), injected_network_controller_factory_( - std::move(network_controller_factory)), - bbr_network_controller_factory_( - absl::make_unique()) { + std::move(network_controller_factory)) { if (!network_thread_) { owned_network_thread_ = rtc::Thread::CreateWithSocketServer(); owned_network_thread_->SetName("pc_network_thread", nullptr); @@ -478,11 +474,7 @@ std::unique_ptr PeerConnectionFactory::CreateCall_w( call_config.fec_controller_factory = fec_controller_factory_.get(); - if (CongestionControllerExperiment::BbrControllerEnabled()) { - RTC_LOG(LS_INFO) << "Using BBR network controller factory"; - call_config.network_controller_factory = - bbr_network_controller_factory_.get(); - } else if (CongestionControllerExperiment::InjectedControllerEnabled()) { + if (field_trial::IsEnabled("WebRTC-Bwe-InjectedCongestionController")) { RTC_LOG(LS_INFO) << "Using injected network controller factory"; call_config.network_controller_factory = injected_network_controller_factory_.get(); diff --git a/pc/peerconnectionfactory.h b/pc/peerconnectionfactory.h index 1c1ea94fe2..e64eb1083f 100644 --- a/pc/peerconnectionfactory.h +++ b/pc/peerconnectionfactory.h @@ -151,8 +151,6 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface { std::unique_ptr fec_controller_factory_; std::unique_ptr injected_network_controller_factory_; - std::unique_ptr - bbr_network_controller_factory_; std::unique_ptr media_transport_factory_; }; diff --git a/rtc_base/experiments/BUILD.gn b/rtc_base/experiments/BUILD.gn index d36a43e946..4b3f2a96e5 100644 --- a/rtc_base/experiments/BUILD.gn +++ b/rtc_base/experiments/BUILD.gn @@ -37,18 +37,6 @@ rtc_static_library("field_trial_parser") { ] } -rtc_static_library("congestion_controller_experiment") { - sources = [ - "congestion_controller_experiment.cc", - "congestion_controller_experiment.h", - ] - deps = [ - "../:rtc_base_approved", - "../../system_wrappers:field_trial", - "//third_party/abseil-cpp/absl/types:optional", - ] -} - rtc_static_library("quality_scaling_experiment") { sources = [ "quality_scaling_experiment.cc", @@ -114,7 +102,6 @@ if (rtc_include_tests) { testonly = true sources = [ - "congestion_controller_experiment_unittest.cc", "cpu_speed_experiment_unittest.cc", "field_trial_parser_unittest.cc", "field_trial_units_unittest.cc", @@ -123,7 +110,6 @@ if (rtc_include_tests) { "rtt_mult_experiment_unittest.cc", ] deps = [ - ":congestion_controller_experiment", ":cpu_speed_experiment", ":field_trial_parser", ":normalize_simulcast_size_experiment", diff --git a/rtc_base/experiments/congestion_controller_experiment.cc b/rtc_base/experiments/congestion_controller_experiment.cc deleted file mode 100644 index 2b7d776662..0000000000 --- a/rtc_base/experiments/congestion_controller_experiment.cc +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#include "rtc_base/experiments/congestion_controller_experiment.h" - -#include - -#include "system_wrappers/include/field_trial.h" - -namespace webrtc { -namespace { - -const char kControllerExperiment[] = "WebRTC-BweCongestionController"; -} // namespace - -bool CongestionControllerExperiment::BbrControllerEnabled() { - std::string trial_string = - webrtc::field_trial::FindFullName(kControllerExperiment); - return trial_string.find("Enabled,BBR") == 0; -} - -bool CongestionControllerExperiment::InjectedControllerEnabled() { - std::string trial_string = - webrtc::field_trial::FindFullName(kControllerExperiment); - return trial_string.find("Enabled,Injected") == 0; -} -} // namespace webrtc diff --git a/rtc_base/experiments/congestion_controller_experiment.h b/rtc_base/experiments/congestion_controller_experiment.h deleted file mode 100644 index 1f2d8ae70c..0000000000 --- a/rtc_base/experiments/congestion_controller_experiment.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef RTC_BASE_EXPERIMENTS_CONGESTION_CONTROLLER_EXPERIMENT_H_ -#define RTC_BASE_EXPERIMENTS_CONGESTION_CONTROLLER_EXPERIMENT_H_ - -namespace webrtc { -class CongestionControllerExperiment { - public: - static bool BbrControllerEnabled(); - static bool InjectedControllerEnabled(); -}; - -} // namespace webrtc - -#endif // RTC_BASE_EXPERIMENTS_CONGESTION_CONTROLLER_EXPERIMENT_H_ diff --git a/rtc_base/experiments/congestion_controller_experiment_unittest.cc b/rtc_base/experiments/congestion_controller_experiment_unittest.cc deleted file mode 100644 index a72abcad45..0000000000 --- a/rtc_base/experiments/congestion_controller_experiment_unittest.cc +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include "rtc_base/experiments/congestion_controller_experiment.h" - -#include "test/field_trial.h" -#include "test/gtest.h" - -namespace webrtc { -TEST(CongestionControllerExperimentTest, BbrDisabledByDefault) { - webrtc::test::ScopedFieldTrials field_trials(""); - EXPECT_FALSE(CongestionControllerExperiment::BbrControllerEnabled()); -} - -TEST(CongestionControllerExperimentTest, BbrEnabledByFieldTrial) { - webrtc::test::ScopedFieldTrials field_trials( - "WebRTC-BweCongestionController/Enabled,BBR/"); - EXPECT_TRUE(CongestionControllerExperiment::BbrControllerEnabled()); -} -} // namespace webrtc diff --git a/test/BUILD.gn b/test/BUILD.gn index 43494d80eb..b9f3d0b51a 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -710,7 +710,6 @@ rtc_source_set("test_common") { "../modules/audio_device:mock_audio_device", "../modules/audio_mixer:audio_mixer_impl", "../modules/audio_processing", - "../modules/congestion_controller/bbr", "../modules/rtp_rtcp", "../modules/rtp_rtcp:mock_rtp_rtcp", "../modules/rtp_rtcp:rtp_rtcp_format", @@ -723,7 +722,6 @@ rtc_source_set("test_common") { "../modules/video_coding:webrtc_vp9", "../rtc_base:checks", "../rtc_base:rtc_base_approved", - "../rtc_base/experiments:congestion_controller_experiment", "../system_wrappers", "../system_wrappers:field_trial", "../video", diff --git a/test/call_test.cc b/test/call_test.cc index 80b86f00c8..26c8b446db 100644 --- a/test/call_test.cc +++ b/test/call_test.cc @@ -21,10 +21,8 @@ #include "call/rtp_transport_controller_send.h" #include "call/simulated_network.h" #include "modules/audio_mixer/audio_mixer_impl.h" -#include "modules/congestion_controller/bbr/bbr_factory.h" #include "rtc_base/checks.h" #include "rtc_base/event.h" -#include "rtc_base/experiments/congestion_controller_experiment.h" #include "test/fake_encoder.h" #include "test/testsupport/fileutils.h" @@ -39,7 +37,6 @@ CallTest::CallTest() audio_send_config_(/*send_transport=*/nullptr, /*media_transport=*/nullptr), audio_send_stream_(nullptr), - bbr_network_controller_factory_(new BbrNetworkControllerFactory()), fake_encoder_factory_([this]() { std::unique_ptr fake_encoder; if (video_encoder_configs_[0].codec_type == kVideoCodecVP8) { @@ -200,14 +197,12 @@ void CallTest::CreateSenderCall() { void CallTest::CreateSenderCall(const Call::Config& config) { NetworkControllerFactoryInterface* injected_factory = config.network_controller_factory; - if (!injected_factory) { - if (CongestionControllerExperiment::BbrControllerEnabled()) { - RTC_LOG(LS_INFO) << "Using BBR network controller factory"; - injected_factory = bbr_network_controller_factory_.get(); - } else { - RTC_LOG(LS_INFO) << "Using default network controller factory"; - } + if (injected_factory) { + RTC_LOG(LS_INFO) << "Using injected network controller factory"; + } else { + RTC_LOG(LS_INFO) << "Using default network controller factory"; } + std::unique_ptr controller_send = absl::make_unique( Clock::GetRealTimeClock(), config.event_log, injected_factory, diff --git a/test/call_test.h b/test/call_test.h index 220900bd4b..c0ba1ff2a3 100644 --- a/test/call_test.h +++ b/test/call_test.h @@ -198,8 +198,6 @@ class CallTest : public ::testing::Test { DegradationPreference::MAINTAIN_FRAMERATE; std::unique_ptr fec_controller_factory_; - std::unique_ptr - bbr_network_controller_factory_; test::FunctionVideoEncoderFactory fake_encoder_factory_; int fake_encoder_max_bitrate_ = -1;