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

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

Issue 2300003002: Enable send-side BWE by default. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nit addressed. Created 4 years, 3 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 * 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 ASSERT_FALSE(capabilities.header_extensions.empty()); 193 ASSERT_FALSE(capabilities.header_extensions.empty());
194 for (const RtpExtension& extension : capabilities.header_extensions) { 194 for (const RtpExtension& extension : capabilities.header_extensions) {
195 if (extension.uri == RtpExtension::kAbsSendTimeUri) { 195 if (extension.uri == RtpExtension::kAbsSendTimeUri) {
196 EXPECT_EQ(RtpExtension::kAbsSendTimeDefaultId, extension.id); 196 EXPECT_EQ(RtpExtension::kAbsSendTimeDefaultId, extension.id);
197 return; 197 return;
198 } 198 }
199 } 199 }
200 FAIL() << "Absolute Sender Time extension not in header-extension list."; 200 FAIL() << "Absolute Sender Time extension not in header-extension list.";
201 } 201 }
202 202
203 class WebRtcVideoEngine2WithSendSideBweTest : public WebRtcVideoEngine2Test { 203 TEST_F(WebRtcVideoEngine2Test, SupportsTransportSequenceNumberHeaderExtension) {
204 public:
205 WebRtcVideoEngine2WithSendSideBweTest()
206 : WebRtcVideoEngine2Test("WebRTC-SendSideBwe/Enabled/") {}
207 };
208
209 TEST_F(WebRtcVideoEngine2WithSendSideBweTest,
210 SupportsTransportSequenceNumberHeaderExtension) {
211 RtpCapabilities capabilities = engine_.GetCapabilities(); 204 RtpCapabilities capabilities = engine_.GetCapabilities();
212 ASSERT_FALSE(capabilities.header_extensions.empty()); 205 ASSERT_FALSE(capabilities.header_extensions.empty());
213 for (const RtpExtension& extension : capabilities.header_extensions) { 206 for (const RtpExtension& extension : capabilities.header_extensions) {
214 if (extension.uri == RtpExtension::kTransportSequenceNumberUri) { 207 if (extension.uri == RtpExtension::kTransportSequenceNumberUri) {
215 EXPECT_EQ(RtpExtension::kTransportSequenceNumberDefaultId, extension.id); 208 EXPECT_EQ(RtpExtension::kTransportSequenceNumberDefaultId, extension.id);
216 return; 209 return;
217 } 210 }
218 } 211 }
219 FAIL() << "Transport sequence number extension not in header-extension list."; 212 FAIL() << "Transport sequence number extension not in header-extension list.";
220 } 213 }
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 } 1279 }
1287 1280
1288 TEST_F(WebRtcVideoChannel2Test, FiltersExtensionsPicksAbsSendTime) { 1281 TEST_F(WebRtcVideoChannel2Test, FiltersExtensionsPicksAbsSendTime) {
1289 // Enable two redundant extensions. 1282 // Enable two redundant extensions.
1290 std::vector<std::string> extensions; 1283 std::vector<std::string> extensions;
1291 extensions.push_back(RtpExtension::kAbsSendTimeUri); 1284 extensions.push_back(RtpExtension::kAbsSendTimeUri);
1292 extensions.push_back(RtpExtension::kTimestampOffsetUri); 1285 extensions.push_back(RtpExtension::kTimestampOffsetUri);
1293 TestExtensionFilter(extensions, RtpExtension::kAbsSendTimeUri); 1286 TestExtensionFilter(extensions, RtpExtension::kAbsSendTimeUri);
1294 } 1287 }
1295 1288
1296 class WebRtcVideoChannel2WithSendSideBweTest : public WebRtcVideoChannel2Test {
1297 public:
1298 WebRtcVideoChannel2WithSendSideBweTest()
1299 : WebRtcVideoChannel2Test("WebRTC-SendSideBwe/Enabled/") {}
1300 };
1301
1302 // Test support for transport sequence number header extension. 1289 // Test support for transport sequence number header extension.
1303 TEST_F(WebRtcVideoChannel2WithSendSideBweTest, 1290 TEST_F(WebRtcVideoChannel2Test, SendTransportSequenceNumberHeaderExtensions) {
1304 SendTransportSequenceNumberHeaderExtensions) {
1305 TestSetSendRtpHeaderExtensions(RtpExtension::kTransportSequenceNumberUri); 1291 TestSetSendRtpHeaderExtensions(RtpExtension::kTransportSequenceNumberUri);
1306 } 1292 }
1307 TEST_F(WebRtcVideoChannel2WithSendSideBweTest, 1293 TEST_F(WebRtcVideoChannel2Test, RecvTransportSequenceNumberHeaderExtensions) {
1308 RecvTransportSequenceNumberHeaderExtensions) {
1309 TestSetRecvRtpHeaderExtensions(RtpExtension::kTransportSequenceNumberUri); 1294 TestSetRecvRtpHeaderExtensions(RtpExtension::kTransportSequenceNumberUri);
1310 } 1295 }
1311 1296
1312 // Test support for video rotation header extension. 1297 // Test support for video rotation header extension.
1313 TEST_F(WebRtcVideoChannel2Test, SendVideoRotationHeaderExtensions) { 1298 TEST_F(WebRtcVideoChannel2Test, SendVideoRotationHeaderExtensions) {
1314 TestSetSendRtpHeaderExtensions(RtpExtension::kVideoRotationUri); 1299 TestSetSendRtpHeaderExtensions(RtpExtension::kVideoRotationUri);
1315 } 1300 }
1316 TEST_F(WebRtcVideoChannel2Test, RecvVideoRotationHeaderExtensions) { 1301 TEST_F(WebRtcVideoChannel2Test, RecvVideoRotationHeaderExtensions) {
1317 TestSetRecvRtpHeaderExtensions(RtpExtension::kVideoRotationUri); 1302 TestSetRecvRtpHeaderExtensions(RtpExtension::kVideoRotationUri);
1318 } 1303 }
(...skipping 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3859 } 3844 }
3860 3845
3861 // Test that we normalize send codec format size in simulcast. 3846 // Test that we normalize send codec format size in simulcast.
3862 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3847 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
3863 cricket::VideoCodec codec(kVp8Codec270p); 3848 cricket::VideoCodec codec(kVp8Codec270p);
3864 codec.width += 1; 3849 codec.width += 1;
3865 codec.height += 1; 3850 codec.height += 1;
3866 VerifySimulcastSettings(codec, 2, 2); 3851 VerifySimulcastSettings(codec, 2, 2);
3867 } 3852 }
3868 } // namespace cricket 3853 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/sdk/objc/Framework/Classes/RTCFieldTrials.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698