Reland of Fixes a bug where a video stream can get stuck in the suspended state. (patchset #1 id:1 of https://codereview.chromium.org/2703393002/ )
Reason for revert:
Downstream fixed
Original issue's description:
> Revert of Fixes a bug where a video stream can get stuck in the suspended state. (patchset #8 id:120001 of https://codereview.webrtc.org/2705603002/ )
>
> Reason for revert:
> Breaks downstream
>
> Original issue's description:
> > Fixes a bug where a video stream can get stuck in the suspended state.
> >
> > This happens if a lot of FEC is allocated when the stream becomes suspended. The required bitrate to unsuspend can then be too high so that the padding bitrate we are allowed to generate is not enough.
> >
> > This CL also switches the tests from using ISAC to OPUS as RampUpTest.UpDownUpAudioVideoTransportSequenceNumberRtx relies on audio BWE to work (which is only compatible with OPUS). I don't know why it didn't fail before.
> >
> > BUG=webrtc:7178
> >
> > Review-Url: https://codereview.webrtc.org/2705603002
> > Cr-Commit-Position: refs/heads/master@{#16739}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/a518a39963d34616d8f0e94991c7f5fbb5affb38
>
> TBR=mflodman@webrtc.org,terelius@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7178
>
> Review-Url: https://codereview.webrtc.org/2703393002
> Cr-Commit-Position: refs/heads/master@{#16751}
> Committed: https://chromium.googlesource.com/external/webrtc/+/b80bdcafed6c529be140da7d9f3e95a00b94219e
TBR=mflodman@webrtc.org,terelius@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7178
Review-Url: https://codereview.webrtc.org/2704323003
Cr-Commit-Position: refs/heads/master@{#16753}
diff --git a/webrtc/call/bitrate_allocator_unittest.cc b/webrtc/call/bitrate_allocator_unittest.cc
index 751ec93..ead4cbd 100644
--- a/webrtc/call/bitrate_allocator_unittest.cc
+++ b/webrtc/call/bitrate_allocator_unittest.cc
@@ -98,8 +98,6 @@
true);
EXPECT_EQ(4000000, allocator_->GetStartBitrate(&bitrate_observer));
- EXPECT_CALL(limit_observer_,
- OnAllocationLimitsChanged(kMinSendBitrateBps, 0));
allocator_->AddObserver(&bitrate_observer, kMinSendBitrateBps, 1500000, 0,
true);
EXPECT_EQ(3000000, allocator_->GetStartBitrate(&bitrate_observer));
@@ -183,7 +181,7 @@
TestBitrateObserver bitrate_observer_1;
// Expect OnAllocationLimitsChanged with |min_send_bitrate_bps| = 0 since
// AddObserver is called with |enforce_min_bitrate| = false.
- EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
+ EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 120000));
allocator_->AddObserver(&bitrate_observer_1, 100000, 400000, 0, false);
EXPECT_EQ(300000, allocator_->GetStartBitrate(&bitrate_observer_1));
@@ -264,7 +262,7 @@
TestBitrateObserver bitrate_observer;
// Expect OnAllocationLimitsChanged with |min_send_bitrate_bps| = 0 since
// AddObserver is called with |enforce_min_bitrate| = false.
- EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
+ EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 168000));
allocator_->AddObserver(
&bitrate_observer, 100000, 400000, 0, false);
EXPECT_EQ(300000, allocator_->GetStartBitrate(&bitrate_observer));
@@ -292,6 +290,7 @@
EXPECT_EQ(0u, bitrate_observer.last_bitrate_bps_);
// Just enough to enable video again.
+ EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
allocator_->OnNetworkChanged(168000, 0, fraction_loss,
kDefaultProbingIntervalMs);
EXPECT_EQ(168000u, bitrate_observer.last_bitrate_bps_);
@@ -304,7 +303,6 @@
allocator_->OnNetworkChanged(139000, 0, 0, kDefaultProbingIntervalMs);
EXPECT_EQ(139000u, bitrate_observer.last_bitrate_bps_);
- EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
allocator_->RemoveObserver(&bitrate_observer);
}