Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: webrtc/video/payload_router_unittest.cc

Issue 2947633003: Allow parsing empty RTCP TargetBitrate messages, but stop sending them. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« webrtc/common_types.h ('K') | « webrtc/video/payload_router.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/payload_router_unittest.cc
diff --git a/webrtc/video/payload_router_unittest.cc b/webrtc/video/payload_router_unittest.cc
index e316695338a1c7a7e31a8a46afa727dc3b0f88eb..eba26695534a4eb7cb642798477f591071b449aa 100644
--- a/webrtc/video/payload_router_unittest.cc
+++ b/webrtc/video/payload_router_unittest.cc
@@ -178,6 +178,29 @@ TEST(PayloadRouterTest, SimulcastTargetBitrate) {
payload_router.OnBitrateAllocationUpdated(bitrate);
}
+TEST(PayloadRouterTest, SimulcastTargetBitrateWithInactiveStream) {
+ NiceMock<MockRtpRtcp> rtp_1;
+ NiceMock<MockRtpRtcp> rtp_2;
+ std::vector<RtpRtcp*> modules;
+ modules.push_back(&rtp_1);
+ modules.push_back(&rtp_2);
+ PayloadRouter payload_router(modules, 42);
+ payload_router.SetActive(true);
+
+ BitrateAllocation bitrate;
+ bitrate.SetBitrate(0, 0, 10000);
+ bitrate.SetBitrate(0, 1, 20000);
+
+ BitrateAllocation layer0_bitrate;
danilchap 2017/06/20 10:29:27 is it same as bitrate? why do you need two variabl
sprang_webrtc 2017/06/20 15:24:34 I don't, I was just lazy (copy/paste from other te
+ layer0_bitrate.SetBitrate(0, 0, 10000);
+ layer0_bitrate.SetBitrate(0, 1, 20000);
+
+ EXPECT_CALL(rtp_1, SetVideoBitrateAllocation(layer0_bitrate)).Times(1);
+ EXPECT_CALL(rtp_2, SetVideoBitrateAllocation(_)).Times(0);
danilchap 2017/06/20 10:29:26 can you explain (with test name or comments, bette
sprang_webrtc 2017/06/20 15:24:34 Done.
+
+ payload_router.OnBitrateAllocationUpdated(bitrate);
+}
+
TEST(PayloadRouterTest, SvcTargetBitrate) {
NiceMock<MockRtpRtcp> rtp_1;
std::vector<RtpRtcp*> modules;
« webrtc/common_types.h ('K') | « webrtc/video/payload_router.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698