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

Unified Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2621573002: Remove FlexfecConfig and replace with specific struct in VideoSendStream. (Closed)
Patch Set: Created 3 years, 11 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
Index: webrtc/media/engine/webrtcvideoengine2_unittest.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2_unittest.cc b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
index 5944883e1c20d68b799e20d7dfcb59b94e7ddb77..4e9963c45e53b4f50c8f1086a6b03bad7c9fec63 100644
--- a/webrtc/media/engine/webrtcvideoengine2_unittest.cc
+++ b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
@@ -2347,7 +2347,7 @@ TEST_F(WebRtcVideoChannel2Test, FlexfecCodecWithoutSsrcNotExposedByDefault) {
FakeVideoSendStream* stream = AddSendStream();
webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
- EXPECT_EQ(-1, config.rtp.flexfec.flexfec_payload_type);
+ EXPECT_EQ(-1, config.rtp.flexfec.payload_type);
}
// TODO(brandtr): Remove when FlexFEC _is_ exposed by default.
@@ -2356,7 +2356,7 @@ TEST_F(WebRtcVideoChannel2Test, FlexfecCodecWithSsrcNotExposedByDefault) {
CreatePrimaryWithFecFrStreamParams("cname", kSsrcs1[0], kFlexfecSsrc));
webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
- EXPECT_EQ(-1, config.rtp.flexfec.flexfec_payload_type);
+ EXPECT_EQ(-1, config.rtp.flexfec.payload_type);
}
// TODO(brandtr): When FlexFEC is no longer behind a field trial, merge all
@@ -2374,9 +2374,9 @@ TEST_F(WebRtcVideoChannel2FlexfecTest, SetDefaultSendCodecsWithoutSsrc) {
FakeVideoSendStream* stream = AddSendStream();
webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
- EXPECT_EQ(GetEngineCodec("flexfec-03").id,
- config.rtp.flexfec.flexfec_payload_type);
- EXPECT_FALSE(config.rtp.flexfec.IsCompleteAndEnabled());
+ EXPECT_EQ(GetEngineCodec("flexfec-03").id, config.rtp.flexfec.payload_type);
+ EXPECT_EQ(0U, config.rtp.flexfec.ssrc);
+ EXPECT_TRUE(config.rtp.flexfec.protected_media_ssrcs.empty());
}
// TODO(brandtr): Merge into "non-field trial" test when FlexFEC is enabled
@@ -2386,9 +2386,10 @@ TEST_F(WebRtcVideoChannel2FlexfecTest, SetDefaultSendCodecsWithSsrc) {
CreatePrimaryWithFecFrStreamParams("cname", kSsrcs1[0], kFlexfecSsrc));
webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
- EXPECT_EQ(GetEngineCodec("flexfec-03").id,
- config.rtp.flexfec.flexfec_payload_type);
- EXPECT_TRUE(config.rtp.flexfec.IsCompleteAndEnabled());
+ EXPECT_EQ(GetEngineCodec("flexfec-03").id, config.rtp.flexfec.payload_type);
+ EXPECT_EQ(kFlexfecSsrc, config.rtp.flexfec.ssrc);
+ ASSERT_EQ(1U, config.rtp.flexfec.protected_media_ssrcs.size());
+ EXPECT_EQ(kSsrcs1[0], config.rtp.flexfec.protected_media_ssrcs[0]);
}
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithoutFec) {
@@ -2413,7 +2414,7 @@ TEST_F(WebRtcVideoChannel2FlexfecTest, SetSendCodecsWithoutFec) {
FakeVideoSendStream* stream = AddSendStream();
webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
- EXPECT_EQ(-1, config.rtp.flexfec.flexfec_payload_type);
+ EXPECT_EQ(-1, config.rtp.flexfec.payload_type);
}
TEST_F(WebRtcVideoChannel2Test,
@@ -2485,9 +2486,8 @@ TEST_F(WebRtcVideoChannel2FlexfecTest, SetSendCodecsWithoutFecDisablesFec) {
CreatePrimaryWithFecFrStreamParams("cname", kSsrcs1[0], kFlexfecSsrc));
webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
- EXPECT_EQ(GetEngineCodec("flexfec-03").id,
- config.rtp.flexfec.flexfec_payload_type);
- EXPECT_EQ(kFlexfecSsrc, config.rtp.flexfec.flexfec_ssrc);
+ EXPECT_EQ(GetEngineCodec("flexfec-03").id, config.rtp.flexfec.payload_type);
+ EXPECT_EQ(kFlexfecSsrc, config.rtp.flexfec.ssrc);
ASSERT_EQ(1U, config.rtp.flexfec.protected_media_ssrcs.size());
EXPECT_EQ(kSsrcs1[0], config.rtp.flexfec.protected_media_ssrcs[0]);
@@ -2496,7 +2496,7 @@ TEST_F(WebRtcVideoChannel2FlexfecTest, SetSendCodecsWithoutFecDisablesFec) {
stream = fake_call_->GetVideoSendStreams()[0];
ASSERT_TRUE(stream != nullptr);
config = stream->GetConfig().Copy();
- EXPECT_EQ(-1, config.rtp.flexfec.flexfec_payload_type)
+ EXPECT_EQ(-1, config.rtp.flexfec.payload_type)
<< "SetSendCodec without FlexFEC should disable current FlexFEC.";
}

Powered by Google App Engine
This is Rietveld 408576698