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 TEST_F(WebRtcVideoEngine2Test, SupportsVideoContentTypeHeaderExtension) { |
| 277 RtpCapabilities capabilities = engine_.GetCapabilities(); |
| 278 ASSERT_FALSE(capabilities.header_extensions.empty()); |
| 279 for (const RtpExtension& extension : capabilities.header_extensions) { |
| 280 if (extension.uri == RtpExtension::kVideoContentTypeUri) { |
| 281 EXPECT_EQ(RtpExtension::kVideoContentTypeDefaultId, extension.id); |
| 282 return; |
| 283 } |
| 284 } |
| 285 FAIL() << "Video Content Type extension not in header-extension list."; |
| 286 } |
| 287 |
276 TEST_F(WebRtcVideoEngine2Test, CVOSetHeaderExtensionBeforeAddSendStream) { | 288 TEST_F(WebRtcVideoEngine2Test, CVOSetHeaderExtensionBeforeAddSendStream) { |
277 // Allocate the capturer first to prevent early destruction before channel's | 289 // Allocate the capturer first to prevent early destruction before channel's |
278 // dtor is called. | 290 // dtor is called. |
279 cricket::FakeVideoCapturer capturer; | 291 cricket::FakeVideoCapturer capturer; |
280 | 292 |
281 cricket::FakeWebRtcVideoEncoderFactory encoder_factory; | 293 cricket::FakeWebRtcVideoEncoderFactory encoder_factory; |
282 encoder_factory.AddSupportedVideoCodecType("VP8"); | 294 encoder_factory.AddSupportedVideoCodecType("VP8"); |
283 | 295 |
284 std::unique_ptr<VideoMediaChannel> channel( | 296 std::unique_ptr<VideoMediaChannel> channel( |
285 SetUpForExternalEncoderFactory(&encoder_factory)); | 297 SetUpForExternalEncoderFactory(&encoder_factory)); |
(...skipping 4105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4391 | 4403 |
4392 TEST_F(WebRtcVideoChannel2SimulcastTest, | 4404 TEST_F(WebRtcVideoChannel2SimulcastTest, |
4393 NoSimulcastScreenshareWithoutConference) { | 4405 NoSimulcastScreenshareWithoutConference) { |
4394 webrtc::test::ScopedFieldTrials override_field_trials_( | 4406 webrtc::test::ScopedFieldTrials override_field_trials_( |
4395 "WebRTC-SimulcastScreenshare/Enabled/"); | 4407 "WebRTC-SimulcastScreenshare/Enabled/"); |
4396 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, | 4408 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, |
4397 false); | 4409 false); |
4398 } | 4410 } |
4399 | 4411 |
4400 } // namespace cricket | 4412 } // namespace cricket |
OLD | NEW |