OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <stdio.h> | 10 #include <stdio.h> |
11 | 11 |
12 #include "webrtc/modules/pacing/alr_detector.h" | |
12 #include "webrtc/test/field_trial.h" | 13 #include "webrtc/test/field_trial.h" |
13 #include "webrtc/test/gtest.h" | 14 #include "webrtc/test/gtest.h" |
14 #include "webrtc/video/video_quality_test.h" | 15 #include "webrtc/video/video_quality_test.h" |
15 | 16 |
16 namespace webrtc { | 17 namespace webrtc { |
17 | 18 |
19 namespace { | |
18 static const int kFullStackTestDurationSecs = 45; | 20 static const int kFullStackTestDurationSecs = 45; |
21 } // namespace | |
19 | 22 |
20 class FullStackTest : public VideoQualityTest { | 23 class FullStackTest : public VideoQualityTest { |
21 public: | 24 public: |
22 void RunTest(const VideoQualityTest::Params ¶ms) { | 25 void RunTest(const VideoQualityTest::Params ¶ms) { |
23 RunWithAnalyzer(params); | 26 RunWithAnalyzer(params); |
24 } | 27 } |
28 | |
29 protected: | |
30 const std::string kScreenshareSimulcastExperiment = | |
31 "WebRTC-SimulcastScreenshare/Enabled/"; | |
32 const std::string kAlrProbingExperiment = | |
33 std::string(AlrDetector::kScreenshareProbingBweExperimentName) + | |
34 "/1.1-2875-80-90/"; | |
stefan-webrtc
2017/06/29 17:43:47
You have a double-/ here:
std::string(AlrDetector
sprang_webrtc
2017/06/29 19:14:06
I don't think so, it's not kScreenshareSimulcastEx
stefan-webrtc
2017/06/29 20:07:20
My bad :)
| |
25 }; | 35 }; |
26 | 36 |
27 // VideoQualityTest::Params params = { | 37 // VideoQualityTest::Params params = { |
28 // { ... }, // Common. | 38 // { ... }, // Common. |
29 // { ... }, // Video-specific settings. | 39 // { ... }, // Video-specific settings. |
30 // { ... }, // Screenshare-specific settings. | 40 // { ... }, // Screenshare-specific settings. |
31 // { ... }, // Analyzer settings. | 41 // { ... }, // Analyzer settings. |
32 // pipe, // FakeNetworkPipe::Config | 42 // pipe, // FakeNetworkPipe::Config |
33 // { ... }, // Spatial scalability. | 43 // { ... }, // Spatial scalability. |
34 // logs // bool | 44 // logs // bool |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 screenshare.call.send_side_bwe = true; | 313 screenshare.call.send_side_bwe = true; |
304 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false, | 314 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false, |
305 "VP8", 2, 1, 400000, false, false, "", ""}; | 315 "VP8", 2, 1, 400000, false, false, "", ""}; |
306 screenshare.screenshare = {true, 10}; | 316 screenshare.screenshare = {true, 10}; |
307 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0, | 317 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0, |
308 kFullStackTestDurationSecs}; | 318 kFullStackTestDurationSecs}; |
309 RunTest(screenshare); | 319 RunTest(screenshare); |
310 } | 320 } |
311 | 321 |
312 TEST_F(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) { | 322 TEST_F(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) { |
313 test::ScopedFieldTrials field_trial("WebRTC-SimulcastScreenshare/Enabled/"); | 323 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment); |
314 VideoQualityTest::Params screenshare; | 324 VideoQualityTest::Params screenshare; |
315 screenshare.call.send_side_bwe = true; | 325 screenshare.call.send_side_bwe = true; |
316 screenshare.screenshare = {true, 10}; | 326 screenshare.screenshare = {true, 10}; |
317 screenshare.video = {true, 1850, 1110, 5, 800000, 2500000, | 327 screenshare.video = {true, 1850, 1110, 5, 800000, 2500000, |
318 2500000, false, "VP8", 3, 2, 400000, | 328 2500000, false, "VP8", 3, 2, 400000, |
319 false, false, "", ""}; | 329 false, false, "", ""}; |
320 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0, | 330 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0, |
321 kFullStackTestDurationSecs}; | 331 kFullStackTestDurationSecs}; |
322 VideoQualityTest::Params screenshare_params_high; | 332 VideoQualityTest::Params screenshare_params_high; |
323 screenshare_params_high.video = {true, 1850, 1110, 5, 800000, 2500000, | 333 screenshare_params_high.video = {true, 1850, 1110, 5, 800000, 2500000, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 screenshare.screenshare = {true, 10}; | 392 screenshare.screenshare = {true, 10}; |
383 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0, | 393 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0, |
384 kFullStackTestDurationSecs}; | 394 kFullStackTestDurationSecs}; |
385 screenshare.pipe.loss_percent = 5; | 395 screenshare.pipe.loss_percent = 5; |
386 screenshare.pipe.link_capacity_kbps = 200; | 396 screenshare.pipe.link_capacity_kbps = 200; |
387 screenshare.pipe.queue_length_packets = 30; | 397 screenshare.pipe.queue_length_packets = 30; |
388 | 398 |
389 RunTest(screenshare); | 399 RunTest(screenshare); |
390 } | 400 } |
391 | 401 |
402 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) { | |
403 VideoQualityTest::Params screenshare; | |
404 screenshare.call.send_side_bwe = true; | |
405 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false, | |
406 "VP8", 2, 1, 400000, false, false, "", ""}; | |
407 screenshare.screenshare = {true, 10}; | |
408 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0, | |
409 kFullStackTestDurationSecs}; | |
410 screenshare.pipe.loss_percent = 1; | |
411 screenshare.pipe.link_capacity_kbps = 1200; | |
412 screenshare.pipe.queue_length_packets = 30; | |
413 | |
414 RunTest(screenshare); | |
415 } | |
416 | |
417 // TODO(sprang): Retire these tests once experiment is removed. | |
418 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue_ALR) { | |
419 test::ScopedFieldTrials field_trial(kAlrProbingExperiment); | |
420 VideoQualityTest::Params screenshare; | |
421 screenshare.call.send_side_bwe = true; | |
422 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false, | |
423 "VP8", 2, 1, 400000, false, false, "", ""}; | |
424 screenshare.screenshare = {true, 10}; | |
425 screenshare.analyzer = {"screenshare_slides_lossy_limited_ALR", 0.0, 0.0, | |
426 kFullStackTestDurationSecs}; | |
427 screenshare.pipe.loss_percent = 5; | |
428 screenshare.pipe.link_capacity_kbps = 200; | |
429 screenshare.pipe.queue_length_packets = 30; | |
430 | |
431 RunTest(screenshare); | |
432 } | |
433 | |
434 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_ALR) { | |
435 test::ScopedFieldTrials field_trial(kAlrProbingExperiment); | |
436 VideoQualityTest::Params screenshare; | |
437 screenshare.call.send_side_bwe = true; | |
438 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false, | |
439 "VP8", 2, 1, 400000, false, false, "", ""}; | |
440 screenshare.screenshare = {true, 10}; | |
441 screenshare.analyzer = {"screenshare_slides_ALR", 0.0, 0.0, | |
442 kFullStackTestDurationSecs}; | |
443 RunTest(screenshare); | |
444 } | |
445 | |
446 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted_ALR) { | |
447 test::ScopedFieldTrials field_trial(kAlrProbingExperiment); | |
448 VideoQualityTest::Params screenshare; | |
449 screenshare.call.send_side_bwe = true; | |
450 screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false, | |
451 "VP8", 2, 1, 400000, false, false, "", ""}; | |
452 screenshare.screenshare = {true, 10}; | |
453 screenshare.analyzer = {"screenshare_slides_moderately_restricted_ALR", 0.0, | |
454 0.0, kFullStackTestDurationSecs}; | |
455 screenshare.pipe.loss_percent = 1; | |
456 screenshare.pipe.link_capacity_kbps = 1200; | |
457 screenshare.pipe.queue_length_packets = 30; | |
458 | |
459 RunTest(screenshare); | |
460 } | |
461 | |
462 TEST_F(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast_ALR) { | |
463 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment + | |
464 kAlrProbingExperiment); | |
465 VideoQualityTest::Params screenshare; | |
466 screenshare.call.send_side_bwe = true; | |
467 screenshare.screenshare = {true, 10}; | |
468 screenshare.video = {true, 1850, 1110, 5, 800000, 2500000, | |
469 2500000, false, "VP8", 3, 2, 400000, | |
470 false, false, "", ""}; | |
471 screenshare.analyzer = {"screenshare_slides_simulcast_alr", 0.0, 0.0, | |
472 kFullStackTestDurationSecs}; | |
473 VideoQualityTest::Params screenshare_params_high; | |
474 screenshare_params_high.video = {true, 1850, 1110, 5, 800000, 2500000, | |
475 2500000, false, "VP8", 3, 0, 400000, | |
476 false, false, "", ""}; | |
477 VideoQualityTest::Params screenshare_params_low; | |
478 screenshare_params_low.video = {true, 1850, 1110, 5, 50000, 200000, | |
479 2000000, false, "VP8", 2, 0, 400000, | |
480 false, false, "", ""}; | |
481 | |
482 std::vector<VideoStream> streams = { | |
483 DefaultVideoStream(screenshare_params_low), | |
484 DefaultVideoStream(screenshare_params_high)}; | |
485 screenshare.ss = {streams, 1, 1, 0, std::vector<SpatialLayer>(), false}; | |
486 RunTest(screenshare); | |
487 } | |
488 | |
392 const VideoQualityTest::Params::Video kSvcVp9Video = { | 489 const VideoQualityTest::Params::Video kSvcVp9Video = { |
393 true, 1280, 720, 30, | 490 true, 1280, 720, 30, |
394 800000, 2500000, 2500000, false, | 491 800000, 2500000, 2500000, false, |
395 "VP9", 3, 2, 400000, | 492 "VP9", 3, 2, 400000, |
396 false, false, "", "ConferenceMotion_1280_720_50"}; | 493 false, false, "", "ConferenceMotion_1280_720_50"}; |
397 | 494 |
398 const VideoQualityTest::Params::Video kSimulcastVp8VideoHigh = { | 495 const VideoQualityTest::Params::Video kSimulcastVp8VideoHigh = { |
399 true, 1280, 720, 30, | 496 true, 1280, 720, 30, |
400 800000, 2500000, 2500000, false, | 497 800000, 2500000, 2500000, false, |
401 "VP8", 3, 2, 400000, | 498 "VP8", 3, 2, 400000, |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
630 std::vector<VideoStream> streams = {DefaultVideoStream(video_params_low), | 727 std::vector<VideoStream> streams = {DefaultVideoStream(video_params_low), |
631 DefaultVideoStream(video_params_medium), | 728 DefaultVideoStream(video_params_medium), |
632 DefaultVideoStream(video_params_high)}; | 729 DefaultVideoStream(video_params_high)}; |
633 large_room.num_thumbnails = 50; | 730 large_room.num_thumbnails = 50; |
634 large_room.ss = {streams, 2, 1, 0, std::vector<SpatialLayer>(), false}; | 731 large_room.ss = {streams, 2, 1, 0, std::vector<SpatialLayer>(), false}; |
635 RunTest(large_room); | 732 RunTest(large_room); |
636 } | 733 } |
637 | 734 |
638 | 735 |
639 } // namespace webrtc | 736 } // namespace webrtc |
OLD | NEW |