aboutsummaryrefslogtreecommitdiff
path: root/modules/congestion_controller
diff options
context:
space:
mode:
authorJonas Oreland <jonaso@webrtc.org>2020-01-09 14:05:41 +0100
committerCommit Bot <commit-bot@chromium.org>2020-01-09 14:21:07 +0000
commit350a82aec3556cfab385e41b67ab4f26f2fb0151 (patch)
tree23c70234efa26410145eefcdf1f945527b43232f /modules/congestion_controller
parent5c35f2fb1bc2325f0cd23db52d73db75fccc89c9 (diff)
downloadwebrtc-350a82aec3556cfab385e41b67ab4f26f2fb0151.tar.gz
Reland "Add field trial to base stable target rate on loss based target rate"
This is a reland of 63db77007bea78487af05d46b1b46106761556a1 that was broken as I flipped != and == :( Luckily this made a test flaky, and hence was the original change reverted. Original change's description: > Add field trial to base stable target rate on loss based target rate > > I.e not the pushback_rate that includes the congestion window pushback > (if enabled). > > Bug: None > Change-Id: I413d011004a95da03dd62f5b423abc3c8b66b333 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165383 > Commit-Queue: Jonas Oreland <jonaso@webrtc.org> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> > Reviewed-by: Sebastian Jansson <srte@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#30189} Bug: None Change-Id: Ia637d0498e6c0c2708eba659e2a30f3235944d4c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165391 Reviewed-by: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30196}
Diffstat (limited to 'modules/congestion_controller')
-rw-r--r--modules/congestion_controller/goog_cc/goog_cc_network_control.cc18
-rw-r--r--modules/congestion_controller/goog_cc/goog_cc_network_control.h1
2 files changed, 16 insertions, 3 deletions
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc
index adb143375c..852c9574ad 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc
@@ -52,6 +52,10 @@ int64_t GetBpsOrDefault(const absl::optional<DataRate>& rate,
}
}
+bool IsEnabled(const WebRtcKeyValueConfig* config, absl::string_view key) {
+ return config->Lookup(key).find("Enabled") == 0;
+}
+
bool IsNotDisabled(const WebRtcKeyValueConfig* config, absl::string_view key) {
return config->Lookup(key).find("Disabled") != 0;
}
@@ -72,6 +76,8 @@ GoogCcNetworkController::GoogCcNetworkController(NetworkControllerConfig config,
"WebRTC-Bwe-IgnoreProbesLowerThanNetworkStateEstimate")),
rate_control_settings_(
RateControlSettings::ParseFromKeyValueConfig(key_value_config_)),
+ loss_based_stable_rate_(
+ IsEnabled(key_value_config_, "WebRTC-Bwe-LossBasedStableRate")),
probe_controller_(
new ProbeController(key_value_config_, config.event_log)),
congestion_window_pushback_controller_(
@@ -619,9 +625,15 @@ void GoogCcNetworkController::MaybeTriggerOnNetworkChanged(
TargetTransferRate target_rate_msg;
target_rate_msg.at_time = at_time;
target_rate_msg.target_rate = pushback_target_rate;
- target_rate_msg.stable_target_rate =
- std::min(bandwidth_estimation_->GetEstimatedLinkCapacity(),
- pushback_target_rate);
+ if (loss_based_stable_rate_) {
+ target_rate_msg.stable_target_rate =
+ std::min(bandwidth_estimation_->GetEstimatedLinkCapacity(),
+ loss_based_target_rate);
+ } else {
+ target_rate_msg.stable_target_rate =
+ std::min(bandwidth_estimation_->GetEstimatedLinkCapacity(),
+ pushback_target_rate);
+ }
target_rate_msg.network_estimate.at_time = at_time;
target_rate_msg.network_estimate.round_trip_time = round_trip_time;
target_rate_msg.network_estimate.loss_rate_ratio = fraction_loss / 255.0f;
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.h b/modules/congestion_controller/goog_cc/goog_cc_network_control.h
index f8970c808f..ae17b3ab39 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control.h
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.h
@@ -88,6 +88,7 @@ class GoogCcNetworkController : public NetworkControllerInterface {
const bool use_min_allocatable_as_lower_bound_;
const bool ignore_probes_lower_than_network_estimate_;
const RateControlSettings rate_control_settings_;
+ const bool loss_based_stable_rate_;
const std::unique_ptr<ProbeController> probe_controller_;
const std::unique_ptr<CongestionWindowPushbackController>