| 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 "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "webrtc/video/video_quality_test.h" | 13 #include "webrtc/video/video_quality_test.h" |
| 14 | 14 |
| 15 namespace webrtc { | 15 namespace webrtc { |
| 16 | 16 |
| 17 static const int kFullStackTestDurationSecs = 60; | 17 static const int kFullStackTestDurationSecs = 60; |
| 18 | 18 |
| 19 class FullStackTest : public VideoQualityTest { | 19 class FullStackTest : public VideoQualityTest { |
| 20 public: | 20 public: |
| 21 void RunTest(const VideoQualityTest::Params ¶ms) { | 21 void RunTest(const VideoQualityTest::Params ¶ms) { |
| 22 RunWithAnalyzer(params); | 22 RunWithAnalyzer(params); |
| 23 } | 23 } |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 // Testing if it is safe to enable the tests for android now. |
| 27 // https://code.google.com/p/chromium/issues/detail?id=513170 |
| 26 | 28 |
| 27 TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) { | 29 #define FIRST_TEST { \ |
| 28 VideoQualityTest::Params paris_qcif = { | 30 VideoQualityTest::Params screenshare = { \ |
| 29 {176, 144, 30, 300000, 300000, 300000, "VP8", 1}, | 31 {1850, 1110, 5, 50000, 200000, 2000000, "VP8", 2, 400000}, \ |
| 30 {"paris_qcif"}, | 32 {}, \ |
| 31 {}, | 33 {true, 10}, \ |
| 32 {"net_delay_0_0_plr_0", 36.0, 0.96, kFullStackTestDurationSecs}}; | 34 {"screenshare_slides", 0.0, 0.0, kFullStackTestDurationSecs}}; \ |
| 33 RunTest(paris_qcif); | 35 RunTest(screenshare); \ |
| 34 } | 36 } |
| 35 | 37 |
| 36 TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) { | 38 #define SECOND_TEST { \ |
| 37 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. | 39 VideoQualityTest::Params config = { \ |
| 38 VideoQualityTest::Params foreman_cif = { | 40 {1850, 1110 / 2, 5, 50000, 200000, 2000000, "VP8", 2, 400000}, \ |
| 39 {352, 288, 30, 700000, 700000, 700000, "VP8", 1}, | 41 {}, \ |
| 40 {"foreman_cif"}, | 42 {true, 10, 2}, \ |
| 41 {}, | 43 {"screenshare_slides_scrolling", 0.0, 0.0, kFullStackTestDurationSecs}}; \ |
| 42 {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0, kFullStackTestDurationSecs} | 44 RunTest(config); \ |
| 43 }; | |
| 44 RunTest(foreman_cif); | |
| 45 } | 45 } |
| 46 | 46 |
| 47 TEST_F(FullStackTest, ForemanCifPlr5) { | 47 #define THIRD_TEST {\ |
| 48 VideoQualityTest::Params foreman_cif = { | 48 VideoQualityTest::Params screenshare = { \ |
| 49 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 49 {1850, 1110, 5, 50000, 200000, 2000000, "VP9", 2, 400000}, \ |
| 50 {"foreman_cif"}, | 50 {}, \ |
| 51 {}, | 51 {true, 10}, \ |
| 52 {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0, kFullStackTestDurationSecs}}; | 52 {"screenshare_slides_vp9_2tl", 0.0, 0.0, kFullStackTestDurationSecs}}; \ |
| 53 foreman_cif.pipe.loss_percent = 5; | 53 RunTest(screenshare); \ |
| 54 foreman_cif.pipe.queue_delay_ms = 50; | |
| 55 RunTest(foreman_cif); | |
| 56 } | 54 } |
| 57 | 55 |
| 58 TEST_F(FullStackTest, ForemanCif500kbps) { | 56 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_0) FIRST_TEST; |
| 59 VideoQualityTest::Params foreman_cif = { | 57 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_1) FIRST_TEST; |
| 60 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 58 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_2) FIRST_TEST; |
| 61 {"foreman_cif"}, | 59 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_3) FIRST_TEST; |
| 62 {}, | 60 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_4) FIRST_TEST; |
| 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; | |
| 67 RunTest(foreman_cif); | |
| 68 } | |
| 69 | 61 |
| 70 TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) { | 62 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll_0) SECOND_TEST; |
| 71 VideoQualityTest::Params foreman_cif = { | 63 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll_1) SECOND_TEST; |
| 72 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 64 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll_2) SECOND_TEST; |
| 73 {"foreman_cif"}, | 65 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll_3) SECOND_TEST; |
| 74 {}, | 66 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll_4) SECOND_TEST; |
| 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; | |
| 80 RunTest(foreman_cif); | |
| 81 } | |
| 82 | 67 |
| 83 TEST_F(FullStackTest, ForemanCif500kbps100ms) { | 68 TEST_F(FullStackTest, ScreenshareSlidesVP9_2TL_0) THIRD_TEST; |
| 84 VideoQualityTest::Params foreman_cif = { | 69 TEST_F(FullStackTest, ScreenshareSlidesVP9_2TL_1) THIRD_TEST; |
| 85 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 70 TEST_F(FullStackTest, ScreenshareSlidesVP9_2TL_2) THIRD_TEST; |
| 86 {"foreman_cif"}, | 71 TEST_F(FullStackTest, ScreenshareSlidesVP9_2TL_3) THIRD_TEST; |
| 87 {}, | 72 TEST_F(FullStackTest, ScreenshareSlidesVP9_2TL_4) THIRD_TEST; |
| 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; | |
| 92 RunTest(foreman_cif); | |
| 93 } | |
| 94 | 73 |
| 95 TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) { | |
| 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; | |
| 105 RunTest(foreman_cif); | |
| 106 } | |
| 107 | |
| 108 TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) { | |
| 109 VideoQualityTest::Params foreman_cif = { | |
| 110 {352, 288, 30, 30000, 2000000, 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; | |
| 118 RunTest(foreman_cif); | |
| 119 } | |
| 120 | |
| 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" | |
| 124 TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP8_2TL)) { | |
| 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); | |
| 131 } | |
| 132 | |
| 133 TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP8_2TL_Scroll)) { | |
| 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); | |
| 140 } | |
| 141 | |
| 142 // Disabled on Android along with VP8 screenshare above. | |
| 143 TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP9_2TL)) { | |
| 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); | |
| 150 } | |
| 151 } // namespace webrtc | 74 } // namespace webrtc |
| OLD | NEW |