Now probe for x3 and x6 of the initial start bitrate and allow for faster receive bitrates when calculating probing estimates.
BUG=webrtc:5859 Review-Url: https://codereview.webrtc.org/2269993002 Cr-Commit-Position: refs/heads/master@{#13894}
This commit is contained in:
parent
2c670dbf13
commit
4e7e8d7300
@ -172,6 +172,7 @@ CongestionController::CongestionController(
|
||||
transport_feedback_adapter_(bitrate_controller_.get(), clock_),
|
||||
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
|
||||
max_bitrate_bps_(0),
|
||||
initial_probing_triggered_(false),
|
||||
last_reported_bitrate_bps_(0),
|
||||
last_reported_fraction_loss_(0),
|
||||
last_reported_rtt_(0),
|
||||
@ -202,6 +203,7 @@ CongestionController::CongestionController(
|
||||
transport_feedback_adapter_(bitrate_controller_.get(), clock_),
|
||||
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
|
||||
max_bitrate_bps_(0),
|
||||
initial_probing_triggered_(false),
|
||||
last_reported_bitrate_bps_(0),
|
||||
last_reported_fraction_loss_(0),
|
||||
last_reported_rtt_(0),
|
||||
@ -216,8 +218,6 @@ void CongestionController::Init() {
|
||||
new DelayBasedBwe(&transport_feedback_adapter_, clock_));
|
||||
transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate(
|
||||
min_bitrate_bps_);
|
||||
pacer_->CreateProbeCluster(900000, 6);
|
||||
pacer_->CreateProbeCluster(1800000, 5);
|
||||
}
|
||||
|
||||
void CongestionController::SetBweBitrates(int min_bitrate_bps,
|
||||
@ -229,12 +229,18 @@ void CongestionController::SetBweBitrates(int min_bitrate_bps,
|
||||
max_bitrate_bps);
|
||||
|
||||
{
|
||||
rtc::CritScope cs(&critsect_);
|
||||
if (!initial_probing_triggered_) {
|
||||
pacer_->CreateProbeCluster(start_bitrate_bps * 3, 6);
|
||||
pacer_->CreateProbeCluster(start_bitrate_bps * 6, 5);
|
||||
initial_probing_triggered_ = true;
|
||||
}
|
||||
|
||||
// Only do probing if:
|
||||
// - we are mid-call, which we consider to be if
|
||||
// |last_reported_bitrate_bps_| != 0, and
|
||||
// - the current bitrate is lower than the new |max_bitrate_bps|, and
|
||||
// - we actually want to increase the |max_bitrate_bps_|.
|
||||
rtc::CritScope cs(&critsect_);
|
||||
if (last_reported_bitrate_bps_ != 0 &&
|
||||
last_reported_bitrate_bps_ < static_cast<uint32_t>(max_bitrate_bps) &&
|
||||
max_bitrate_bps > max_bitrate_bps_) {
|
||||
|
||||
@ -125,6 +125,7 @@ class CongestionController : public CallStatsObserver, public Module {
|
||||
TransportFeedbackAdapter transport_feedback_adapter_;
|
||||
int min_bitrate_bps_;
|
||||
int max_bitrate_bps_;
|
||||
bool initial_probing_triggered_;
|
||||
rtc::CriticalSection critsect_;
|
||||
uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_);
|
||||
uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_);
|
||||
|
||||
@ -20,7 +20,7 @@ namespace {
|
||||
constexpr int kMinNumProbesValidCluster = 4;
|
||||
|
||||
// The maximum (receive rate)/(send rate) ratio for a valid estimate.
|
||||
constexpr float kValidRatio = 1.2f;
|
||||
constexpr float kValidRatio = 2.0f;
|
||||
|
||||
// The maximum time period over which the cluster history is retained.
|
||||
// This is also the maximum time period beyond which a probing burst is not
|
||||
|
||||
@ -60,9 +60,9 @@ TEST_F(TestProbeBitrateEstimator, FastReceive) {
|
||||
|
||||
TEST_F(TestProbeBitrateEstimator, TooFastReceive) {
|
||||
AddPacketFeedback(0, 1000, 0, 19);
|
||||
AddPacketFeedback(0, 1000, 10, 30);
|
||||
AddPacketFeedback(0, 1000, 20, 40);
|
||||
AddPacketFeedback(0, 1000, 40, 50);
|
||||
AddPacketFeedback(0, 1000, 10, 22);
|
||||
AddPacketFeedback(0, 1000, 20, 25);
|
||||
AddPacketFeedback(0, 1000, 40, 27);
|
||||
|
||||
EXPECT_EQ(measured_bps_, INVALID_BPS);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user