Enable bitrate probing by default.

Results from the experiment were all positive.

BUG=crbug:425925
R=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38829004

Cr-Commit-Position: refs/heads/master@{#8231}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8231 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2015-02-03 12:33:51 +00:00
parent b1786dbab0
commit 0e8bf6c4d3
3 changed files with 7 additions and 50 deletions

View File

@ -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

View File

@ -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 };

View File

@ -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