Moves send side bandwidth estimation bandwidth cap inside class.
Bug: webrtc:9883 Change-Id: I0bcfacccf522de1a7276c5bee07418159c57e514 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130495 Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27421}
This commit is contained in:
parent
5b84f67fba
commit
d98cbd8f91
@ -257,8 +257,6 @@ bool BitrateControllerImpl::GetNetworkParameters(uint32_t* bitrate,
|
||||
int current_bitrate;
|
||||
bandwidth_estimation_.CurrentEstimate(¤t_bitrate, fraction_loss, rtt);
|
||||
*bitrate = current_bitrate;
|
||||
*bitrate =
|
||||
std::max<uint32_t>(*bitrate, bandwidth_estimation_.GetMinBitrate());
|
||||
|
||||
bool new_bitrate = false;
|
||||
if (*bitrate != last_bitrate_bps_ || *fraction_loss != last_fraction_loss_ ||
|
||||
@ -286,7 +284,6 @@ bool BitrateControllerImpl::AvailableBandwidth(uint32_t* bandwidth) const {
|
||||
int64_t rtt;
|
||||
bandwidth_estimation_.CurrentEstimate(&bitrate, &fraction_loss, &rtt);
|
||||
if (bitrate > 0) {
|
||||
bitrate = std::max(bitrate, bandwidth_estimation_.GetMinBitrate());
|
||||
*bandwidth = bitrate;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -310,7 +310,7 @@ int SendSideBandwidthEstimation::GetMinBitrate() const {
|
||||
void SendSideBandwidthEstimation::CurrentEstimate(int* bitrate,
|
||||
uint8_t* loss,
|
||||
int64_t* rtt) const {
|
||||
*bitrate = current_bitrate_.bps<int>();
|
||||
*bitrate = std::max<int32_t>(current_bitrate_.bps<int>(), GetMinBitrate());
|
||||
*loss = last_fraction_loss_;
|
||||
*rtt = last_round_trip_time_.ms<int64_t>();
|
||||
}
|
||||
|
||||
@ -564,8 +564,6 @@ void GoogCcNetworkController::MaybeTriggerOnNetworkChanged(
|
||||
bandwidth_estimation_->CurrentEstimate(&estimated_bitrate_bps, &fraction_loss,
|
||||
&rtt_ms);
|
||||
|
||||
estimated_bitrate_bps = std::max<int32_t>(
|
||||
estimated_bitrate_bps, bandwidth_estimation_->GetMinBitrate());
|
||||
|
||||
BWE_TEST_LOGGING_PLOT(1, "fraction_loss_%", at_time.ms(),
|
||||
(fraction_loss * 100) / 256);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user