| 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 std::vector<RtpHeaderExtension> extensions = |
| 246 engine_.SupportedRtpHeaderExtensions(); |
| 246 ASSERT_FALSE(extensions.empty()); | 247 ASSERT_FALSE(extensions.empty()); |
| 247 for (size_t i = 0; i < extensions.size(); ++i) { | 248 for (size_t i = 0; i < extensions.size(); ++i) { |
| 248 if (extensions[i].uri == kRtpTimestampOffsetHeaderExtension) { | 249 if (extensions[i].uri == kRtpTimestampOffsetHeaderExtension) { |
| 249 EXPECT_EQ(kRtpTimestampOffsetHeaderExtensionDefaultId, extensions[i].id); | 250 EXPECT_EQ(kRtpTimestampOffsetHeaderExtensionDefaultId, extensions[i].id); |
| 250 return; | 251 return; |
| 251 } | 252 } |
| 252 } | 253 } |
| 253 FAIL() << "Timestamp offset extension not in header-extension list."; | 254 FAIL() << "Timestamp offset extension not in header-extension list."; |
| 254 } | 255 } |
| 255 | 256 |
| 256 TEST_F(WebRtcVideoEngine2Test, SupportsAbsoluteSenderTimeHeaderExtension) { | 257 TEST_F(WebRtcVideoEngine2Test, SupportsAbsoluteSenderTimeHeaderExtension) { |
| 257 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions(); | 258 std::vector<RtpHeaderExtension> extensions = |
| 259 engine_.SupportedRtpHeaderExtensions(); |
| 258 ASSERT_FALSE(extensions.empty()); | 260 ASSERT_FALSE(extensions.empty()); |
| 259 for (size_t i = 0; i < extensions.size(); ++i) { | 261 for (size_t i = 0; i < extensions.size(); ++i) { |
| 260 if (extensions[i].uri == kRtpAbsoluteSenderTimeHeaderExtension) { | 262 if (extensions[i].uri == kRtpAbsoluteSenderTimeHeaderExtension) { |
| 261 EXPECT_EQ(kRtpAbsoluteSenderTimeHeaderExtensionDefaultId, | 263 EXPECT_EQ(kRtpAbsoluteSenderTimeHeaderExtensionDefaultId, |
| 262 extensions[i].id); | 264 extensions[i].id); |
| 263 return; | 265 return; |
| 264 } | 266 } |
| 265 } | 267 } |
| 266 FAIL() << "Absolute Sender Time extension not in header-extension list."; | 268 FAIL() << "Absolute Sender Time extension not in header-extension list."; |
| 267 } | 269 } |
| 268 | 270 |
| 269 class WebRtcVideoEngine2WithSendSideBweTest : public WebRtcVideoEngine2Test { | 271 class WebRtcVideoEngine2WithSendSideBweTest : public WebRtcVideoEngine2Test { |
| 270 public: | 272 public: |
| 271 WebRtcVideoEngine2WithSendSideBweTest() | 273 WebRtcVideoEngine2WithSendSideBweTest() |
| 272 : WebRtcVideoEngine2Test("WebRTC-SendSideBwe/Enabled/") {} | 274 : WebRtcVideoEngine2Test("WebRTC-SendSideBwe/Enabled/") {} |
| 273 }; | 275 }; |
| 274 | 276 |
| 275 TEST_F(WebRtcVideoEngine2WithSendSideBweTest, | 277 TEST_F(WebRtcVideoEngine2WithSendSideBweTest, |
| 276 SupportsTransportSequenceNumberHeaderExtension) { | 278 SupportsTransportSequenceNumberHeaderExtension) { |
| 277 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions(); | 279 std::vector<RtpHeaderExtension> extensions = |
| 280 engine_.SupportedRtpHeaderExtensions(); |
| 278 ASSERT_FALSE(extensions.empty()); | 281 ASSERT_FALSE(extensions.empty()); |
| 279 for (size_t i = 0; i < extensions.size(); ++i) { | 282 for (size_t i = 0; i < extensions.size(); ++i) { |
| 280 if (extensions[i].uri == kRtpTransportSequenceNumberHeaderExtension) { | 283 if (extensions[i].uri == kRtpTransportSequenceNumberHeaderExtension) { |
| 281 EXPECT_EQ(kRtpTransportSequenceNumberHeaderExtensionDefaultId, | 284 EXPECT_EQ(kRtpTransportSequenceNumberHeaderExtensionDefaultId, |
| 282 extensions[i].id); | 285 extensions[i].id); |
| 283 return; | 286 return; |
| 284 } | 287 } |
| 285 } | 288 } |
| 286 FAIL() << "Transport sequence number extension not in header-extension list."; | 289 FAIL() << "Transport sequence number extension not in header-extension list."; |
| 287 } | 290 } |
| 288 | 291 |
| 289 TEST_F(WebRtcVideoEngine2Test, SupportsVideoRotationHeaderExtension) { | 292 TEST_F(WebRtcVideoEngine2Test, SupportsVideoRotationHeaderExtension) { |
| 290 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions(); | 293 std::vector<RtpHeaderExtension> extensions = |
| 294 engine_.SupportedRtpHeaderExtensions(); |
| 291 ASSERT_FALSE(extensions.empty()); | 295 ASSERT_FALSE(extensions.empty()); |
| 292 for (size_t i = 0; i < extensions.size(); ++i) { | 296 for (size_t i = 0; i < extensions.size(); ++i) { |
| 293 if (extensions[i].uri == kRtpVideoRotationHeaderExtension) { | 297 if (extensions[i].uri == kRtpVideoRotationHeaderExtension) { |
| 294 EXPECT_EQ(kRtpVideoRotationHeaderExtensionDefaultId, extensions[i].id); | 298 EXPECT_EQ(kRtpVideoRotationHeaderExtensionDefaultId, extensions[i].id); |
| 295 return; | 299 return; |
| 296 } | 300 } |
| 297 } | 301 } |
| 298 FAIL() << "Video Rotation extension not in header-extension list."; | 302 FAIL() << "Video Rotation extension not in header-extension list."; |
| 299 } | 303 } |
| 300 | 304 |
| (...skipping 3001 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 | 3306 // 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 | 3307 // layer screencasting is enabled, and that the correct simulcast settings are |
| 3304 // reapplied when disabling screencasting. | 3308 // reapplied when disabling screencasting. |
| 3305 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3309 TEST_F(WebRtcVideoChannel2SimulcastTest, |
| 3306 DISABLED_TwoTemporalLayerScreencastSettings) { | 3310 DISABLED_TwoTemporalLayerScreencastSettings) { |
| 3307 // TODO(pbos): Implement. | 3311 // TODO(pbos): Implement. |
| 3308 FAIL() << "Not implemented."; | 3312 FAIL() << "Not implemented."; |
| 3309 } | 3313 } |
| 3310 | 3314 |
| 3311 } // namespace cricket | 3315 } // namespace cricket |
| OLD | NEW |