blob: 9ae0bd97a6626898d045f7bbaa6b63c0cc41cf03 [file] [log] [blame]
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001/*
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.org69215d82013-07-10 15:02:02 +000012#include "testing/gtest/include/gtest/gtest.h"
ivica5d6a06c2015-09-17 05:30:24 -070013#include "webrtc/video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000014
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000015namespace webrtc {
16
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +000017static const int kFullStackTestDurationSecs = 60;
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000018
ivica5d6a06c2015-09-17 05:30:24 -070019class FullStackTest : public VideoQualityTest {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000020 public:
ivica5d6a06c2015-09-17 05:30:24 -070021 void RunTest(const VideoQualityTest::Params &params) {
22 RunWithAnalyzer(params);
pbos@webrtc.org94015242013-10-16 11:05:37 +000023 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000024};
25
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000026
pbos@webrtc.org994d0b72014-06-27 08:47:52 +000027TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) {
ivica5d6a06c2015-09-17 05:30:24 -070028 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.orgb8e9e442014-07-09 11:29:06 +000033 RunTest(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +000034}
35
36TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) {
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +000037 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
ivica5d6a06c2015-09-17 05:30:24 -070038 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.orgb8e9e442014-07-09 11:29:06 +000044 RunTest(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +000045}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000046
sprang@webrtc.org343096a2015-02-23 08:34:17 +000047TEST_F(FullStackTest, ForemanCifPlr5) {
ivica5d6a06c2015-09-17 05:30:24 -070048 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.orgc216b9a2014-10-14 10:38:49 +000055 RunTest(foreman_cif);
56}
57
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +000058TEST_F(FullStackTest, ForemanCif500kbps) {
ivica5d6a06c2015-09-17 05:30:24 -070059 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.orgb8e9e442014-07-09 11:29:06 +000067 RunTest(foreman_cif);
68}
69
70TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) {
ivica5d6a06c2015-09-17 05:30:24 -070071 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.orgb8e9e442014-07-09 11:29:06 +000080 RunTest(foreman_cif);
81}
82
83TEST_F(FullStackTest, ForemanCif500kbps100ms) {
ivica5d6a06c2015-09-17 05:30:24 -070084 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.orgb8e9e442014-07-09 11:29:06 +000092 RunTest(foreman_cif);
93}
94
95TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
ivica5d6a06c2015-09-17 05:30:24 -070096 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.orgb8e9e442014-07-09 11:29:06 +0000105 RunTest(foreman_cif);
106}
107
108TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
ivica5d6a06c2015-09-17 05:30:24 -0700109 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.orgb8e9e442014-07-09 11:29:06 +0000118 RunTest(foreman_cif);
119}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000120
Peter Boströmb21fd942015-07-23 13:14:20 +0200121// 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"
ivica028cf482015-07-30 02:15:56 -0700124TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP8_2TL)) {
ivica5d6a06c2015-09-17 05:30:24 -0700125 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ång6ee69aa2015-09-03 15:58:05 +0200131}
132
133TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP8_2TL_Scroll)) {
ivica5d6a06c2015-09-17 05:30:24 -0700134 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);
ivica028cf482015-07-30 02:15:56 -0700140}
141
ivicad6b243f2015-08-11 10:43:02 -0700142// Disabled on Android along with VP8 screenshare above.
143TEST_F(FullStackTest, DISABLED_ON_ANDROID(ScreenshareSlidesVP9_2TL)) {
ivica5d6a06c2015-09-17 05:30:24 -0700144 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.org131bea82015-02-18 12:46:06 +0000150}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000151} // namespace webrtc