diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc index 4999df172..7d9d8d60a 100644 --- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc +++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc @@ -188,14 +188,12 @@ void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms, void SendSideBandwidthEstimation::UpdateEstimate(int64_t now_ms) { // We trust the REMB during the first 2 seconds if we haven't had any // packet loss reported, to allow startup bitrate probing. - if (ProbingExperimentIsEnabled()) { - if (last_fraction_loss_ == 0 && IsInStartPhase(now_ms) && - bwe_incoming_ > bitrate_) { - bitrate_ = CapBitrateToThresholds(bwe_incoming_); - min_bitrate_history_.clear(); - min_bitrate_history_.push_back(std::make_pair(now_ms, bitrate_)); - return; - } + if (last_fraction_loss_ == 0 && IsInStartPhase(now_ms) && + bwe_incoming_ > bitrate_) { + bitrate_ = CapBitrateToThresholds(bwe_incoming_); + min_bitrate_history_.clear(); + min_bitrate_history_.push_back(std::make_pair(now_ms, bitrate_)); + return; } UpdateMinHistory(now_ms); // Only start updating bitrate when receiving receiver blocks. @@ -286,9 +284,4 @@ uint32_t SendSideBandwidthEstimation::CapBitrateToThresholds(uint32_t bitrate) { } return bitrate; } - -bool SendSideBandwidthEstimation::ProbingExperimentIsEnabled() const { - return webrtc::field_trial::FindFullName("WebRTC-BitrateProbing") == - "Enabled"; -} } // namespace webrtc diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h index 427909b3e..b544d5f07 100644 --- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h +++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h @@ -42,9 +42,6 @@ class SendSideBandwidthEstimation { void SetMinMaxBitrate(uint32_t min_bitrate, uint32_t max_bitrate); void SetMinBitrate(uint32_t min_bitrate); - protected: - virtual bool ProbingExperimentIsEnabled() const; - private: enum UmaState { kNoUpdate, kFirstDone, kDone }; diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc index eed2d9ee8..5171049f0 100644 --- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc +++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc @@ -16,21 +16,8 @@ namespace webrtc { -class TestBandwidthEstimation : public SendSideBandwidthEstimation { - public: - explicit TestBandwidthEstimation(bool in_experiment) - : in_experiment_(in_experiment) {} - - virtual bool ProbingExperimentIsEnabled() const OVERRIDE { - return in_experiment_; - } - - private: - bool in_experiment_; -}; - TEST(SendSideBweTest, InitialRembWithProbing) { - TestBandwidthEstimation bwe(true); + SendSideBandwidthEstimation bwe; bwe.SetMinMaxBitrate(100000, 1500000); bwe.SetSendBitrate(200000); @@ -57,24 +44,4 @@ TEST(SendSideBweTest, InitialRembWithProbing) { bwe.CurrentEstimate(&bitrate, &fraction_loss, &rtt); EXPECT_EQ(kRemb, bitrate); } - -TEST(SendSideBweTest, InitialRembWithoutProbing) { - TestBandwidthEstimation bwe(false); - bwe.SetMinMaxBitrate(100000, 1500000); - const uint32_t kStartBitrate = 200000; - bwe.SetSendBitrate(kStartBitrate); - - int64_t now_ms = 0; - bwe.UpdateReceiverBlock(0, 50, 1, now_ms); - - // Initial REMB doesn't apply immediately. - const uint32_t kRemb = 1000000u; - bwe.UpdateReceiverEstimate(kRemb); - bwe.UpdateEstimate(now_ms); - uint32_t bitrate; - uint8_t fraction_loss; - int64_t rtt; - bwe.CurrentEstimate(&bitrate, &fraction_loss, &rtt); - EXPECT_EQ(kStartBitrate, bitrate); -} } // namespace webrtc