| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 // Verify capturer has turned off applying rotation. | 267 // Verify capturer has turned off applying rotation. |
| 268 EXPECT_FALSE(capturer.apply_rotation()); | 268 EXPECT_FALSE(capturer.apply_rotation()); |
| 269 | 269 |
| 270 // Verify removing header extension turns on applying rotation. | 270 // Verify removing header extension turns on applying rotation. |
| 271 parameters.extensions.clear(); | 271 parameters.extensions.clear(); |
| 272 EXPECT_TRUE(channel->SetSendParameters(parameters)); | 272 EXPECT_TRUE(channel->SetSendParameters(parameters)); |
| 273 EXPECT_TRUE(capturer.apply_rotation()); | 273 EXPECT_TRUE(capturer.apply_rotation()); |
| 274 } | 274 } |
| 275 | 275 |
| 276 | |
| 277 // TODO(ilnik): Remove this test once field trial is gone. | |
| 278 TEST_F(WebRtcVideoEngineTest, SupportsVideoContentTypeHeaderExtension) { | |
| 279 // Extension shound not be reported outside of the field trial. | |
| 280 RtpCapabilities capabilities = engine_.GetCapabilities(); | |
| 281 EXPECT_FALSE(capabilities.header_extensions.empty()); | |
| 282 for (const RtpExtension& extension : capabilities.header_extensions) { | |
| 283 EXPECT_NE(extension.uri, RtpExtension::kVideoContentTypeUri); | |
| 284 } | |
| 285 webrtc::test::ScopedFieldTrials override_field_trials_( | |
| 286 "WebRTC-VideoContentTypeExtension/Enabled/"); | |
| 287 // Should be reported within field trial. | |
| 288 capabilities = engine_.GetCapabilities(); | |
| 289 EXPECT_FALSE(capabilities.header_extensions.empty()); | |
| 290 for (const RtpExtension& extension : capabilities.header_extensions) { | |
| 291 if (extension.uri == RtpExtension::kVideoContentTypeUri) { | |
| 292 EXPECT_EQ(RtpExtension::kVideoContentTypeDefaultId, extension.id); | |
| 293 return; | |
| 294 } | |
| 295 } | |
| 296 FAIL() << "Video Content Type extension not in header-extension list."; | |
| 297 } | |
| 298 | |
| 299 TEST_F(WebRtcVideoEngineTest, CVOSetHeaderExtensionBeforeAddSendStream) { | 276 TEST_F(WebRtcVideoEngineTest, CVOSetHeaderExtensionBeforeAddSendStream) { |
| 300 // Allocate the capturer first to prevent early destruction before channel's | 277 // Allocate the capturer first to prevent early destruction before channel's |
| 301 // dtor is called. | 278 // dtor is called. |
| 302 cricket::FakeVideoCapturer capturer; | 279 cricket::FakeVideoCapturer capturer; |
| 303 | 280 |
| 304 cricket::FakeWebRtcVideoEncoderFactory encoder_factory; | 281 cricket::FakeWebRtcVideoEncoderFactory encoder_factory; |
| 305 encoder_factory.AddSupportedVideoCodecType("VP8"); | 282 encoder_factory.AddSupportedVideoCodecType("VP8"); |
| 306 | 283 |
| 307 std::unique_ptr<VideoMediaChannel> channel( | 284 std::unique_ptr<VideoMediaChannel> channel( |
| 308 SetUpForExternalEncoderFactory(&encoder_factory)); | 285 SetUpForExternalEncoderFactory(&encoder_factory)); |
| (...skipping 4372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4681 | 4658 |
| 4682 TEST_F(WebRtcVideoChannelSimulcastTest, | 4659 TEST_F(WebRtcVideoChannelSimulcastTest, |
| 4683 NoSimulcastScreenshareWithoutConference) { | 4660 NoSimulcastScreenshareWithoutConference) { |
| 4684 webrtc::test::ScopedFieldTrials override_field_trials_( | 4661 webrtc::test::ScopedFieldTrials override_field_trials_( |
| 4685 "WebRTC-SimulcastScreenshare/Enabled/"); | 4662 "WebRTC-SimulcastScreenshare/Enabled/"); |
| 4686 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, | 4663 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, |
| 4687 false); | 4664 false); |
| 4688 } | 4665 } |
| 4689 | 4666 |
| 4690 } // namespace cricket | 4667 } // namespace cricket |
| OLD | NEW |