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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 int associated_payload_type; | 235 int associated_payload_type; |
236 EXPECT_TRUE(engine_codecs[i].GetParam(kCodecParamAssociatedPayloadType, | 236 EXPECT_TRUE(engine_codecs[i].GetParam(kCodecParamAssociatedPayloadType, |
237 &associated_payload_type)); | 237 &associated_payload_type)); |
238 EXPECT_EQ(default_codec_.id, associated_payload_type); | 238 EXPECT_EQ(default_codec_.id, associated_payload_type); |
239 return; | 239 return; |
240 } | 240 } |
241 FAIL() << "No RTX codec found among default codecs."; | 241 FAIL() << "No RTX codec found among default codecs."; |
242 } | 242 } |
243 | 243 |
244 TEST_F(WebRtcVideoEngine2Test, SupportsTimestampOffsetHeaderExtension) { | 244 TEST_F(WebRtcVideoEngine2Test, SupportsTimestampOffsetHeaderExtension) { |
245 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions(); | 245 RtpCapabilities capabilities = engine_.GetCapabilities(); |
246 ASSERT_FALSE(extensions.empty()); | 246 ASSERT_FALSE(capabilities.header_extensions.empty()); |
247 for (size_t i = 0; i < extensions.size(); ++i) { | 247 for (const RtpHeaderExtension& extension : capabilities.header_extensions) { |
248 if (extensions[i].uri == kRtpTimestampOffsetHeaderExtension) { | 248 if (extension.uri == kRtpTimestampOffsetHeaderExtension) { |
249 EXPECT_EQ(kRtpTimestampOffsetHeaderExtensionDefaultId, extensions[i].id); | 249 EXPECT_EQ(kRtpTimestampOffsetHeaderExtensionDefaultId, extension.id); |
250 return; | 250 return; |
251 } | 251 } |
252 } | 252 } |
253 FAIL() << "Timestamp offset extension not in header-extension list."; | 253 FAIL() << "Timestamp offset extension not in header-extension list."; |
254 } | 254 } |
255 | 255 |
256 TEST_F(WebRtcVideoEngine2Test, SupportsAbsoluteSenderTimeHeaderExtension) { | 256 TEST_F(WebRtcVideoEngine2Test, SupportsAbsoluteSenderTimeHeaderExtension) { |
257 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions(); | 257 RtpCapabilities capabilities = engine_.GetCapabilities(); |
258 ASSERT_FALSE(extensions.empty()); | 258 ASSERT_FALSE(capabilities.header_extensions.empty()); |
259 for (size_t i = 0; i < extensions.size(); ++i) { | 259 for (const RtpHeaderExtension& extension : capabilities.header_extensions) { |
260 if (extensions[i].uri == kRtpAbsoluteSenderTimeHeaderExtension) { | 260 if (extension.uri == kRtpAbsoluteSenderTimeHeaderExtension) { |
261 EXPECT_EQ(kRtpAbsoluteSenderTimeHeaderExtensionDefaultId, | 261 EXPECT_EQ(kRtpAbsoluteSenderTimeHeaderExtensionDefaultId, extension.id); |
262 extensions[i].id); | |
263 return; | 262 return; |
264 } | 263 } |
265 } | 264 } |
266 FAIL() << "Absolute Sender Time extension not in header-extension list."; | 265 FAIL() << "Absolute Sender Time extension not in header-extension list."; |
267 } | 266 } |
268 | 267 |
269 class WebRtcVideoEngine2WithSendSideBweTest : public WebRtcVideoEngine2Test { | 268 class WebRtcVideoEngine2WithSendSideBweTest : public WebRtcVideoEngine2Test { |
270 public: | 269 public: |
271 WebRtcVideoEngine2WithSendSideBweTest() | 270 WebRtcVideoEngine2WithSendSideBweTest() |
272 : WebRtcVideoEngine2Test("WebRTC-SendSideBwe/Enabled/") {} | 271 : WebRtcVideoEngine2Test("WebRTC-SendSideBwe/Enabled/") {} |
273 }; | 272 }; |
274 | 273 |
275 TEST_F(WebRtcVideoEngine2WithSendSideBweTest, | 274 TEST_F(WebRtcVideoEngine2WithSendSideBweTest, |
276 SupportsTransportSequenceNumberHeaderExtension) { | 275 SupportsTransportSequenceNumberHeaderExtension) { |
277 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions(); | 276 RtpCapabilities capabilities = engine_.GetCapabilities(); |
278 ASSERT_FALSE(extensions.empty()); | 277 ASSERT_FALSE(capabilities.header_extensions.empty()); |
279 for (size_t i = 0; i < extensions.size(); ++i) { | 278 for (const RtpHeaderExtension& extension : capabilities.header_extensions) { |
280 if (extensions[i].uri == kRtpTransportSequenceNumberHeaderExtension) { | 279 if (extension.uri == kRtpTransportSequenceNumberHeaderExtension) { |
281 EXPECT_EQ(kRtpTransportSequenceNumberHeaderExtensionDefaultId, | 280 EXPECT_EQ(kRtpTransportSequenceNumberHeaderExtensionDefaultId, |
282 extensions[i].id); | 281 extension.id); |
283 return; | 282 return; |
284 } | 283 } |
285 } | 284 } |
286 FAIL() << "Transport sequence number extension not in header-extension list."; | 285 FAIL() << "Transport sequence number extension not in header-extension list."; |
287 } | 286 } |
288 | 287 |
289 TEST_F(WebRtcVideoEngine2Test, SupportsVideoRotationHeaderExtension) { | 288 TEST_F(WebRtcVideoEngine2Test, SupportsVideoRotationHeaderExtension) { |
290 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions(); | 289 RtpCapabilities capabilities = engine_.GetCapabilities(); |
291 ASSERT_FALSE(extensions.empty()); | 290 ASSERT_FALSE(capabilities.header_extensions.empty()); |
292 for (size_t i = 0; i < extensions.size(); ++i) { | 291 for (const RtpHeaderExtension& extension : capabilities.header_extensions) { |
293 if (extensions[i].uri == kRtpVideoRotationHeaderExtension) { | 292 if (extension.uri == kRtpVideoRotationHeaderExtension) { |
294 EXPECT_EQ(kRtpVideoRotationHeaderExtensionDefaultId, extensions[i].id); | 293 EXPECT_EQ(kRtpVideoRotationHeaderExtensionDefaultId, extension.id); |
295 return; | 294 return; |
296 } | 295 } |
297 } | 296 } |
298 FAIL() << "Video Rotation extension not in header-extension list."; | 297 FAIL() << "Video Rotation extension not in header-extension list."; |
299 } | 298 } |
300 | 299 |
301 TEST_F(WebRtcVideoEngine2Test, CVOSetHeaderExtensionBeforeCapturer) { | 300 TEST_F(WebRtcVideoEngine2Test, CVOSetHeaderExtensionBeforeCapturer) { |
302 // Allocate the capturer first to prevent early destruction before channel's | 301 // Allocate the capturer first to prevent early destruction before channel's |
303 // dtor is called. | 302 // dtor is called. |
304 cricket::FakeVideoCapturer capturer; | 303 cricket::FakeVideoCapturer capturer; |
(...skipping 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3302 // Ensures that the correct settings are applied to the codec when two temporal | 3301 // Ensures that the correct settings are applied to the codec when two temporal |
3303 // layer screencasting is enabled, and that the correct simulcast settings are | 3302 // layer screencasting is enabled, and that the correct simulcast settings are |
3304 // reapplied when disabling screencasting. | 3303 // reapplied when disabling screencasting. |
3305 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3304 TEST_F(WebRtcVideoChannel2SimulcastTest, |
3306 DISABLED_TwoTemporalLayerScreencastSettings) { | 3305 DISABLED_TwoTemporalLayerScreencastSettings) { |
3307 // TODO(pbos): Implement. | 3306 // TODO(pbos): Implement. |
3308 FAIL() << "Not implemented."; | 3307 FAIL() << "Not implemented."; |
3309 } | 3308 } |
3310 | 3309 |
3311 } // namespace cricket | 3310 } // namespace cricket |
OLD | NEW |