diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation.cc b/modules/bitrate_controller/send_side_bandwidth_estimation.cc index b3c6a753c1..808d6f0b4d 100644 --- a/modules/bitrate_controller/send_side_bandwidth_estimation.cc +++ b/modules/bitrate_controller/send_side_bandwidth_estimation.cc @@ -353,18 +353,6 @@ void SendSideBandwidthEstimation::IncomingPacketFeedbackVector( } } -void SendSideBandwidthEstimation::UpdateReceiverBlock(uint8_t fraction_loss, - TimeDelta rtt, - int number_of_packets, - Timestamp at_time) { - const int kRoundingConstant = 128; - int packets_lost = (static_cast(fraction_loss) * number_of_packets + - kRoundingConstant) >> - 8; - UpdatePacketsLost(packets_lost, number_of_packets, at_time); - UpdateRtt(rtt, at_time); -} - void SendSideBandwidthEstimation::UpdatePacketsLost(int packets_lost, int number_of_packets, Timestamp at_time) { diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation.h b/modules/bitrate_controller/send_side_bandwidth_estimation.h index be35e5db08..f0d5ecd05b 100644 --- a/modules/bitrate_controller/send_side_bandwidth_estimation.h +++ b/modules/bitrate_controller/send_side_bandwidth_estimation.h @@ -88,12 +88,6 @@ class SendSideBandwidthEstimation { // Call when a new delay-based estimate is available. void UpdateDelayBasedEstimate(Timestamp at_time, DataRate bitrate); - // Call when we receive a RTCP message with a ReceiveBlock. - void UpdateReceiverBlock(uint8_t fraction_loss, - TimeDelta rtt_ms, - int number_of_packets, - Timestamp at_time); - // Call when we receive a RTCP message with a ReceiveBlock. void UpdatePacketsLost(int packets_lost, int number_of_packets, diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc b/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc index a6203f3edf..62de886840 100644 --- a/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc +++ b/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc @@ -44,7 +44,9 @@ void TestProbing(bool use_delay_based) { const int kRembBps = 1000000; const int kSecondRembBps = kRembBps + 500000; - bwe.UpdateReceiverBlock(0, TimeDelta::ms(50), 1, Timestamp::ms(now_ms)); + bwe.UpdatePacketsLost(/*packets_lost=*/0, /*number_of_packets=*/1, + Timestamp::ms(now_ms)); + bwe.UpdateRtt(TimeDelta::ms(50), Timestamp::ms(now_ms)); // Initial REMB applies immediately. if (use_delay_based) { @@ -110,8 +112,10 @@ TEST(SendSideBweTest, DoesntReapplyBitrateDecreaseWithoutFollowingRemb) { EXPECT_EQ(0, rtt_ms); // Signal heavy loss to go down in bitrate. - bwe.UpdateReceiverBlock(kFractionLoss, TimeDelta::ms(kRttMs), 100, - Timestamp::ms(now_ms)); + bwe.UpdatePacketsLost(/*packets_lost=*/50, /*number_of_packets=*/100, + Timestamp::ms(now_ms)); + bwe.UpdateRtt(TimeDelta::ms(kRttMs), Timestamp::ms(now_ms)); + // Trigger an update 2 seconds later to not be rate limited. now_ms += 1000; bwe.UpdateEstimate(Timestamp::ms(now_ms));