diff --git a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_interface.h b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_interface.h index 515af1efc9..6184cdc114 100644 --- a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_interface.h +++ b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_interface.h @@ -33,7 +33,9 @@ struct RobustThroughputEstimatorSettings { explicit RobustThroughputEstimatorSettings( const FieldTrialsView* key_value_config); - bool enabled = false; // Set to true to use RobustThroughputEstimator. + // Set `enabled` to true to use the RobustThroughputEstimator, false to use + // the AcknowledgedBitrateEstimator. + bool enabled = true; // The estimator keeps the smallest window containing at least // `window_packets` and at least the packets received during the last diff --git a/modules/congestion_controller/goog_cc/robust_throughput_estimator_unittest.cc b/modules/congestion_controller/goog_cc/robust_throughput_estimator_unittest.cc index 9a013aa6d0..f41ee7f3d6 100644 --- a/modules/congestion_controller/goog_cc/robust_throughput_estimator_unittest.cc +++ b/modules/congestion_controller/goog_cc/robust_throughput_estimator_unittest.cc @@ -63,6 +63,19 @@ class FeedbackGenerator { uint16_t sequence_number_ = 100; }; +TEST(RobustThroughputEstimatorTest, DefaultEnabled) { + RobustThroughputEstimatorSettings settings = + CreateRobustThroughputEstimatorSettings(""); + EXPECT_TRUE(settings.enabled); +} + +TEST(RobustThroughputEstimatorTest, CanDisable) { + RobustThroughputEstimatorSettings settings = + CreateRobustThroughputEstimatorSettings( + "WebRTC-Bwe-RobustThroughputEstimatorSettings/enabled:false/"); + EXPECT_FALSE(settings.enabled); +} + TEST(RobustThroughputEstimatorTest, InitialEstimate) { FeedbackGenerator feedback_generator; RobustThroughputEstimator throughput_estimator(