Removes unused reserved bitrate in BitrateController.
This removes the reserved bitrate feature as it is not currently used.
This saves debugging time as there is less code to investigate. This
also makes it easier to compare the code with the task queue based
version which lacks this feature.
Bug: webrtc:9586
Change-Id: I207624ceb8d203c88c3d01bfc753d60523f99fe4
Reviewed-on: https://webrtc-review.googlesource.com/92622
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24357}
diff --git a/modules/bitrate_controller/bitrate_controller_impl.cc b/modules/bitrate_controller/bitrate_controller_impl.cc
index 38f97fb..9b816f6 100644
--- a/modules/bitrate_controller/bitrate_controller_impl.cc
+++ b/modules/bitrate_controller/bitrate_controller_impl.cc
@@ -63,11 +63,9 @@
last_bitrate_update_ms_(clock_->TimeInMilliseconds()),
event_log_(event_log),
bandwidth_estimation_(event_log),
- reserved_bitrate_bps_(0),
last_bitrate_bps_(0),
last_fraction_loss_(0),
- last_rtt_ms_(0),
- last_reserved_bitrate_bps_(0) {
+ last_rtt_ms_(0) {
// This calls the observer_ if set, which means that the observer provided by
// the user must be ready to accept a bitrate update when it constructs the
// controller. We do this to avoid having to keep synchronized initial values
@@ -119,14 +117,6 @@
MaybeTriggerOnNetworkChanged();
}
-void BitrateControllerImpl::SetReservedBitrate(uint32_t reserved_bitrate_bps) {
- {
- rtc::CritScope cs(&critsect_);
- reserved_bitrate_bps_ = reserved_bitrate_bps;
- }
- MaybeTriggerOnNetworkChanged();
-}
-
// This is called upon reception of REMB or TMMBR.
void BitrateControllerImpl::OnReceivedEstimatedBitrate(uint32_t bitrate) {
{
@@ -248,18 +238,15 @@
int current_bitrate;
bandwidth_estimation_.CurrentEstimate(¤t_bitrate, fraction_loss, rtt);
*bitrate = current_bitrate;
- *bitrate -= std::min(*bitrate, reserved_bitrate_bps_);
*bitrate =
std::max<uint32_t>(*bitrate, bandwidth_estimation_.GetMinBitrate());
bool new_bitrate = false;
if (*bitrate != last_bitrate_bps_ || *fraction_loss != last_fraction_loss_ ||
- *rtt != last_rtt_ms_ ||
- last_reserved_bitrate_bps_ != reserved_bitrate_bps_) {
+ *rtt != last_rtt_ms_) {
last_bitrate_bps_ = *bitrate;
last_fraction_loss_ = *fraction_loss;
last_rtt_ms_ = *rtt;
- last_reserved_bitrate_bps_ = reserved_bitrate_bps_;
new_bitrate = true;
}
@@ -280,7 +267,6 @@
int64_t rtt;
bandwidth_estimation_.CurrentEstimate(&bitrate, &fraction_loss, &rtt);
if (bitrate > 0) {
- bitrate = bitrate - std::min<int>(bitrate, reserved_bitrate_bps_);
bitrate = std::max(bitrate, bandwidth_estimation_.GetMinBitrate());
*bandwidth = bitrate;
return true;