Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2_unittest.cc

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: No changes to const parameters. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 for (size_t i = 0; i < extensions.size(); ++i) { 251 for (size_t i = 0; i < extensions.size(); ++i) {
252 if (extensions[i].uri == kRtpAbsoluteSenderTimeHeaderExtension) { 252 if (extensions[i].uri == kRtpAbsoluteSenderTimeHeaderExtension) {
253 EXPECT_EQ(kRtpAbsoluteSenderTimeHeaderExtensionDefaultId, 253 EXPECT_EQ(kRtpAbsoluteSenderTimeHeaderExtensionDefaultId,
254 extensions[i].id); 254 extensions[i].id);
255 return; 255 return;
256 } 256 }
257 } 257 }
258 FAIL() << "Absolute Sender Time extension not in header-extension list."; 258 FAIL() << "Absolute Sender Time extension not in header-extension list.";
259 } 259 }
260 260
261 TEST_F(WebRtcVideoEngine2Test, SupportsTransportSequenceNumberHeaderExtension) {
262 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions();
263 ASSERT_FALSE(extensions.empty());
264 for (size_t i = 0; i < extensions.size(); ++i) {
265 if (extensions[i].uri == kRtpTransportSequenceNumberHeaderExtension) {
266 EXPECT_EQ(kRtpTransportSequenceNumberHeaderExtensionDefaultId,
267 extensions[i].id);
268 return;
269 }
270 }
271 FAIL() << "Transport sequence number extension not in header-extension list.";
272 }
273
261 TEST_F(WebRtcVideoEngine2Test, SupportsVideoRotationHeaderExtension) { 274 TEST_F(WebRtcVideoEngine2Test, SupportsVideoRotationHeaderExtension) {
262 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions(); 275 std::vector<RtpHeaderExtension> extensions = engine_.rtp_header_extensions();
263 ASSERT_FALSE(extensions.empty()); 276 ASSERT_FALSE(extensions.empty());
264 for (size_t i = 0; i < extensions.size(); ++i) { 277 for (size_t i = 0; i < extensions.size(); ++i) {
265 if (extensions[i].uri == kRtpVideoRotationHeaderExtension) { 278 if (extensions[i].uri == kRtpVideoRotationHeaderExtension) {
266 EXPECT_EQ(kRtpVideoRotationHeaderExtensionDefaultId, extensions[i].id); 279 EXPECT_EQ(kRtpVideoRotationHeaderExtensionDefaultId, extensions[i].id);
267 return; 280 return;
268 } 281 }
269 } 282 }
270 FAIL() << "Video Rotation extension not in header-extension list."; 283 FAIL() << "Video Rotation extension not in header-extension list.";
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 // Test support for absolute send time header extension. 1181 // Test support for absolute send time header extension.
1169 TEST_F(WebRtcVideoChannel2Test, SendAbsoluteSendTimeHeaderExtensions) { 1182 TEST_F(WebRtcVideoChannel2Test, SendAbsoluteSendTimeHeaderExtensions) {
1170 TestSetSendRtpHeaderExtensions(kRtpAbsoluteSenderTimeHeaderExtension, 1183 TestSetSendRtpHeaderExtensions(kRtpAbsoluteSenderTimeHeaderExtension,
1171 webrtc::RtpExtension::kAbsSendTime); 1184 webrtc::RtpExtension::kAbsSendTime);
1172 } 1185 }
1173 TEST_F(WebRtcVideoChannel2Test, RecvAbsoluteSendTimeHeaderExtensions) { 1186 TEST_F(WebRtcVideoChannel2Test, RecvAbsoluteSendTimeHeaderExtensions) {
1174 TestSetRecvRtpHeaderExtensions(kRtpAbsoluteSenderTimeHeaderExtension, 1187 TestSetRecvRtpHeaderExtensions(kRtpAbsoluteSenderTimeHeaderExtension,
1175 webrtc::RtpExtension::kAbsSendTime); 1188 webrtc::RtpExtension::kAbsSendTime);
1176 } 1189 }
1177 1190
1191 // Test support for transport sequence number header extension.
1192 TEST_F(WebRtcVideoChannel2Test, SendTransportSequenceNumberHeaderExtensions) {
1193 TestSetSendRtpHeaderExtensions(
1194 kRtpTransportSequenceNumberHeaderExtension,
1195 webrtc::RtpExtension::kTransportSequenceNumber);
1196 }
1197 TEST_F(WebRtcVideoChannel2Test, RecvTransportSequenceNumberHeaderExtensions) {
1198 TestSetRecvRtpHeaderExtensions(
1199 kRtpTransportSequenceNumberHeaderExtension,
1200 webrtc::RtpExtension::kTransportSequenceNumber);
1201 }
1202
1178 // Test support for video rotation header extension. 1203 // Test support for video rotation header extension.
1179 TEST_F(WebRtcVideoChannel2Test, SendVideoRotationHeaderExtensions) { 1204 TEST_F(WebRtcVideoChannel2Test, SendVideoRotationHeaderExtensions) {
1180 TestSetSendRtpHeaderExtensions(kRtpVideoRotationHeaderExtension, 1205 TestSetSendRtpHeaderExtensions(kRtpVideoRotationHeaderExtension,
1181 webrtc::RtpExtension::kVideoRotation); 1206 webrtc::RtpExtension::kVideoRotation);
1182 } 1207 }
1183 TEST_F(WebRtcVideoChannel2Test, RecvVideoRotationHeaderExtensions) { 1208 TEST_F(WebRtcVideoChannel2Test, RecvVideoRotationHeaderExtensions) {
1184 TestSetRecvRtpHeaderExtensions(kRtpVideoRotationHeaderExtension, 1209 TestSetRecvRtpHeaderExtensions(kRtpVideoRotationHeaderExtension,
1185 webrtc::RtpExtension::kVideoRotation); 1210 webrtc::RtpExtension::kVideoRotation);
1186 } 1211 }
1187 1212
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
3197 // Ensures that the correct settings are applied to the codec when two temporal 3222 // Ensures that the correct settings are applied to the codec when two temporal
3198 // layer screencasting is enabled, and that the correct simulcast settings are 3223 // layer screencasting is enabled, and that the correct simulcast settings are
3199 // reapplied when disabling screencasting. 3224 // reapplied when disabling screencasting.
3200 TEST_F(WebRtcVideoChannel2SimulcastTest, 3225 TEST_F(WebRtcVideoChannel2SimulcastTest,
3201 DISABLED_TwoTemporalLayerScreencastSettings) { 3226 DISABLED_TwoTemporalLayerScreencastSettings) {
3202 // TODO(pbos): Implement. 3227 // TODO(pbos): Implement.
3203 FAIL() << "Not implemented."; 3228 FAIL() << "Not implemented.";
3204 } 3229 }
3205 3230
3206 } // namespace cricket 3231 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698