Use loss based state to inform probe controller

Instead of trying to guess the state from the loss based estimator by
looking at the estimate, use the state.


Bug: webrtc:14392
Change-Id: Ibf6e762f02bfbfff175f2aa2bc98f45b1c5beb1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282823
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38589}
This commit is contained in:
Per Kjellander 2022-11-09 11:29:32 +01:00 committed by WebRTC LUCI CQ
parent 90c08d0b2e
commit e73a8b662f
4 changed files with 7 additions and 10 deletions

View File

@ -27,6 +27,7 @@ rtc_library("goog_cc") {
":alr_detector",
":delay_based_bwe",
":estimators",
":loss_based_bwe_v2",
":probe_controller",
":pushback_controller",
":send_side_bwe",

View File

@ -27,6 +27,7 @@
#include "api/units/timestamp.h"
#include "logging/rtc_event_log/events/rtc_event_remote_estimate.h"
#include "modules/congestion_controller/goog_cc/alr_detector.h"
#include "modules/congestion_controller/goog_cc/loss_based_bwe_v2.h"
#include "modules/congestion_controller/goog_cc/probe_controller.h"
#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
#include "modules/remote_bitrate_estimator/test/bwe_test_logging.h"
@ -614,10 +615,6 @@ void GoogCcNetworkController::MaybeTriggerOnNetworkChanged(
uint8_t fraction_loss = bandwidth_estimation_->fraction_loss();
TimeDelta round_trip_time = bandwidth_estimation_->round_trip_time();
DataRate loss_based_target_rate = bandwidth_estimation_->target_rate();
bool bwe_limited_due_to_packet_loss =
loss_based_target_rate.IsFinite() &&
bandwidth_estimation_->delay_based_limit().IsFinite() &&
loss_based_target_rate < bandwidth_estimation_->delay_based_limit();
DataRate pushback_target_rate = loss_based_target_rate;
BWE_TEST_LOGGING_PLOT(1, "fraction_loss_%", at_time.ms(),
@ -680,7 +677,11 @@ void GoogCcNetworkController::MaybeTriggerOnNetworkChanged(
update->target_rate = target_rate_msg;
auto probes = probe_controller_->SetEstimatedBitrate(
loss_based_target_rate, bwe_limited_due_to_packet_loss, at_time);
loss_based_target_rate,
/*bwe_limited_due_to_packet_loss=*/
bandwidth_estimation_->loss_based_state() !=
LossBasedState::kDelayBasedEstimate,
at_time);
update->probe_cluster_configs.insert(update->probe_cluster_configs.end(),
probes.begin(), probes.end());
update->pacer_config = GetPacingRates(at_time);

View File

@ -328,10 +328,6 @@ LossBasedState SendSideBandwidthEstimation::loss_based_state() const {
return loss_based_state_;
}
DataRate SendSideBandwidthEstimation::delay_based_limit() const {
return delay_based_limit_;
}
DataRate SendSideBandwidthEstimation::GetEstimatedLinkCapacity() const {
return link_capacity_.estimate();
}

View File

@ -86,7 +86,6 @@ class SendSideBandwidthEstimation {
DataRate target_rate() const;
LossBasedState loss_based_state() const;
DataRate delay_based_limit() const;
uint8_t fraction_loss() const { return last_fraction_loss_; }
TimeDelta round_trip_time() const { return last_round_trip_time_; }