Removes trial to enable BBR congestion controller.
The BBR controller can still be injected, but the trials will no longer work. This reduces the binary size. Bug: webrtc:8415 Change-Id: I2c32c414d08ef0cc16bfd72651535a755cde9916 Reviewed-on: https://webrtc-review.googlesource.com/c/114120 Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26077}
This commit is contained in:

committed by
Commit Bot

parent
e2e000059d
commit
7f57788ab7
@ -23,11 +23,6 @@ rtc_source_set("control_handler") {
|
|||||||
"control_handler.h",
|
"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 = [
|
deps = [
|
||||||
"../:congestion_controller",
|
"../:congestion_controller",
|
||||||
"../../../api/transport:network_control",
|
"../../../api/transport:network_control",
|
||||||
@ -38,7 +33,6 @@ rtc_source_set("control_handler") {
|
|||||||
"../../../rtc_base:rate_limiter",
|
"../../../rtc_base:rate_limiter",
|
||||||
"../../../rtc_base:safe_minmax",
|
"../../../rtc_base:safe_minmax",
|
||||||
"../../../rtc_base:sequenced_task_checker",
|
"../../../rtc_base:sequenced_task_checker",
|
||||||
"../../../rtc_base/experiments:congestion_controller_experiment",
|
|
||||||
"../../../system_wrappers",
|
"../../../system_wrappers",
|
||||||
"../../../system_wrappers:field_trial",
|
"../../../system_wrappers:field_trial",
|
||||||
"../../pacing",
|
"../../pacing",
|
||||||
|
@ -208,12 +208,10 @@ rtc_static_library("peerconnection") {
|
|||||||
"../logging:rtc_event_log_impl_output",
|
"../logging:rtc_event_log_impl_output",
|
||||||
"../media:rtc_data",
|
"../media:rtc_data",
|
||||||
"../media:rtc_media_base",
|
"../media:rtc_media_base",
|
||||||
"../modules/congestion_controller/bbr",
|
|
||||||
"../p2p:rtc_p2p",
|
"../p2p:rtc_p2p",
|
||||||
"../rtc_base:checks",
|
"../rtc_base:checks",
|
||||||
"../rtc_base:rtc_base",
|
"../rtc_base:rtc_base",
|
||||||
"../rtc_base:rtc_base_approved",
|
"../rtc_base:rtc_base_approved",
|
||||||
"../rtc_base/experiments:congestion_controller_experiment",
|
|
||||||
"../rtc_base/system:rtc_export",
|
"../rtc_base/system:rtc_export",
|
||||||
"../rtc_base/third_party/base64",
|
"../rtc_base/third_party/base64",
|
||||||
"../rtc_base/third_party/sigslot",
|
"../rtc_base/third_party/sigslot",
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "media/engine/webrtcvideodecoderfactory.h" // nogncheck
|
#include "media/engine/webrtcvideodecoderfactory.h" // nogncheck
|
||||||
#include "media/engine/webrtcvideoencoderfactory.h" // nogncheck
|
#include "media/engine/webrtcvideoencoderfactory.h" // nogncheck
|
||||||
#include "modules/audio_device/include/audio_device.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/base/basicpacketsocketfactory.h"
|
||||||
#include "p2p/client/basicportallocator.h"
|
#include "p2p/client/basicportallocator.h"
|
||||||
#include "pc/audiotrack.h"
|
#include "pc/audiotrack.h"
|
||||||
@ -46,7 +45,6 @@
|
|||||||
#include "pc/peerconnection.h"
|
#include "pc/peerconnection.h"
|
||||||
#include "pc/videocapturertracksource.h"
|
#include "pc/videocapturertracksource.h"
|
||||||
#include "pc/videotrack.h"
|
#include "pc/videotrack.h"
|
||||||
#include "rtc_base/experiments/congestion_controller_experiment.h"
|
|
||||||
#include "system_wrappers/include/field_trial.h"
|
#include "system_wrappers/include/field_trial.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -147,9 +145,7 @@ PeerConnectionFactory::PeerConnectionFactory(
|
|||||||
event_log_factory_(std::move(event_log_factory)),
|
event_log_factory_(std::move(event_log_factory)),
|
||||||
fec_controller_factory_(std::move(fec_controller_factory)),
|
fec_controller_factory_(std::move(fec_controller_factory)),
|
||||||
injected_network_controller_factory_(
|
injected_network_controller_factory_(
|
||||||
std::move(network_controller_factory)),
|
std::move(network_controller_factory)) {
|
||||||
bbr_network_controller_factory_(
|
|
||||||
absl::make_unique<BbrNetworkControllerFactory>()) {
|
|
||||||
if (!network_thread_) {
|
if (!network_thread_) {
|
||||||
owned_network_thread_ = rtc::Thread::CreateWithSocketServer();
|
owned_network_thread_ = rtc::Thread::CreateWithSocketServer();
|
||||||
owned_network_thread_->SetName("pc_network_thread", nullptr);
|
owned_network_thread_->SetName("pc_network_thread", nullptr);
|
||||||
@ -478,11 +474,7 @@ std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
|
|||||||
|
|
||||||
call_config.fec_controller_factory = fec_controller_factory_.get();
|
call_config.fec_controller_factory = fec_controller_factory_.get();
|
||||||
|
|
||||||
if (CongestionControllerExperiment::BbrControllerEnabled()) {
|
if (field_trial::IsEnabled("WebRTC-Bwe-InjectedCongestionController")) {
|
||||||
RTC_LOG(LS_INFO) << "Using BBR network controller factory";
|
|
||||||
call_config.network_controller_factory =
|
|
||||||
bbr_network_controller_factory_.get();
|
|
||||||
} else if (CongestionControllerExperiment::InjectedControllerEnabled()) {
|
|
||||||
RTC_LOG(LS_INFO) << "Using injected network controller factory";
|
RTC_LOG(LS_INFO) << "Using injected network controller factory";
|
||||||
call_config.network_controller_factory =
|
call_config.network_controller_factory =
|
||||||
injected_network_controller_factory_.get();
|
injected_network_controller_factory_.get();
|
||||||
|
@ -151,8 +151,6 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
|
|||||||
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory_;
|
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory_;
|
||||||
std::unique_ptr<NetworkControllerFactoryInterface>
|
std::unique_ptr<NetworkControllerFactoryInterface>
|
||||||
injected_network_controller_factory_;
|
injected_network_controller_factory_;
|
||||||
std::unique_ptr<NetworkControllerFactoryInterface>
|
|
||||||
bbr_network_controller_factory_;
|
|
||||||
std::unique_ptr<MediaTransportFactory> media_transport_factory_;
|
std::unique_ptr<MediaTransportFactory> media_transport_factory_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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") {
|
rtc_static_library("quality_scaling_experiment") {
|
||||||
sources = [
|
sources = [
|
||||||
"quality_scaling_experiment.cc",
|
"quality_scaling_experiment.cc",
|
||||||
@ -114,7 +102,6 @@ if (rtc_include_tests) {
|
|||||||
testonly = true
|
testonly = true
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
"congestion_controller_experiment_unittest.cc",
|
|
||||||
"cpu_speed_experiment_unittest.cc",
|
"cpu_speed_experiment_unittest.cc",
|
||||||
"field_trial_parser_unittest.cc",
|
"field_trial_parser_unittest.cc",
|
||||||
"field_trial_units_unittest.cc",
|
"field_trial_units_unittest.cc",
|
||||||
@ -123,7 +110,6 @@ if (rtc_include_tests) {
|
|||||||
"rtt_mult_experiment_unittest.cc",
|
"rtt_mult_experiment_unittest.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":congestion_controller_experiment",
|
|
||||||
":cpu_speed_experiment",
|
":cpu_speed_experiment",
|
||||||
":field_trial_parser",
|
":field_trial_parser",
|
||||||
":normalize_simulcast_size_experiment",
|
":normalize_simulcast_size_experiment",
|
||||||
|
@ -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 <string>
|
|
||||||
|
|
||||||
#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
|
|
@ -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_
|
|
@ -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
|
|
@ -710,7 +710,6 @@ rtc_source_set("test_common") {
|
|||||||
"../modules/audio_device:mock_audio_device",
|
"../modules/audio_device:mock_audio_device",
|
||||||
"../modules/audio_mixer:audio_mixer_impl",
|
"../modules/audio_mixer:audio_mixer_impl",
|
||||||
"../modules/audio_processing",
|
"../modules/audio_processing",
|
||||||
"../modules/congestion_controller/bbr",
|
|
||||||
"../modules/rtp_rtcp",
|
"../modules/rtp_rtcp",
|
||||||
"../modules/rtp_rtcp:mock_rtp_rtcp",
|
"../modules/rtp_rtcp:mock_rtp_rtcp",
|
||||||
"../modules/rtp_rtcp:rtp_rtcp_format",
|
"../modules/rtp_rtcp:rtp_rtcp_format",
|
||||||
@ -723,7 +722,6 @@ rtc_source_set("test_common") {
|
|||||||
"../modules/video_coding:webrtc_vp9",
|
"../modules/video_coding:webrtc_vp9",
|
||||||
"../rtc_base:checks",
|
"../rtc_base:checks",
|
||||||
"../rtc_base:rtc_base_approved",
|
"../rtc_base:rtc_base_approved",
|
||||||
"../rtc_base/experiments:congestion_controller_experiment",
|
|
||||||
"../system_wrappers",
|
"../system_wrappers",
|
||||||
"../system_wrappers:field_trial",
|
"../system_wrappers:field_trial",
|
||||||
"../video",
|
"../video",
|
||||||
|
@ -21,10 +21,8 @@
|
|||||||
#include "call/rtp_transport_controller_send.h"
|
#include "call/rtp_transport_controller_send.h"
|
||||||
#include "call/simulated_network.h"
|
#include "call/simulated_network.h"
|
||||||
#include "modules/audio_mixer/audio_mixer_impl.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/checks.h"
|
||||||
#include "rtc_base/event.h"
|
#include "rtc_base/event.h"
|
||||||
#include "rtc_base/experiments/congestion_controller_experiment.h"
|
|
||||||
#include "test/fake_encoder.h"
|
#include "test/fake_encoder.h"
|
||||||
#include "test/testsupport/fileutils.h"
|
#include "test/testsupport/fileutils.h"
|
||||||
|
|
||||||
@ -39,7 +37,6 @@ CallTest::CallTest()
|
|||||||
audio_send_config_(/*send_transport=*/nullptr,
|
audio_send_config_(/*send_transport=*/nullptr,
|
||||||
/*media_transport=*/nullptr),
|
/*media_transport=*/nullptr),
|
||||||
audio_send_stream_(nullptr),
|
audio_send_stream_(nullptr),
|
||||||
bbr_network_controller_factory_(new BbrNetworkControllerFactory()),
|
|
||||||
fake_encoder_factory_([this]() {
|
fake_encoder_factory_([this]() {
|
||||||
std::unique_ptr<FakeEncoder> fake_encoder;
|
std::unique_ptr<FakeEncoder> fake_encoder;
|
||||||
if (video_encoder_configs_[0].codec_type == kVideoCodecVP8) {
|
if (video_encoder_configs_[0].codec_type == kVideoCodecVP8) {
|
||||||
@ -200,14 +197,12 @@ void CallTest::CreateSenderCall() {
|
|||||||
void CallTest::CreateSenderCall(const Call::Config& config) {
|
void CallTest::CreateSenderCall(const Call::Config& config) {
|
||||||
NetworkControllerFactoryInterface* injected_factory =
|
NetworkControllerFactoryInterface* injected_factory =
|
||||||
config.network_controller_factory;
|
config.network_controller_factory;
|
||||||
if (!injected_factory) {
|
if (injected_factory) {
|
||||||
if (CongestionControllerExperiment::BbrControllerEnabled()) {
|
RTC_LOG(LS_INFO) << "Using injected network controller factory";
|
||||||
RTC_LOG(LS_INFO) << "Using BBR network controller factory";
|
|
||||||
injected_factory = bbr_network_controller_factory_.get();
|
|
||||||
} else {
|
} else {
|
||||||
RTC_LOG(LS_INFO) << "Using default network controller factory";
|
RTC_LOG(LS_INFO) << "Using default network controller factory";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
std::unique_ptr<RtpTransportControllerSend> controller_send =
|
std::unique_ptr<RtpTransportControllerSend> controller_send =
|
||||||
absl::make_unique<RtpTransportControllerSend>(
|
absl::make_unique<RtpTransportControllerSend>(
|
||||||
Clock::GetRealTimeClock(), config.event_log, injected_factory,
|
Clock::GetRealTimeClock(), config.event_log, injected_factory,
|
||||||
|
@ -198,8 +198,6 @@ class CallTest : public ::testing::Test {
|
|||||||
DegradationPreference::MAINTAIN_FRAMERATE;
|
DegradationPreference::MAINTAIN_FRAMERATE;
|
||||||
|
|
||||||
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory_;
|
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory_;
|
||||||
std::unique_ptr<NetworkControllerFactoryInterface>
|
|
||||||
bbr_network_controller_factory_;
|
|
||||||
|
|
||||||
test::FunctionVideoEncoderFactory fake_encoder_factory_;
|
test::FunctionVideoEncoderFactory fake_encoder_factory_;
|
||||||
int fake_encoder_max_bitrate_ = -1;
|
int fake_encoder_max_bitrate_ = -1;
|
||||||
|
Reference in New Issue
Block a user