Allows injection of network controller factory into peer connection factory.
Bug: webrtc:9155 Change-Id: I0a17024042f154297aba20f5d2dc766feb27f3f7 Reviewed-on: https://webrtc-review.googlesource.com/73123 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23313}
This commit is contained in:

committed by
Commit Bot

parent
78b0a60223
commit
dfce03af6e
@ -16,21 +16,27 @@
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
|
||||
const char kBbrControllerExperiment[] = "WebRTC-BweCongestionController";
|
||||
const char kControllerExperiment[] = "WebRTC-BweCongestionController";
|
||||
} // namespace
|
||||
|
||||
bool CongestionControllerExperiment::BbrControllerEnabled() {
|
||||
std::string trial_string =
|
||||
webrtc::field_trial::FindFullName(kBbrControllerExperiment);
|
||||
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;
|
||||
}
|
||||
|
||||
rtc::Optional<CongestionControllerExperiment::BbrExperimentConfig>
|
||||
CongestionControllerExperiment::GetBbrExperimentConfig() {
|
||||
if (!BbrControllerEnabled())
|
||||
return rtc::nullopt;
|
||||
std::string trial_string =
|
||||
webrtc::field_trial::FindFullName(kBbrControllerExperiment);
|
||||
webrtc::field_trial::FindFullName(kControllerExperiment);
|
||||
BbrExperimentConfig config;
|
||||
if (sscanf(
|
||||
trial_string.c_str(),
|
||||
|
@ -33,6 +33,7 @@ class CongestionControllerExperiment {
|
||||
double probe_rtt_congestion_window_gain;
|
||||
};
|
||||
static bool BbrControllerEnabled();
|
||||
static bool InjectedControllerEnabled();
|
||||
static rtc::Optional<BbrExperimentConfig> GetBbrExperimentConfig();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user