| 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 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2336   // Verify previous value is not modified if dscp option is not set. | 2336   // Verify previous value is not modified if dscp option is not set. | 
| 2337   cricket::VideoSendParameters parameters1 = send_parameters_; | 2337   cricket::VideoSendParameters parameters1 = send_parameters_; | 
| 2338   EXPECT_TRUE(channel_->SetSendParameters(parameters1)); | 2338   EXPECT_TRUE(channel_->SetSendParameters(parameters1)); | 
| 2339   EXPECT_EQ(rtc::DSCP_AF41, network_interface->dscp()); | 2339   EXPECT_EQ(rtc::DSCP_AF41, network_interface->dscp()); | 
| 2340   parameters1.options.dscp.Set(false); | 2340   parameters1.options.dscp.Set(false); | 
| 2341   EXPECT_TRUE(channel_->SetSendParameters(parameters1)); | 2341   EXPECT_TRUE(channel_->SetSendParameters(parameters1)); | 
| 2342   EXPECT_EQ(rtc::DSCP_DEFAULT, network_interface->dscp()); | 2342   EXPECT_EQ(rtc::DSCP_DEFAULT, network_interface->dscp()); | 
| 2343   channel_->SetInterface(NULL); | 2343   channel_->SetInterface(NULL); | 
| 2344 } | 2344 } | 
| 2345 | 2345 | 
|  | 2346 // This test verifies that the RTCP reduced size mode is properly applied to | 
|  | 2347 // send video streams. | 
|  | 2348 TEST_F(WebRtcVideoChannel2Test, TestSetSendRtcpReducedSize) { | 
|  | 2349   // Create stream, expecting that default mode is "compound". | 
|  | 2350   FakeVideoSendStream* stream1 = AddSendStream(); | 
|  | 2351   EXPECT_EQ(webrtc::RtcpMode::kCompound, stream1->GetConfig().rtp.rtcp_mode); | 
|  | 2352 | 
|  | 2353   // Now enable reduced size mode. | 
|  | 2354   send_parameters_.rtcp.reduced_size = true; | 
|  | 2355   EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); | 
|  | 2356   stream1 = fake_call_->GetVideoSendStreams()[0]; | 
|  | 2357   EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream1->GetConfig().rtp.rtcp_mode); | 
|  | 2358 | 
|  | 2359   // Create a new stream and ensure it picks up the reduced size mode. | 
|  | 2360   FakeVideoSendStream* stream2 = AddSendStream(); | 
|  | 2361   EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream2->GetConfig().rtp.rtcp_mode); | 
|  | 2362 } | 
|  | 2363 | 
|  | 2364 // This test verifies that the RTCP reduced size mode is properly applied to | 
|  | 2365 // receive video streams. | 
|  | 2366 TEST_F(WebRtcVideoChannel2Test, TestSetRecvRtcpReducedSize) { | 
|  | 2367   // Create stream, expecting that default mode is "compound". | 
|  | 2368   FakeVideoReceiveStream* stream1 = AddRecvStream(); | 
|  | 2369   EXPECT_EQ(webrtc::RtcpMode::kCompound, stream1->GetConfig().rtp.rtcp_mode); | 
|  | 2370 | 
|  | 2371   // Now enable reduced size mode. | 
|  | 2372   recv_parameters_.rtcp.reduced_size = true; | 
|  | 2373   EXPECT_TRUE(channel_->SetRecvParameters(recv_parameters_)); | 
|  | 2374   stream1 = fake_call_->GetVideoReceiveStreams()[0]; | 
|  | 2375   EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream1->GetConfig().rtp.rtcp_mode); | 
|  | 2376 | 
|  | 2377   // Create a new stream and ensure it picks up the reduced size mode. | 
|  | 2378   FakeVideoReceiveStream* stream2 = AddRecvStream(); | 
|  | 2379   EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream2->GetConfig().rtp.rtcp_mode); | 
|  | 2380 } | 
|  | 2381 | 
| 2346 TEST_F(WebRtcVideoChannel2Test, OnReadyToSendSignalsNetworkState) { | 2382 TEST_F(WebRtcVideoChannel2Test, OnReadyToSendSignalsNetworkState) { | 
| 2347   EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); | 2383   EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); | 
| 2348 | 2384 | 
| 2349   channel_->OnReadyToSend(false); | 2385   channel_->OnReadyToSend(false); | 
| 2350   EXPECT_EQ(webrtc::kNetworkDown, fake_call_->GetNetworkState()); | 2386   EXPECT_EQ(webrtc::kNetworkDown, fake_call_->GetNetworkState()); | 
| 2351 | 2387 | 
| 2352   channel_->OnReadyToSend(true); | 2388   channel_->OnReadyToSend(true); | 
| 2353   EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); | 2389   EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); | 
| 2354 } | 2390 } | 
| 2355 | 2391 | 
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3226 // Ensures that the correct settings are applied to the codec when two temporal | 3262 // Ensures that the correct settings are applied to the codec when two temporal | 
| 3227 // layer screencasting is enabled, and that the correct simulcast settings are | 3263 // layer screencasting is enabled, and that the correct simulcast settings are | 
| 3228 // reapplied when disabling screencasting. | 3264 // reapplied when disabling screencasting. | 
| 3229 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3265 TEST_F(WebRtcVideoChannel2SimulcastTest, | 
| 3230        DISABLED_TwoTemporalLayerScreencastSettings) { | 3266        DISABLED_TwoTemporalLayerScreencastSettings) { | 
| 3231   // TODO(pbos): Implement. | 3267   // TODO(pbos): Implement. | 
| 3232   FAIL() << "Not implemented."; | 3268   FAIL() << "Not implemented."; | 
| 3233 } | 3269 } | 
| 3234 | 3270 | 
| 3235 }  // namespace cricket | 3271 }  // namespace cricket | 
| OLD | NEW | 
|---|