Dont send probe if NetworkStateEstimate.link_capacity_upper=DataRate::Zero

Bug: webrtc:14392
Change-Id: I7df34239f3f9ef27a26d04a16e6f3edf3e45d4bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276183
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38151}
This commit is contained in:
Per Kjellander
2022-09-21 10:57:04 +02:00
committed by WebRTC LUCI CQ
parent d44e3410b6
commit a18144182d
2 changed files with 33 additions and 2 deletions

View File

@ -376,6 +376,7 @@ void ProbeController::SetNetworkStateEstimate(
send_probe_on_next_process_interval_ = true;
}
if (config_.network_state_estimate_drop_down_rate > 0 && network_estimate_ &&
!estimate.link_capacity_upper.IsZero() &&
(estimated_bitrate_ > estimate.link_capacity_upper ||
bwe_limited_due_to_packet_loss_) &&
estimate.link_capacity_upper <=
@ -470,8 +471,11 @@ std::vector<ProbeClusterConfig> ProbeController::InitiateProbing(
max_probe_bitrate = std::min(estimated_bitrate_, max_bitrate_);
}
if (config_.network_state_estimate_probing_interval->IsFinite() &&
network_estimate_ &&
network_estimate_->link_capacity_upper > DataRate::Zero()) {
network_estimate_ && network_estimate_->link_capacity_upper.IsFinite()) {
if (network_estimate_->link_capacity_upper.IsZero()) {
RTC_LOG(LS_INFO) << "Not sending probe, Network state estimate is zero";
return {};
}
max_probe_bitrate =
std::min(max_probe_bitrate, network_estimate_->link_capacity_upper *
config_.network_state_probe_scale);