Preparing for task queue in congenstion controller

This cl prepares for a later CL introducing a new send side congestion
controller that will run on a task queue. It mostly consists of minor
fixes but adds some new interfaces that are unused in practice.

Bug: webrtc:8415
Change-Id: I1b58d0180a18eb15320d18733dac0dfe2e0f902a
Reviewed-on: https://webrtc-review.googlesource.com/53321
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22099}
This commit is contained in:
Sebastian Jansson
2018-02-20 10:46:39 +01:00
committed by Commit Bot
parent 645898a454
commit 439f0bc69a
17 changed files with 159 additions and 121 deletions

View File

@ -340,11 +340,11 @@ TEST_F(BitrateControllerTest, OneBitrateObserverMultipleReportBlocks) {
report_blocks.clear();
// All packets lost on stream with few packets, no back-off.
report_blocks.push_back(CreateReportBlock(1, 2, 1, sequence_number[0]));
report_blocks.push_back(CreateReportBlock(1, 2, 0, sequence_number[0]));
report_blocks.push_back(CreateReportBlock(1, 3, 255, sequence_number[1]));
bandwidth_observer_->OnReceivedRtcpReceiverReport(report_blocks, 50, time_ms);
EXPECT_EQ(bitrate_observer_.last_bitrate_, last_bitrate);
EXPECT_EQ(WeightedLoss(20, 1, 1, 255), bitrate_observer_.last_fraction_loss_);
EXPECT_EQ(WeightedLoss(20, 0, 1, 255), bitrate_observer_.last_fraction_loss_);
EXPECT_EQ(50, bitrate_observer_.last_rtt_);
last_bitrate = bitrate_observer_.last_bitrate_;
sequence_number[0] += 20;