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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2469093003: Remove RED/RTX workaround from sender/receiver and VideoEngine2. (Closed)
Patch Set: Fix warning message. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 2634
2635 cricket::VideoRecvParameters recv_parameters; 2635 cricket::VideoRecvParameters recv_parameters;
2636 recv_parameters.codecs.push_back(kVp8Codec); 2636 recv_parameters.codecs.push_back(kVp8Codec);
2637 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters)); 2637 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters));
2638 stream = fake_call_->GetVideoReceiveStreams()[0]; 2638 stream = fake_call_->GetVideoReceiveStreams()[0];
2639 ASSERT_TRUE(stream != NULL); 2639 ASSERT_TRUE(stream != NULL);
2640 EXPECT_EQ(-1, stream->GetConfig().rtp.ulpfec.ulpfec_payload_type) 2640 EXPECT_EQ(-1, stream->GetConfig().rtp.ulpfec.ulpfec_payload_type)
2641 << "SetSendCodec without FEC should disable current FEC."; 2641 << "SetSendCodec without FEC should disable current FEC.";
2642 } 2642 }
2643 2643
2644 TEST_F(WebRtcVideoChannel2Test, SetSendParamsWithoutFecDisablesReceivingFec) { 2644 TEST_F(WebRtcVideoChannel2Test, SetSendParamsWithFecEnablesFec) {
2645 FakeVideoReceiveStream* stream = AddRecvStream(); 2645 FakeVideoReceiveStream* stream = AddRecvStream();
2646 EXPECT_EQ(kUlpfecCodec.id, 2646 EXPECT_EQ(kUlpfecCodec.id,
2647 stream->GetConfig().rtp.ulpfec.ulpfec_payload_type); 2647 stream->GetConfig().rtp.ulpfec.ulpfec_payload_type);
2648 2648
2649 cricket::VideoRecvParameters recv_parameters; 2649 cricket::VideoRecvParameters recv_parameters;
2650 recv_parameters.codecs.push_back(kVp8Codec); 2650 recv_parameters.codecs.push_back(kVp8Codec);
2651 recv_parameters.codecs.push_back(kRedCodec); 2651 recv_parameters.codecs.push_back(kRedCodec);
2652 recv_parameters.codecs.push_back(kUlpfecCodec); 2652 recv_parameters.codecs.push_back(kUlpfecCodec);
2653 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters)); 2653 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters));
2654 stream = fake_call_->GetVideoReceiveStreams()[0]; 2654 stream = fake_call_->GetVideoReceiveStreams()[0];
2655 ASSERT_TRUE(stream != NULL); 2655 ASSERT_TRUE(stream != NULL);
2656 EXPECT_EQ(kUlpfecCodec.id, stream->GetConfig().rtp.ulpfec.ulpfec_payload_type) 2656 EXPECT_EQ(kUlpfecCodec.id, stream->GetConfig().rtp.ulpfec.ulpfec_payload_type)
2657 << "FEC should be enabled on the recieve stream."; 2657 << "FEC should be enabled on the receive stream.";
2658 2658
2659 cricket::VideoSendParameters send_parameters; 2659 cricket::VideoSendParameters send_parameters;
2660 send_parameters.codecs.push_back(kVp8Codec); 2660 send_parameters.codecs.push_back(kVp8Codec);
2661 ASSERT_TRUE(channel_->SetSendParameters(send_parameters));
2662 stream = fake_call_->GetVideoReceiveStreams()[0];
2663 EXPECT_EQ(-1, stream->GetConfig().rtp.ulpfec.ulpfec_payload_type)
2664 << "FEC should have been disabled when we know the other side won't do "
2665 "FEC.";
2666
2667 send_parameters.codecs.push_back(kRedCodec); 2661 send_parameters.codecs.push_back(kRedCodec);
2668 send_parameters.codecs.push_back(kUlpfecCodec); 2662 send_parameters.codecs.push_back(kUlpfecCodec);
2669 ASSERT_TRUE(channel_->SetSendParameters(send_parameters)); 2663 ASSERT_TRUE(channel_->SetSendParameters(send_parameters));
2670 stream = fake_call_->GetVideoReceiveStreams()[0]; 2664 stream = fake_call_->GetVideoReceiveStreams()[0];
2671 EXPECT_EQ(kUlpfecCodec.id, stream->GetConfig().rtp.ulpfec.ulpfec_payload_type) 2665 EXPECT_EQ(kUlpfecCodec.id, stream->GetConfig().rtp.ulpfec.ulpfec_payload_type)
2672 << "FEC should be enabled on the recieve stream."; 2666 << "FEC should be enabled on the receive stream.";
2673 } 2667 }
2674 2668
2675 TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectDuplicateFecPayloads) { 2669 TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectDuplicateFecPayloads) {
2676 cricket::VideoRecvParameters parameters; 2670 cricket::VideoRecvParameters parameters;
2677 parameters.codecs.push_back(kVp8Codec); 2671 parameters.codecs.push_back(kVp8Codec);
2678 parameters.codecs.push_back(kRedCodec); 2672 parameters.codecs.push_back(kRedCodec);
2679 parameters.codecs[1].id = parameters.codecs[0].id; 2673 parameters.codecs[1].id = parameters.codecs[0].id;
2680 EXPECT_FALSE(channel_->SetRecvParameters(parameters)); 2674 EXPECT_FALSE(channel_->SetRecvParameters(parameters));
2681 } 2675 }
2682 2676
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
3743 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { 3737 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) {
3744 VerifySimulcastSettings(kVp8Codec, 1280, 720, 3, 3); 3738 VerifySimulcastSettings(kVp8Codec, 1280, 720, 3, 3);
3745 } 3739 }
3746 3740
3747 // Test that we normalize send codec format size in simulcast. 3741 // Test that we normalize send codec format size in simulcast.
3748 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3742 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
3749 cricket::VideoCodec codec(kVp8Codec); 3743 cricket::VideoCodec codec(kVp8Codec);
3750 VerifySimulcastSettings(codec, 541, 271, 2, 2); 3744 VerifySimulcastSettings(codec, 541, 271, 2, 2);
3751 } 3745 }
3752 } // namespace cricket 3746 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698