Reland Refactor reporting of VideoBitrateAllocation

Original description
 Move reporting of target bitrate to just after the encoder has been
 updated. Originall submitted as refs/heads/master@{#32275}

Patch 1 contains the original cl
,patch 2 the fix to send rtcp even if BWE does not change.

Bug: webrtc:12000
Change-Id: I16766e08229fe1f6f65f449e0e074bed03338693
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186948
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32340}
This commit is contained in:
Per Kjellander
2020-10-07 11:28:41 +02:00
committed by Commit Bot
parent d9603b276b
commit d0a8f51ef7
4 changed files with 24 additions and 30 deletions

View File

@ -58,6 +58,7 @@ namespace webrtc {
using ::testing::_;
using ::testing::AllOf;
using ::testing::AtLeast;
using ::testing::Eq;
using ::testing::Field;
using ::testing::Ge;
@ -3950,9 +3951,9 @@ TEST_F(VideoStreamEncoderTest, CallsBitrateObserver) {
// Called after a process interval.
EXPECT_CALL(bitrate_observer, OnBitrateAllocationUpdated(expected_bitrate))
.Times(1);
.Times(AtLeast(3));
const int64_t start_time_ms = CurrentTimeMs();
while (CurrentTimeMs() - start_time_ms < kProcessIntervalMs) {
while (CurrentTimeMs() - start_time_ms < 5 * kProcessIntervalMs) {
video_source_.IncomingCapturedFrame(
CreateFrame(CurrentTimeMs(), codec_width_, codec_height_));
WaitForEncodedFrame(CurrentTimeMs());