Implement periodic bandwidth probing in application-limited region.

Now ProbeController can send periodic bandwidth probes when in
application-limited region. This will allow to maintain correct
bottleneck bandwidth estimate, even not all bandwidth is being used.
The feature is not enabled by default, but can be enabled with a flag.
Interval between probes is currently set to 5 seconds.

BUG=webrtc:6332

Review-Url: https://codereview.webrtc.org/2504023002
Cr-Commit-Position: refs/heads/master@{#15279}
This commit is contained in:
sergeyu
2016-11-28 13:11:13 -08:00
committed by Commit bot
parent bf22be902e
commit 80ed35e21c
15 changed files with 194 additions and 62 deletions

View File

@ -44,10 +44,10 @@ void AlrDetector::OnBytesSent(size_t bytes_sent, int64_t now_ms) {
return;
int percentage = static_cast<int>(*rate) * 100 / estimated_bitrate_bps_;
if (percentage < kAlrStartUsagePercent && !application_limited_) {
application_limited_ = true;
} else if (percentage > kAlrEndUsagePercent && application_limited_) {
application_limited_ = false;
if (percentage < kAlrStartUsagePercent && !alr_started_time_ms_) {
alr_started_time_ms_ = rtc::Optional<int64_t>(now_ms);
} else if (percentage > kAlrEndUsagePercent && alr_started_time_ms_) {
alr_started_time_ms_ = rtc::Optional<int64_t>();
}
}
@ -56,8 +56,9 @@ void AlrDetector::SetEstimatedBitrate(int bitrate_bps) {
estimated_bitrate_bps_ = bitrate_bps;
}
bool AlrDetector::InApplicationLimitedRegion() const {
return application_limited_;
rtc::Optional<int64_t> AlrDetector::GetApplicationLimitedRegionStartTime()
const {
return alr_started_time_ms_;
}
} // namespace webrtc