OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2384 // Verify previous value is not modified if dscp option is not set. | 2384 // Verify previous value is not modified if dscp option is not set. |
2385 cricket::VideoSendParameters parameters1 = send_parameters_; | 2385 cricket::VideoSendParameters parameters1 = send_parameters_; |
2386 EXPECT_TRUE(channel_->SetSendParameters(parameters1)); | 2386 EXPECT_TRUE(channel_->SetSendParameters(parameters1)); |
2387 EXPECT_EQ(rtc::DSCP_AF41, network_interface->dscp()); | 2387 EXPECT_EQ(rtc::DSCP_AF41, network_interface->dscp()); |
2388 parameters1.options.dscp = rtc::Optional<bool>(false); | 2388 parameters1.options.dscp = rtc::Optional<bool>(false); |
2389 EXPECT_TRUE(channel_->SetSendParameters(parameters1)); | 2389 EXPECT_TRUE(channel_->SetSendParameters(parameters1)); |
2390 EXPECT_EQ(rtc::DSCP_DEFAULT, network_interface->dscp()); | 2390 EXPECT_EQ(rtc::DSCP_DEFAULT, network_interface->dscp()); |
2391 channel_->SetInterface(NULL); | 2391 channel_->SetInterface(NULL); |
2392 } | 2392 } |
2393 | 2393 |
| 2394 // This test verifies that the RTCP reduced size mode is properly applied to |
| 2395 // send video streams. |
| 2396 TEST_F(WebRtcVideoChannel2Test, TestSetSendRtcpReducedSize) { |
| 2397 // Create stream, expecting that default mode is "compound". |
| 2398 FakeVideoSendStream* stream1 = AddSendStream(); |
| 2399 EXPECT_EQ(webrtc::RtcpMode::kCompound, stream1->GetConfig().rtp.rtcp_mode); |
| 2400 |
| 2401 // Now enable reduced size mode. |
| 2402 send_parameters_.rtcp.reduced_size = true; |
| 2403 EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); |
| 2404 stream1 = fake_call_->GetVideoSendStreams()[0]; |
| 2405 EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream1->GetConfig().rtp.rtcp_mode); |
| 2406 |
| 2407 // Create a new stream and ensure it picks up the reduced size mode. |
| 2408 FakeVideoSendStream* stream2 = AddSendStream(); |
| 2409 EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream2->GetConfig().rtp.rtcp_mode); |
| 2410 } |
| 2411 |
| 2412 // This test verifies that the RTCP reduced size mode is properly applied to |
| 2413 // receive video streams. |
| 2414 TEST_F(WebRtcVideoChannel2Test, TestSetRecvRtcpReducedSize) { |
| 2415 // Create stream, expecting that default mode is "compound". |
| 2416 FakeVideoReceiveStream* stream1 = AddRecvStream(); |
| 2417 EXPECT_EQ(webrtc::RtcpMode::kCompound, stream1->GetConfig().rtp.rtcp_mode); |
| 2418 |
| 2419 // Now enable reduced size mode. |
| 2420 recv_parameters_.rtcp.reduced_size = true; |
| 2421 EXPECT_TRUE(channel_->SetRecvParameters(recv_parameters_)); |
| 2422 stream1 = fake_call_->GetVideoReceiveStreams()[0]; |
| 2423 EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream1->GetConfig().rtp.rtcp_mode); |
| 2424 |
| 2425 // Create a new stream and ensure it picks up the reduced size mode. |
| 2426 FakeVideoReceiveStream* stream2 = AddRecvStream(); |
| 2427 EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream2->GetConfig().rtp.rtcp_mode); |
| 2428 } |
| 2429 |
2394 TEST_F(WebRtcVideoChannel2Test, OnReadyToSendSignalsNetworkState) { | 2430 TEST_F(WebRtcVideoChannel2Test, OnReadyToSendSignalsNetworkState) { |
2395 EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); | 2431 EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); |
2396 | 2432 |
2397 channel_->OnReadyToSend(false); | 2433 channel_->OnReadyToSend(false); |
2398 EXPECT_EQ(webrtc::kNetworkDown, fake_call_->GetNetworkState()); | 2434 EXPECT_EQ(webrtc::kNetworkDown, fake_call_->GetNetworkState()); |
2399 | 2435 |
2400 channel_->OnReadyToSend(true); | 2436 channel_->OnReadyToSend(true); |
2401 EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); | 2437 EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); |
2402 } | 2438 } |
2403 | 2439 |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3274 // Ensures that the correct settings are applied to the codec when two temporal | 3310 // Ensures that the correct settings are applied to the codec when two temporal |
3275 // layer screencasting is enabled, and that the correct simulcast settings are | 3311 // layer screencasting is enabled, and that the correct simulcast settings are |
3276 // reapplied when disabling screencasting. | 3312 // reapplied when disabling screencasting. |
3277 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3313 TEST_F(WebRtcVideoChannel2SimulcastTest, |
3278 DISABLED_TwoTemporalLayerScreencastSettings) { | 3314 DISABLED_TwoTemporalLayerScreencastSettings) { |
3279 // TODO(pbos): Implement. | 3315 // TODO(pbos): Implement. |
3280 FAIL() << "Not implemented."; | 3316 FAIL() << "Not implemented."; |
3281 } | 3317 } |
3282 | 3318 |
3283 } // namespace cricket | 3319 } // namespace cricket |
OLD | NEW |