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(WebRtcVideoEngine2Test, 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 |
276 TEST_F(WebRtcVideoEngine2Test, CVOSetHeaderExtensionBeforeAddSendStream) { | 299 TEST_F(WebRtcVideoEngine2Test, CVOSetHeaderExtensionBeforeAddSendStream) { |
277 // Allocate the capturer first to prevent early destruction before channel's | 300 // Allocate the capturer first to prevent early destruction before channel's |
278 // dtor is called. | 301 // dtor is called. |
279 cricket::FakeVideoCapturer capturer; | 302 cricket::FakeVideoCapturer capturer; |
280 | 303 |
281 cricket::FakeWebRtcVideoEncoderFactory encoder_factory; | 304 cricket::FakeWebRtcVideoEncoderFactory encoder_factory; |
282 encoder_factory.AddSupportedVideoCodecType("VP8"); | 305 encoder_factory.AddSupportedVideoCodecType("VP8"); |
283 | 306 |
284 std::unique_ptr<VideoMediaChannel> channel( | 307 std::unique_ptr<VideoMediaChannel> channel( |
285 SetUpForExternalEncoderFactory(&encoder_factory)); | 308 SetUpForExternalEncoderFactory(&encoder_factory)); |
(...skipping 4105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4391 | 4414 |
4392 TEST_F(WebRtcVideoChannel2SimulcastTest, | 4415 TEST_F(WebRtcVideoChannel2SimulcastTest, |
4393 NoSimulcastScreenshareWithoutConference) { | 4416 NoSimulcastScreenshareWithoutConference) { |
4394 webrtc::test::ScopedFieldTrials override_field_trials_( | 4417 webrtc::test::ScopedFieldTrials override_field_trials_( |
4395 "WebRTC-SimulcastScreenshare/Enabled/"); | 4418 "WebRTC-SimulcastScreenshare/Enabled/"); |
4396 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, | 4419 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, |
4397 false); | 4420 false); |
4398 } | 4421 } |
4399 | 4422 |
4400 } // namespace cricket | 4423 } // namespace cricket |
OLD | NEW |