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

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

Issue 1964473002: Potential fix for rtx/red issue where red is removed only from the remote description. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix mistake. Created 4 years, 7 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
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2_unittest.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2_unittest.cc b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
index db34dd130a7cbd7182f7786ff6fb67523290efdd..fd7a6463b8bbcc5e9726bb21597204f820c63218 100644
--- a/webrtc/media/engine/webrtcvideoengine2_unittest.cc
+++ b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
@@ -2678,6 +2678,7 @@ TEST_F(WebRtcVideoChannel2Test,
TEST_F(WebRtcVideoChannel2Test, SetRecvCodecsWithoutFecDisablesFec) {
cricket::VideoSendParameters send_parameters;
send_parameters.codecs.push_back(kVp8Codec);
+ send_parameters.codecs.push_back(kRedCodec);
send_parameters.codecs.push_back(kUlpfecCodec);
ASSERT_TRUE(channel_->SetSendParameters(send_parameters));
@@ -2696,6 +2697,41 @@ TEST_F(WebRtcVideoChannel2Test, SetRecvCodecsWithoutFecDisablesFec) {
<< "SetSendCodec without FEC should disable current FEC.";
}
+TEST_F(WebRtcVideoChannel2Test, SetSendParamsWithoutFecDisablesReceivingFec) {
+ FakeVideoReceiveStream* stream = AddRecvStream();
+ webrtc::VideoReceiveStream::Config config = stream->GetConfig();
+
+ EXPECT_EQ(kUlpfecCodec.id, config.rtp.fec.ulpfec_payload_type);
+
+ cricket::VideoRecvParameters recv_parameters;
+ recv_parameters.codecs.push_back(kVp8Codec);
+ recv_parameters.codecs.push_back(kRedCodec);
+ recv_parameters.codecs.push_back(kUlpfecCodec);
+ ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters));
+ stream = fake_call_->GetVideoReceiveStreams()[0];
+ ASSERT_TRUE(stream != NULL);
+ config = stream->GetConfig();
+ EXPECT_EQ(kUlpfecCodec.id, config.rtp.fec.ulpfec_payload_type)
+ << "FEC should be enabled on the recieve stream.";
+
+ cricket::VideoSendParameters send_parameters;
+ send_parameters.codecs.push_back(kVp8Codec);
+ ASSERT_TRUE(channel_->SetSendParameters(send_parameters));
+ stream = fake_call_->GetVideoReceiveStreams()[0];
+ config = stream->GetConfig();
+ EXPECT_EQ(-1, config.rtp.fec.ulpfec_payload_type)
+ << "FEC should have been disabled when we know the other side won't do "
+ "FEC.";
+
+ send_parameters.codecs.push_back(kRedCodec);
+ send_parameters.codecs.push_back(kUlpfecCodec);
+ ASSERT_TRUE(channel_->SetSendParameters(send_parameters));
+ stream = fake_call_->GetVideoReceiveStreams()[0];
+ config = stream->GetConfig();
+ EXPECT_EQ(kUlpfecCodec.id, config.rtp.fec.ulpfec_payload_type)
+ << "FEC should be enabled on the recieve stream.";
+}
+
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectDuplicateFecPayloads) {
cricket::VideoRecvParameters parameters;
parameters.codecs.push_back(kVp8Codec);
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698