pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | #include <stdio.h> |
| 11 | |
pbos@webrtc.org | 69215d8 | 2013-07-10 15:02:02 +0000 | [diff] [blame] | 12 | #include "testing/gtest/include/gtest/gtest.h" |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 13 | #include "webrtc/video/video_quality_test.h" |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 14 | |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 15 | namespace webrtc { |
| 16 | |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 17 | static const int kFullStackTestDurationSecs = 60; |
pbos@webrtc.org | b613b5a | 2013-12-03 10:13:04 +0000 | [diff] [blame] | 18 | |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 19 | class FullStackTest : public VideoQualityTest { |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 20 | public: |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 21 | void RunTest(const VideoQualityTest::Params ¶ms) { |
| 22 | RunWithAnalyzer(params); |
pbos@webrtc.org | 9401524 | 2013-10-16 11:05:37 +0000 | [diff] [blame] | 23 | } |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 24 | }; |
| 25 | |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 26 | |
pbos@webrtc.org | 994d0b7 | 2014-06-27 08:47:52 +0000 | [diff] [blame] | 27 | TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 28 | VideoQualityTest::Params paris_qcif = { |
| 29 | {176, 144, 30, 300000, 300000, 300000, "VP8", 1}, |
| 30 | {"paris_qcif"}, |
| 31 | {}, |
| 32 | {"net_delay_0_0_plr_0", 36.0, 0.96, kFullStackTestDurationSecs}}; |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 33 | RunTest(paris_qcif); |
pbos@webrtc.org | 994d0b7 | 2014-06-27 08:47:52 +0000 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) { |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 37 | // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 38 | VideoQualityTest::Params foreman_cif = { |
| 39 | {352, 288, 30, 700000, 700000, 700000, "VP8", 1}, |
| 40 | {"foreman_cif"}, |
| 41 | {}, |
| 42 | {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0, kFullStackTestDurationSecs} |
| 43 | }; |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 44 | RunTest(foreman_cif); |
pbos@webrtc.org | 994d0b7 | 2014-06-27 08:47:52 +0000 | [diff] [blame] | 45 | } |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 46 | |
sprang@webrtc.org | 343096a | 2015-02-23 08:34:17 +0000 | [diff] [blame] | 47 | TEST_F(FullStackTest, ForemanCifPlr5) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 48 | VideoQualityTest::Params foreman_cif = { |
| 49 | {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, |
| 50 | {"foreman_cif"}, |
| 51 | {}, |
| 52 | {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0, kFullStackTestDurationSecs}}; |
| 53 | foreman_cif.pipe.loss_percent = 5; |
| 54 | foreman_cif.pipe.queue_delay_ms = 50; |
stefan@webrtc.org | c216b9a | 2014-10-14 10:38:49 +0000 | [diff] [blame] | 55 | RunTest(foreman_cif); |
| 56 | } |
| 57 | |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 58 | TEST_F(FullStackTest, ForemanCif500kbps) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 59 | VideoQualityTest::Params foreman_cif = { |
| 60 | {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, |
| 61 | {"foreman_cif"}, |
| 62 | {}, |
| 63 | {"foreman_cif_500kbps", 0.0, 0.0, kFullStackTestDurationSecs}}; |
| 64 | foreman_cif.pipe.queue_length_packets = 0; |
| 65 | foreman_cif.pipe.queue_delay_ms = 0; |
| 66 | foreman_cif.pipe.link_capacity_kbps = 500; |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 67 | RunTest(foreman_cif); |
| 68 | } |
| 69 | |
| 70 | TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 71 | VideoQualityTest::Params foreman_cif = { |
| 72 | {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, |
| 73 | {"foreman_cif"}, |
| 74 | {}, |
| 75 | {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0, kFullStackTestDurationSecs} |
| 76 | }; |
| 77 | foreman_cif.pipe.queue_length_packets = 32; |
| 78 | foreman_cif.pipe.queue_delay_ms = 0; |
| 79 | foreman_cif.pipe.link_capacity_kbps = 500; |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 80 | RunTest(foreman_cif); |
| 81 | } |
| 82 | |
| 83 | TEST_F(FullStackTest, ForemanCif500kbps100ms) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 84 | VideoQualityTest::Params foreman_cif = { |
| 85 | {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, |
| 86 | {"foreman_cif"}, |
| 87 | {}, |
| 88 | {"foreman_cif_500kbps_100ms", 0.0, 0.0, kFullStackTestDurationSecs}}; |
| 89 | foreman_cif.pipe.queue_length_packets = 0; |
| 90 | foreman_cif.pipe.queue_delay_ms = 100; |
| 91 | foreman_cif.pipe.link_capacity_kbps = 500; |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 92 | RunTest(foreman_cif); |
| 93 | } |
| 94 | |
| 95 | TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 96 | VideoQualityTest::Params foreman_cif = { |
| 97 | {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, |
| 98 | {"foreman_cif"}, |
| 99 | {}, |
| 100 | {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0, |
| 101 | kFullStackTestDurationSecs}}; |
| 102 | foreman_cif.pipe.queue_length_packets = 32; |
| 103 | foreman_cif.pipe.queue_delay_ms = 100; |
| 104 | foreman_cif.pipe.link_capacity_kbps = 500; |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 105 | RunTest(foreman_cif); |
| 106 | } |
| 107 | |
| 108 | TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 109 | VideoQualityTest::Params foreman_cif = { |
| 110 | {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, |
| 111 | {"foreman_cif"}, |
| 112 | {}, |
| 113 | {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0, |
| 114 | kFullStackTestDurationSecs}}; |
| 115 | foreman_cif.pipe.queue_length_packets = 32; |
| 116 | foreman_cif.pipe.queue_delay_ms = 100; |
| 117 | foreman_cif.pipe.link_capacity_kbps = 1000; |
stefan@webrtc.org | b8e9e44 | 2014-07-09 11:29:06 +0000 | [diff] [blame] | 118 | RunTest(foreman_cif); |
| 119 | } |
sprang@webrtc.org | 131bea8 | 2015-02-18 12:46:06 +0000 | [diff] [blame] | 120 | |
Peter Boström | b21fd94 | 2015-07-23 13:14:20 +0200 | [diff] [blame] | 121 | // Temporarily disabled on Android due to low test timeouts. |
| 122 | // https://code.google.com/p/chromium/issues/detail?id=513170 |
| 123 | #include "webrtc/test/testsupport/gtest_disable.h" |
ivica | 028cf48 | 2015-07-30 02:15:56 -0700 | [diff] [blame] | 124 | TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP8_2TL)) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 125 | VideoQualityTest::Params screenshare = { |
| 126 | {1850, 1110, 5, 50000, 200000, 2000000, "VP8", 2, 400000}, |
| 127 | {}, // Video-specific. |
| 128 | {true, 10}, // Screenshare-specific. |
| 129 | {"screenshare_slides", 0.0, 0.0, kFullStackTestDurationSecs}}; |
| 130 | RunTest(screenshare); |
Erik Språng | 6ee69aa | 2015-09-03 15:58:05 +0200 | [diff] [blame] | 131 | } |
| 132 | |
| 133 | TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP8_2TL_Scroll)) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 134 | VideoQualityTest::Params config = { |
| 135 | {1850, 1110 / 2, 5, 50000, 200000, 2000000, "VP8", 2, 400000}, |
| 136 | {}, |
| 137 | {true, 10, 2}, |
| 138 | {"screenshare_slides_scrolling", 0.0, 0.0, kFullStackTestDurationSecs}}; |
| 139 | RunTest(config); |
ivica | 028cf48 | 2015-07-30 02:15:56 -0700 | [diff] [blame] | 140 | } |
| 141 | |
ivica | d6b243f | 2015-08-11 10:43:02 -0700 | [diff] [blame] | 142 | // Disabled on Android along with VP8 screenshare above. |
| 143 | TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP9_2TL)) { |
ivica | 5d6a06c | 2015-09-17 05:30:24 -0700 | [diff] [blame^] | 144 | VideoQualityTest::Params screenshare = { |
| 145 | {1850, 1110, 5, 50000, 200000, 2000000, "VP9", 2, 400000}, |
| 146 | {}, |
| 147 | {true, 10}, |
| 148 | {"screenshare_slides_vp9_2tl", 0.0, 0.0, kFullStackTestDurationSecs}}; |
| 149 | RunTest(screenshare); |
sprang@webrtc.org | 131bea8 | 2015-02-18 12:46:06 +0000 | [diff] [blame] | 150 | } |
pbos@webrtc.org | af8d5af | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 151 | } // namespace webrtc |