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

Side by Side Diff: media/engine/webrtcvideoengine_unittest.cc

Issue 3019453002: Delete member VideoReceiveStream::Config::Rtp::ulpfec. (Closed)
Patch Set: Added DCHECK. Created 3 years, 3 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 unified diff | Download patch
« no previous file with comments | « media/engine/webrtcvideoengine.cc ('k') | video/end_to_end_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 TEST_F(WebRtcVideoChannelTest, SetRecvCodecsWithoutFecDisablesFec) { 3312 TEST_F(WebRtcVideoChannelTest, SetRecvCodecsWithoutFecDisablesFec) {
3313 cricket::VideoSendParameters send_parameters; 3313 cricket::VideoSendParameters send_parameters;
3314 send_parameters.codecs.push_back(GetEngineCodec("VP8")); 3314 send_parameters.codecs.push_back(GetEngineCodec("VP8"));
3315 send_parameters.codecs.push_back(GetEngineCodec("red")); 3315 send_parameters.codecs.push_back(GetEngineCodec("red"));
3316 send_parameters.codecs.push_back(GetEngineCodec("ulpfec")); 3316 send_parameters.codecs.push_back(GetEngineCodec("ulpfec"));
3317 ASSERT_TRUE(channel_->SetSendParameters(send_parameters)); 3317 ASSERT_TRUE(channel_->SetSendParameters(send_parameters));
3318 3318
3319 FakeVideoReceiveStream* stream = AddRecvStream(); 3319 FakeVideoReceiveStream* stream = AddRecvStream();
3320 3320
3321 EXPECT_EQ(GetEngineCodec("ulpfec").id, 3321 EXPECT_EQ(GetEngineCodec("ulpfec").id,
3322 stream->GetConfig().rtp.ulpfec.ulpfec_payload_type); 3322 stream->GetConfig().rtp.ulpfec_payload_type);
3323 3323
3324 cricket::VideoRecvParameters recv_parameters; 3324 cricket::VideoRecvParameters recv_parameters;
3325 recv_parameters.codecs.push_back(GetEngineCodec("VP8")); 3325 recv_parameters.codecs.push_back(GetEngineCodec("VP8"));
3326 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters)); 3326 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters));
3327 stream = fake_call_->GetVideoReceiveStreams()[0]; 3327 stream = fake_call_->GetVideoReceiveStreams()[0];
3328 ASSERT_TRUE(stream != nullptr); 3328 ASSERT_TRUE(stream != nullptr);
3329 EXPECT_EQ(-1, stream->GetConfig().rtp.ulpfec.ulpfec_payload_type) 3329 EXPECT_EQ(-1, stream->GetConfig().rtp.ulpfec_payload_type)
3330 << "SetSendCodec without ULPFEC should disable current ULPFEC."; 3330 << "SetSendCodec without ULPFEC should disable current ULPFEC.";
3331 } 3331 }
3332 3332
3333 TEST_F(WebRtcVideoChannelFlexfecRecvTest, SetRecvParamsWithoutFecDisablesFec) { 3333 TEST_F(WebRtcVideoChannelFlexfecRecvTest, SetRecvParamsWithoutFecDisablesFec) {
3334 AddRecvStream( 3334 AddRecvStream(
3335 CreatePrimaryWithFecFrStreamParams("cname", kSsrcs1[0], kFlexfecSsrc)); 3335 CreatePrimaryWithFecFrStreamParams("cname", kSsrcs1[0], kFlexfecSsrc));
3336 const std::vector<FakeFlexfecReceiveStream*>& streams = 3336 const std::vector<FakeFlexfecReceiveStream*>& streams =
3337 fake_call_->GetFlexfecReceiveStreams(); 3337 fake_call_->GetFlexfecReceiveStreams();
3338 3338
3339 ASSERT_EQ(1U, streams.size()); 3339 ASSERT_EQ(1U, streams.size());
3340 const FakeFlexfecReceiveStream* stream = streams.front(); 3340 const FakeFlexfecReceiveStream* stream = streams.front();
3341 EXPECT_EQ(GetEngineCodec("flexfec-03").id, stream->GetConfig().payload_type); 3341 EXPECT_EQ(GetEngineCodec("flexfec-03").id, stream->GetConfig().payload_type);
3342 EXPECT_EQ(kFlexfecSsrc, stream->GetConfig().remote_ssrc); 3342 EXPECT_EQ(kFlexfecSsrc, stream->GetConfig().remote_ssrc);
3343 ASSERT_EQ(1U, stream->GetConfig().protected_media_ssrcs.size()); 3343 ASSERT_EQ(1U, stream->GetConfig().protected_media_ssrcs.size());
3344 EXPECT_EQ(kSsrcs1[0], stream->GetConfig().protected_media_ssrcs[0]); 3344 EXPECT_EQ(kSsrcs1[0], stream->GetConfig().protected_media_ssrcs[0]);
3345 3345
3346 cricket::VideoRecvParameters recv_parameters; 3346 cricket::VideoRecvParameters recv_parameters;
3347 recv_parameters.codecs.push_back(GetEngineCodec("VP8")); 3347 recv_parameters.codecs.push_back(GetEngineCodec("VP8"));
3348 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters)); 3348 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters));
3349 EXPECT_TRUE(streams.empty()) 3349 EXPECT_TRUE(streams.empty())
3350 << "SetSendCodec without FlexFEC should disable current FlexFEC."; 3350 << "SetSendCodec without FlexFEC should disable current FlexFEC.";
3351 } 3351 }
3352 3352
3353 TEST_F(WebRtcVideoChannelTest, SetSendParamsWithFecEnablesFec) { 3353 TEST_F(WebRtcVideoChannelTest, SetSendParamsWithFecEnablesFec) {
3354 FakeVideoReceiveStream* stream = AddRecvStream(); 3354 FakeVideoReceiveStream* stream = AddRecvStream();
3355 EXPECT_EQ(GetEngineCodec("ulpfec").id, 3355 EXPECT_EQ(GetEngineCodec("ulpfec").id,
3356 stream->GetConfig().rtp.ulpfec.ulpfec_payload_type); 3356 stream->GetConfig().rtp.ulpfec_payload_type);
3357 3357
3358 cricket::VideoRecvParameters recv_parameters; 3358 cricket::VideoRecvParameters recv_parameters;
3359 recv_parameters.codecs.push_back(GetEngineCodec("VP8")); 3359 recv_parameters.codecs.push_back(GetEngineCodec("VP8"));
3360 recv_parameters.codecs.push_back(GetEngineCodec("red")); 3360 recv_parameters.codecs.push_back(GetEngineCodec("red"));
3361 recv_parameters.codecs.push_back(GetEngineCodec("ulpfec")); 3361 recv_parameters.codecs.push_back(GetEngineCodec("ulpfec"));
3362 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters)); 3362 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters));
3363 stream = fake_call_->GetVideoReceiveStreams()[0]; 3363 stream = fake_call_->GetVideoReceiveStreams()[0];
3364 ASSERT_TRUE(stream != nullptr); 3364 ASSERT_TRUE(stream != nullptr);
3365 EXPECT_EQ(GetEngineCodec("ulpfec").id, 3365 EXPECT_EQ(GetEngineCodec("ulpfec").id,
3366 stream->GetConfig().rtp.ulpfec.ulpfec_payload_type) 3366 stream->GetConfig().rtp.ulpfec_payload_type)
3367 << "ULPFEC should be enabled on the receive stream."; 3367 << "ULPFEC should be enabled on the receive stream.";
3368 3368
3369 cricket::VideoSendParameters send_parameters; 3369 cricket::VideoSendParameters send_parameters;
3370 send_parameters.codecs.push_back(GetEngineCodec("VP8")); 3370 send_parameters.codecs.push_back(GetEngineCodec("VP8"));
3371 send_parameters.codecs.push_back(GetEngineCodec("red")); 3371 send_parameters.codecs.push_back(GetEngineCodec("red"));
3372 send_parameters.codecs.push_back(GetEngineCodec("ulpfec")); 3372 send_parameters.codecs.push_back(GetEngineCodec("ulpfec"));
3373 ASSERT_TRUE(channel_->SetSendParameters(send_parameters)); 3373 ASSERT_TRUE(channel_->SetSendParameters(send_parameters));
3374 stream = fake_call_->GetVideoReceiveStreams()[0]; 3374 stream = fake_call_->GetVideoReceiveStreams()[0];
3375 EXPECT_EQ(GetEngineCodec("ulpfec").id, 3375 EXPECT_EQ(GetEngineCodec("ulpfec").id,
3376 stream->GetConfig().rtp.ulpfec.ulpfec_payload_type) 3376 stream->GetConfig().rtp.ulpfec_payload_type)
3377 << "ULPFEC should be enabled on the receive stream."; 3377 << "ULPFEC should be enabled on the receive stream.";
3378 } 3378 }
3379 3379
3380 TEST_F(WebRtcVideoChannelFlexfecSendRecvTest, 3380 TEST_F(WebRtcVideoChannelFlexfecSendRecvTest,
3381 SetSendRecvParamsWithFecEnablesFec) { 3381 SetSendRecvParamsWithFecEnablesFec) {
3382 AddRecvStream( 3382 AddRecvStream(
3383 CreatePrimaryWithFecFrStreamParams("cname", kSsrcs1[0], kFlexfecSsrc)); 3383 CreatePrimaryWithFecFrStreamParams("cname", kSsrcs1[0], kFlexfecSsrc));
3384 const std::vector<FakeFlexfecReceiveStream*>& streams = 3384 const std::vector<FakeFlexfecReceiveStream*>& streams =
3385 fake_call_->GetFlexfecReceiveStreams(); 3385 fake_call_->GetFlexfecReceiveStreams();
3386 3386
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
4778 4778
4779 TEST_F(WebRtcVideoChannelSimulcastTest, 4779 TEST_F(WebRtcVideoChannelSimulcastTest,
4780 NoSimulcastScreenshareWithoutConference) { 4780 NoSimulcastScreenshareWithoutConference) {
4781 webrtc::test::ScopedFieldTrials override_field_trials_( 4781 webrtc::test::ScopedFieldTrials override_field_trials_(
4782 "WebRTC-SimulcastScreenshare/Enabled/"); 4782 "WebRTC-SimulcastScreenshare/Enabled/");
4783 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, 4783 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true,
4784 false); 4784 false);
4785 } 4785 }
4786 4786
4787 } // namespace cricket 4787 } // namespace cricket
OLDNEW
« no previous file with comments | « media/engine/webrtcvideoengine.cc ('k') | video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698