OLD | NEW |
---|---|
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 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2417 cricket::VideoSendParameters parameters; | 2417 cricket::VideoSendParameters parameters; |
2418 parameters.codecs.push_back(GetEngineCodec("VP8")); | 2418 parameters.codecs.push_back(GetEngineCodec("VP8")); |
2419 ASSERT_TRUE(channel_->SetSendParameters(parameters)); | 2419 ASSERT_TRUE(channel_->SetSendParameters(parameters)); |
2420 | 2420 |
2421 FakeVideoSendStream* stream = AddSendStream(); | 2421 FakeVideoSendStream* stream = AddSendStream(); |
2422 webrtc::VideoSendStream::Config config = stream->GetConfig().Copy(); | 2422 webrtc::VideoSendStream::Config config = stream->GetConfig().Copy(); |
2423 | 2423 |
2424 EXPECT_EQ(-1, config.rtp.flexfec.payload_type); | 2424 EXPECT_EQ(-1, config.rtp.flexfec.payload_type); |
2425 } | 2425 } |
2426 | 2426 |
2427 TEST_F(WebRtcVideoChannel2FlexfecTest, SetRecvCodecsWithFec) { | |
brandtr
2017/01/20 15:04:50
Here it is. This is a slightly simplified version
| |
2428 AddRecvStream( | |
2429 CreatePrimaryWithFecFrStreamParams("cname", kSsrcs1[0], kFlexfecSsrc)); | |
2430 const std::list<FakeFlexfecReceiveStream>& streams = | |
2431 fake_call_->GetFlexfecReceiveStreams(); | |
2432 | |
2433 cricket::VideoRecvParameters recv_parameters; | |
2434 recv_parameters.codecs.push_back(GetEngineCodec("VP8")); | |
2435 recv_parameters.codecs.push_back(GetEngineCodec("flexfec-03")); | |
2436 ASSERT_TRUE(channel_->SetRecvParameters(recv_parameters)); | |
2437 ASSERT_EQ(1U, streams.size()); | |
2438 const FakeFlexfecReceiveStream& stream_with_recv_params = streams.front(); | |
2439 EXPECT_EQ(GetEngineCodec("flexfec-03").id, | |
2440 stream_with_recv_params.GetConfig().payload_type); | |
2441 EXPECT_EQ(kFlexfecSsrc, stream_with_recv_params.GetConfig().remote_ssrc); | |
2442 EXPECT_EQ(1U, | |
2443 stream_with_recv_params.GetConfig().protected_media_ssrcs.size()); | |
2444 EXPECT_EQ(kSsrcs1[0], | |
2445 stream_with_recv_params.GetConfig().protected_media_ssrcs[0]); | |
2446 } | |
2447 | |
2427 TEST_F(WebRtcVideoChannel2Test, | 2448 TEST_F(WebRtcVideoChannel2Test, |
2428 SetSendCodecRejectsRtxWithoutAssociatedPayloadType) { | 2449 SetSendCodecRejectsRtxWithoutAssociatedPayloadType) { |
2429 const int kUnusedPayloadType = 127; | 2450 const int kUnusedPayloadType = 127; |
2430 EXPECT_FALSE(FindCodecById(engine_.codecs(), kUnusedPayloadType)); | 2451 EXPECT_FALSE(FindCodecById(engine_.codecs(), kUnusedPayloadType)); |
2431 | 2452 |
2432 cricket::VideoSendParameters parameters; | 2453 cricket::VideoSendParameters parameters; |
2433 cricket::VideoCodec rtx_codec(kUnusedPayloadType, "rtx"); | 2454 cricket::VideoCodec rtx_codec(kUnusedPayloadType, "rtx"); |
2434 parameters.codecs.push_back(rtx_codec); | 2455 parameters.codecs.push_back(rtx_codec); |
2435 EXPECT_FALSE(channel_->SetSendParameters(parameters)) | 2456 EXPECT_FALSE(channel_->SetSendParameters(parameters)) |
2436 << "RTX codec without associated payload type should be rejected."; | 2457 << "RTX codec without associated payload type should be rejected."; |
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4065 | 4086 |
4066 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { | 4087 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { |
4067 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); | 4088 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); |
4068 } | 4089 } |
4069 | 4090 |
4070 // Test that we normalize send codec format size in simulcast. | 4091 // Test that we normalize send codec format size in simulcast. |
4071 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 4092 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
4072 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); | 4093 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); |
4073 } | 4094 } |
4074 } // namespace cricket | 4095 } // namespace cricket |
OLD | NEW |