Update the minimum bitrate when a stream allocation is removed.
The minimum bitrate was lower bounded by the previous value and could thus not become lower when a stream allocation was removed. Bug: None Change-Id: I60068dbc7691121f001cbb233ca4a25269047f6e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157424 Reviewed-by: Sebastian Jansson <srte@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29541}
This commit is contained in:
committed by
Commit Bot
parent
03bc15c646
commit
33ed88287f
@ -325,9 +325,10 @@ void GoogCcNetworkController::ClampConstraints() {
|
||||
// and that we don't try to set the min bitrate to 0 from any applications.
|
||||
// The congestion controller should allow a min bitrate of 0.
|
||||
min_data_rate_ =
|
||||
std::max(min_data_rate_, congestion_controller::GetMinBitrate());
|
||||
if (use_min_allocatable_as_lower_bound_)
|
||||
std::max(min_target_rate_, congestion_controller::GetMinBitrate());
|
||||
if (use_min_allocatable_as_lower_bound_) {
|
||||
min_data_rate_ = std::max(min_data_rate_, min_total_allocated_bitrate_);
|
||||
}
|
||||
if (max_data_rate_ < min_data_rate_) {
|
||||
RTC_LOG(LS_WARNING) << "max bitrate smaller than min bitrate";
|
||||
max_data_rate_ = min_data_rate_;
|
||||
@ -340,7 +341,7 @@ void GoogCcNetworkController::ClampConstraints() {
|
||||
|
||||
std::vector<ProbeClusterConfig> GoogCcNetworkController::ResetConstraints(
|
||||
TargetRateConstraints new_constraints) {
|
||||
min_data_rate_ = new_constraints.min_data_rate.value_or(DataRate::Zero());
|
||||
min_target_rate_ = new_constraints.min_data_rate.value_or(DataRate::Zero());
|
||||
max_data_rate_ =
|
||||
new_constraints.max_data_rate.value_or(DataRate::PlusInfinity());
|
||||
starting_rate_ = new_constraints.starting_rate;
|
||||
|
||||
@ -104,6 +104,7 @@ class GoogCcNetworkController : public NetworkControllerInterface {
|
||||
|
||||
absl::optional<NetworkControllerConfig> initial_config_;
|
||||
|
||||
DataRate min_target_rate_ = DataRate::Zero();
|
||||
DataRate min_data_rate_ = DataRate::Zero();
|
||||
DataRate max_data_rate_ = DataRate::PlusInfinity();
|
||||
absl::optional<DataRate> starting_rate_;
|
||||
|
||||
Reference in New Issue
Block a user