blob: 988f1e8a58ab8e16d0ca9f154750439bbecdec9e [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
Sebastian Janssoncabe3832018-01-12 10:54:18 +010012#include "rtc_base/experiments/alr_experiment.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020013#include "rtc_base/flags.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "test/field_trial.h"
15#include "test/gtest.h"
16#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000017
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000018namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020019namespace flags {
20
21DEFINE_bool(logs, false, "print logs to stderr");
22
23DEFINE_string(rtc_event_log_name,
24 "",
25 "Filename for rtc event log. Two files "
26 "with \"_send\" and \"_recv\" suffixes will be created.");
27std::string RtcEventLogName() {
28 return static_cast<std::string>(FLAG_rtc_event_log_name);
29}
30DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream.");
31std::string RtpDumpName() {
32 return static_cast<std::string>(FLAG_rtp_dump_name);
33}
34DEFINE_string(encoded_frame_path,
35 "",
36 "The base path for encoded frame logs. Created files will have "
37 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
38std::string EncodedFramePath() {
39 return static_cast<std::string>(FLAG_encoded_frame_path);
40}
41} // namespace flags
42} // namespace webrtc
43
44namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000045
sprang89c4a7e2017-06-30 13:27:40 -070046namespace {
brandtrdd369c62016-11-16 23:56:57 -080047static const int kFullStackTestDurationSecs = 45;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020048const char kScreenshareSimulcastExperiment[] =
49 "WebRTC-SimulcastScreenshare/Enabled/";
50const char kRoundRobinPacingQueueExperiment[] =
51 "WebRTC-RoundRobinPacing/Enabled/";
52const char kPacerPushBackExperiment[] =
53 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000054
Patrik Höglundb6b29e02018-06-21 16:58:01 +020055std::string AlrProbingExperimentName() {
56 auto experiment = std::string(
57 AlrExperimentSettings::kScreenshareProbingBweExperimentName);
58 return experiment + "/1.1,2875,85,20,-20,0/";
59}
60
61struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000062 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020063 ParamsWithLogging() {
64 // Use these logging flags by default, for everything.
65 logging = {flags::FLAG_logs, flags::RtcEventLogName(),
66 flags::RtpDumpName(), flags::EncodedFramePath()};
pbos@webrtc.org94015242013-10-16 11:05:37 +000067 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000068};
69
Patrik Höglundb6b29e02018-06-21 16:58:01 +020070std::unique_ptr<VideoQualityTestFixtureInterface>
71CreateVideoQualityTestFixture() {
Karl Wiberg918f50c2018-07-05 11:40:33 +020072 return absl::make_unique<VideoQualityTest>(nullptr);
Patrik Höglundb6b29e02018-06-21 16:58:01 +020073}
74
75} // namespace
76
sprangce4aef12015-11-02 07:23:20 -080077// VideoQualityTest::Params params = {
78// { ... }, // Common.
79// { ... }, // Video-specific settings.
80// { ... }, // Screenshare-specific settings.
81// { ... }, // Analyzer settings.
82// pipe, // FakeNetworkPipe::Config
83// { ... }, // Spatial scalability.
84// logs // bool
85// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000086
Peter Boström12996152016-05-14 02:03:18 +020087#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +020088TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
89 auto fixture = CreateVideoQualityTestFixture();
90 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080091 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +010092 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
93 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +020094 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -080095 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
96 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +020097 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -080098}
99
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200100TEST(FullStackTest, ForemanCifPlr5Vp9) {
101 auto fixture = CreateVideoQualityTestFixture();
102 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800103 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100104 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
105 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200106 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800107 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0,
108 kFullStackTestDurationSecs};
109 foreman_cif.pipe.loss_percent = 5;
110 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200111 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800112}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800113
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200114TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
115 auto fixture = CreateVideoQualityTestFixture();
116 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800117 foreman_cif.call.send_side_bwe = true;
118 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
119 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200120 0, 0, false, false, false,
121 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800122 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
123 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200124 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800125}
126
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200127TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
128 auto fixture = CreateVideoQualityTestFixture();
129
130 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700131 generator.call.send_side_bwe = true;
132 generator.video[0] = {true, 352, 288, 30, 700000,
133 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200134 0, 0, false, false, false,
135 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700136 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
137 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200138 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800139}
140
Peter Boström12996152016-05-14 02:03:18 +0200141#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800142
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200143#if defined(WEBRTC_LINUX)
144// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
145#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
146#else
147#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
148#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200149TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
150 auto fixture = CreateVideoQualityTestFixture();
151 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700152 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100153 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
154 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200155 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700156 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
157 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200158 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000159}
160
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200161TEST(FullStackTest, ForemanCifWithoutPacketLoss) {
162 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000163 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200164 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700165 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100166 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
167 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200168 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700169 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0,
170 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200171 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000172}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000173
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200174TEST(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
175 auto fixture = CreateVideoQualityTestFixture();
176 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800177 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100178 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
179 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200180 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800181 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0", 0.0, 0.0,
182 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200183 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800184}
185
Niels Möller6aa415e2018-06-07 11:14:13 +0200186// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200187TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
188 auto fixture = CreateVideoQualityTestFixture();
Niels Möller6aa415e2018-06-07 11:14:13 +0200189 VideoQualityTest::Params foreman_cif;
190 foreman_cif.call.send_side_bwe = true;
191 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
192 500000, 2000000, false, "VP8", 1,
193 0, 0, false, false, true, "foreman_cif"};
194 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
195 0.0, 0.0,
196 kFullStackTestDurationSecs};
197 foreman_cif.pipe.link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200198 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200199}
200
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200201TEST(FullStackTest, ForemanCifPlr5) {
202 auto fixture = CreateVideoQualityTestFixture();
203 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700204 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100205 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
206 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200207 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700208 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
209 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700210 foreman_cif.pipe.loss_percent = 5;
211 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200212 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000213}
214
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200215TEST(FullStackTest, ForemanCifPlr5Ulpfec) {
216 auto fixture = CreateVideoQualityTestFixture();
217 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800218 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100219 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
220 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200221 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800222 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0,
223 kFullStackTestDurationSecs};
224 foreman_cif.pipe.loss_percent = 5;
225 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200226 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800227}
228
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200229TEST(FullStackTest, ForemanCifPlr5Flexfec) {
230 auto fixture = CreateVideoQualityTestFixture();
231 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800232 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100233 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
234 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200235 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800236 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
237 kFullStackTestDurationSecs};
238 foreman_cif.pipe.loss_percent = 5;
239 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200240 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800241}
242
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200243TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
244 auto fixture = CreateVideoQualityTestFixture();
245 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700246 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100247 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
248 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200249 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700250 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
251 0.0, kFullStackTestDurationSecs};
252 foreman_cif.pipe.loss_percent = 3;
253 foreman_cif.pipe.link_capacity_kbps = 500;
254 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200255 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700256}
257
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200258TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
259 auto fixture = CreateVideoQualityTestFixture();
260 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700261 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100262 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
263 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200264 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700265 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
266 0.0, kFullStackTestDurationSecs};
267 foreman_cif.pipe.loss_percent = 3;
268 foreman_cif.pipe.link_capacity_kbps = 500;
269 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200270 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700271}
272
brandtrdd369c62016-11-16 23:56:57 -0800273#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200274TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
275 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800276 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200277 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800278 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100279 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
280 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200281 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800282 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
283 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200284 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800285}
286
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200287TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
288 auto fixture = CreateVideoQualityTestFixture();
289 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800290 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100291 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
292 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200293 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800294 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
295 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200296 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800297}
298
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200299TEST(FullStackTest, ForemanCifPlr5H264) {
300 auto fixture = CreateVideoQualityTestFixture();
301 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800302 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100303 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
304 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200305 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800306 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0,
307 kFullStackTestDurationSecs};
308 foreman_cif.pipe.loss_percent = 5;
309 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200310 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800311}
312
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200313TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
314 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100315 test::ScopedFieldTrials override_field_trials(
316 "WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/");
317
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200318 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100319 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100320 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
321 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200322 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100323 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
324 0.0, kFullStackTestDurationSecs};
325 foreman_cif.pipe.loss_percent = 5;
326 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200327 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100328}
329
brandtrdd369c62016-11-16 23:56:57 -0800330// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200331TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
332 auto fixture = CreateVideoQualityTestFixture();
333 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800334 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100335 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
336 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200337 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800338 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
339 kFullStackTestDurationSecs};
340 foreman_cif.pipe.loss_percent = 5;
341 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200342 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800343}
344
345// Ulpfec with H264 is an unsupported combination, so this test is only useful
346// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200347TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
348 auto fixture = CreateVideoQualityTestFixture();
349 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800350 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100351 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
352 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200353 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800354 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
355 kFullStackTestDurationSecs};
356 foreman_cif.pipe.loss_percent = 5;
357 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200358 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800359}
360#endif // defined(WEBRTC_USE_H264)
361
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200362TEST(FullStackTest, ForemanCif500kbps) {
363 auto fixture = CreateVideoQualityTestFixture();
364 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700365 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100366 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
367 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200368 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700369 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
370 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700371 foreman_cif.pipe.queue_length_packets = 0;
372 foreman_cif.pipe.queue_delay_ms = 0;
373 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200374 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000375}
376
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200377TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
378 auto fixture = CreateVideoQualityTestFixture();
379 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700380 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100381 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
382 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200383 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700384 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
385 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700386 foreman_cif.pipe.queue_length_packets = 32;
387 foreman_cif.pipe.queue_delay_ms = 0;
388 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200389 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000390}
391
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200392TEST(FullStackTest, ForemanCif500kbps100ms) {
393 auto fixture = CreateVideoQualityTestFixture();
394 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700395 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100396 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
397 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200398 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700399 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
400 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700401 foreman_cif.pipe.queue_length_packets = 0;
402 foreman_cif.pipe.queue_delay_ms = 100;
403 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200404 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000405}
406
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200407TEST(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
408 auto fixture = CreateVideoQualityTestFixture();
409 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700410 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100411 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
412 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200413 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700414 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
415 kFullStackTestDurationSecs};
stefanb1797672016-08-11 07:00:57 -0700416 foreman_cif.pipe.queue_length_packets = 32;
417 foreman_cif.pipe.queue_delay_ms = 100;
418 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200419 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700420}
421
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200422TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
423 auto fixture = CreateVideoQualityTestFixture();
424 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800425 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100426 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
427 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200428 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800429 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
430 0.0, 0.0, kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700431 foreman_cif.pipe.queue_length_packets = 32;
432 foreman_cif.pipe.queue_delay_ms = 100;
433 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200434 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000435}
436
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200437TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
438 auto fixture = CreateVideoQualityTestFixture();
439 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700440 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100441 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
442 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200443 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700444 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
445 kFullStackTestDurationSecs};
ivica5d6a06c2015-09-17 05:30:24 -0700446 foreman_cif.pipe.queue_length_packets = 32;
447 foreman_cif.pipe.queue_delay_ms = 100;
448 foreman_cif.pipe.link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200449 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000450}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000451
sprangff19d352017-09-06 07:14:02 -0700452// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200453TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
454 auto fixture = CreateVideoQualityTestFixture();
455 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700456 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100457 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000458 true, 1280, 720, 50, 30000,
459 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200460 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700461 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
462 0.0, 0.0, kFullStackTestDurationSecs};
stefanb1797672016-08-11 07:00:57 -0700463 conf_motion_hd.pipe.queue_length_packets = 32;
464 conf_motion_hd.pipe.queue_delay_ms = 100;
465 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200466 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700467}
468
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200469TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
470 auto fixture = CreateVideoQualityTestFixture();
471 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700472 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100473 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000474 true, 1280, 720, 50, 30000,
475 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200476 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700477 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
478 0.0, kFullStackTestDurationSecs};
479 conf_motion_hd.pipe.queue_length_packets = 50;
480 conf_motion_hd.pipe.loss_percent = 3;
481 conf_motion_hd.pipe.queue_delay_ms = 100;
482 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200483 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700484}
485
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200486TEST(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
487 auto fixture = CreateVideoQualityTestFixture();
488 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700489 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100490 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000491 true, 1280, 720, 50, 30000,
492 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200493 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700494 conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0,
495 0.0, kFullStackTestDurationSecs};
496 conf_motion_hd.pipe.queue_length_packets = 50;
497 conf_motion_hd.pipe.loss_percent = 3;
498 conf_motion_hd.pipe.queue_delay_ms = 100;
499 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200500 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700501}
502
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200503TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
504 auto fixture = CreateVideoQualityTestFixture();
505 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700506 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100507 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000508 true, 1280, 720, 50, 30000,
509 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200510 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700511 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
512 0.0, kFullStackTestDurationSecs};
513 conf_motion_hd.pipe.queue_length_packets = 50;
514 conf_motion_hd.pipe.loss_percent = 3;
515 conf_motion_hd.pipe.queue_delay_ms = 100;
516 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200517 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700518}
519
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200520TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
521 auto fixture = CreateVideoQualityTestFixture();
522 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700523 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100524 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000525 true, 1280, 720, 50, 30000,
526 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200527 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700528 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
529 0.0, kFullStackTestDurationSecs};
530 conf_motion_hd.pipe.queue_length_packets = 50;
531 conf_motion_hd.pipe.loss_percent = 3;
532 conf_motion_hd.pipe.queue_delay_ms = 100;
533 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200534 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700535}
536
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200537TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
538 auto fixture = CreateVideoQualityTestFixture();
sprangff19d352017-09-06 07:14:02 -0700539 test::ScopedFieldTrials field_trial("WebRTC-UseShortVP8TL3Pattern/Enabled/");
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200540 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700541 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100542 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000543 true, 1280, 720, 50, 30000,
544 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200545 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700546 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
547 0.0, 0.0, kFullStackTestDurationSecs};
548 conf_motion_hd.pipe.queue_length_packets = 50;
549 conf_motion_hd.pipe.loss_percent = 3;
550 conf_motion_hd.pipe.queue_delay_ms = 100;
551 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200552 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700553}
554
jianj390e64d2017-02-03 09:51:23 -0800555#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200556TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
557 auto fixture = CreateVideoQualityTestFixture();
558 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800559 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100560 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000561 true, 1280, 720, 50, 30000,
562 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200563 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800564 conf_motion_hd.analyzer = {
565 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
566 kFullStackTestDurationSecs};
567 conf_motion_hd.pipe.queue_length_packets = 32;
568 conf_motion_hd.pipe.queue_delay_ms = 100;
569 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200570 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800571}
572#endif
573
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200574TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
575 auto fixture = CreateVideoQualityTestFixture();
576 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700577 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100578 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
579 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200580 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100581 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700582 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
583 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200584 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200585}
586
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200587TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
588 auto fixture = CreateVideoQualityTestFixture();
sprang89c4a7e2017-06-30 13:27:40 -0700589 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200590 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800591 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100592 screenshare.screenshare[0] = {true, false, 10};
593 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
594 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200595 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800596 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
597 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200598 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100599 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 800000,
600 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200601 0, 400000, false, false, false,
602 ""};
ilnikcb8c1462017-03-09 09:23:30 -0800603 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100604 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000,
605 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200606 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800607
608 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200609 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
610 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200611 screenshare.ss[0] = {
612 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
613 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200614 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800615}
616
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200617TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
618 auto fixture = CreateVideoQualityTestFixture();
619 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700620 config.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100621 config.video[0] = {true, 1850, 1110 / 2, 5, 50000,
622 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200623 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100624 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700625 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
626 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200627 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700628}
629
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200630TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
631 auto fixture = CreateVideoQualityTestFixture();
632 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700633 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100634 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
635 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200636 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100637 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700638 screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
639 kFullStackTestDurationSecs};
sprangee37de32015-11-23 06:10:23 -0800640 screenshare.pipe.loss_percent = 5;
641 screenshare.pipe.queue_delay_ms = 200;
642 screenshare.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200643 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800644}
645
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200646TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
647 auto fixture = CreateVideoQualityTestFixture();
648 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700649 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100650 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
651 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200652 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100653 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700654 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
655 kFullStackTestDurationSecs};
sprangee37de32015-11-23 06:10:23 -0800656 screenshare.pipe.loss_percent = 10;
657 screenshare.pipe.queue_delay_ms = 200;
658 screenshare.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200659 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800660}
661
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200662TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
663 auto fixture = CreateVideoQualityTestFixture();
664 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700665 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100666 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
667 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200668 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100669 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700670 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
671 kFullStackTestDurationSecs};
672 screenshare.pipe.loss_percent = 5;
673 screenshare.pipe.link_capacity_kbps = 200;
674 screenshare.pipe.queue_length_packets = 30;
675
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200676 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700677}
678
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200679TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
680 auto fixture = CreateVideoQualityTestFixture();
681 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700682 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100683 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
684 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200685 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100686 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700687 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
688 kFullStackTestDurationSecs};
689 screenshare.pipe.loss_percent = 1;
690 screenshare.pipe.link_capacity_kbps = 1200;
691 screenshare.pipe.queue_length_packets = 30;
692
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200693 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700694}
695
696// TODO(sprang): Retire these tests once experiment is removed.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200697TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue_ALR) {
698 auto fixture = CreateVideoQualityTestFixture();
699 test::ScopedFieldTrials field_trial(AlrProbingExperimentName());
700 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700701 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100702 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
703 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200704 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100705 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700706 screenshare.analyzer = {"screenshare_slides_lossy_limited_ALR", 0.0, 0.0,
707 kFullStackTestDurationSecs};
708 screenshare.pipe.loss_percent = 5;
709 screenshare.pipe.link_capacity_kbps = 200;
710 screenshare.pipe.queue_length_packets = 30;
711
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200712 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700713}
714
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200715TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ALR) {
716 auto fixture = CreateVideoQualityTestFixture();
717 test::ScopedFieldTrials field_trial(AlrProbingExperimentName());
718 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700719 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100720 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
721 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200722 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100723 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700724 screenshare.analyzer = {"screenshare_slides_ALR", 0.0, 0.0,
725 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200726 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700727}
728
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200729TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted_ALR) {
730 auto fixture = CreateVideoQualityTestFixture();
731 test::ScopedFieldTrials field_trial(AlrProbingExperimentName());
732 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700733 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100734 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
735 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200736 1, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100737 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700738 screenshare.analyzer = {"screenshare_slides_moderately_restricted_ALR", 0.0,
739 0.0, kFullStackTestDurationSecs};
740 screenshare.pipe.loss_percent = 1;
741 screenshare.pipe.link_capacity_kbps = 1200;
742 screenshare.pipe.queue_length_packets = 30;
743
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200744 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700745}
746
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200747TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast_ALR) {
748 auto fixture = CreateVideoQualityTestFixture();
749 test::ScopedFieldTrials field_trial(
750 std::string(kScreenshareSimulcastExperiment) +
751 AlrProbingExperimentName());
752 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700753 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100754 screenshare.screenshare[0] = {true, false, 10};
755 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
756 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200757 2, 400000, false, false, false, ""};
sprang89c4a7e2017-06-30 13:27:40 -0700758 screenshare.analyzer = {"screenshare_slides_simulcast_alr", 0.0, 0.0,
759 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200760 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100761 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 800000,
762 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200763 0, 400000, false, false, false,
764 ""};
sprang89c4a7e2017-06-30 13:27:40 -0700765 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100766 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000,
767 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200768 0, 400000, false, false, false, ""};
sprang89c4a7e2017-06-30 13:27:40 -0700769
770 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200771 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
772 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200773 screenshare.ss[0] = {
774 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
775 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200776 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700777}
778
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200779const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000780 true, 1280, 720, 30, 800000,
781 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200782 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800783
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200784const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000785 true, 1280, 720, 30, 800000,
786 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200787 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800788
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200789const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000790 true, 640, 360, 30, 150000,
791 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200792 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800793
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200794const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000795 true, 320, 180, 30, 30000,
796 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200797 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800798
Peter Boström12996152016-05-14 02:03:18 +0200799#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200800TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
801 auto fixture = CreateVideoQualityTestFixture();
802 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700803 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100804 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
805 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200806 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100807 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700808 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
809 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200810 screenshare.ss[0] = {
811 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
812 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200813 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000814}
ilnik2a8c2f52017-02-15 02:23:28 -0800815
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200816TEST(FullStackTest, VP9SVC_3SL_High) {
817 auto fixture = CreateVideoQualityTestFixture();
818 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800819 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100820 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800821 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
822 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200823
Sergey Silkin57027362018-05-15 09:12:05 +0200824 simulcast.ss[0] = {
825 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
826 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200827 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800828}
829
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200830TEST(FullStackTest, VP9SVC_3SL_Medium) {
831 auto fixture = CreateVideoQualityTestFixture();
832 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800833 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100834 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800835 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
836 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200837 simulcast.ss[0] = {
838 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
839 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200840 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800841}
842
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200843TEST(FullStackTest, VP9SVC_3SL_Low) {
844 auto fixture = CreateVideoQualityTestFixture();
845 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800846 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100847 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800848 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200849 simulcast.ss[0] = {
850 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
851 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200852 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800853}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200854
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200855TEST(FullStackTest, VP9KSVC_3SL_High) {
856 auto fixture = CreateVideoQualityTestFixture();
857 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200858 simulcast.call.send_side_bwe = true;
859 simulcast.video[0] = kSvcVp9Video;
860 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
861 kFullStackTestDurationSecs};
862 simulcast.ss[0] = {
863 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
864 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200865 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200866}
867
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200868TEST(FullStackTest, VP9KSVC_3SL_Medium) {
869 auto fixture = CreateVideoQualityTestFixture();
870 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200871 simulcast.call.send_side_bwe = true;
872 simulcast.video[0] = kSvcVp9Video;
873 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
874 kFullStackTestDurationSecs};
875 simulcast.ss[0] = {
876 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
877 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200878 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200879}
880
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200881TEST(FullStackTest, VP9KSVC_3SL_Low) {
882 auto fixture = CreateVideoQualityTestFixture();
883 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200884 simulcast.call.send_side_bwe = true;
885 simulcast.video[0] = kSvcVp9Video;
886 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
887 kFullStackTestDurationSecs};
888 simulcast.ss[0] = {
889 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
890 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200891 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200892}
“Michael277a6562018-06-01 14:09:19 -0500893
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200894TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
895 auto fixture = CreateVideoQualityTestFixture();
“Michael277a6562018-06-01 14:09:19 -0500896 VideoQualityTest::Params simulcast;
897 simulcast.call.send_side_bwe = true;
898 simulcast.video[0] = kSvcVp9Video;
899 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
900 kFullStackTestDurationSecs};
901 simulcast.ss[0] = {
902 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
903 std::vector<SpatialLayer>(), false};
904 simulcast.pipe.link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200905 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500906}
907
Peter Boström12996152016-05-14 02:03:18 +0200908#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800909
ilnik6b826ef2017-06-16 06:53:48 -0700910// Android bots can't handle FullHD, so disable the test.
Sam Zackrissonc3d8bb12018-05-02 10:22:32 +0200911// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
912#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700913#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
914#else
915#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
916#endif
917
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200918TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
919 auto fixture = CreateVideoQualityTestFixture();
920 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700921 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100922 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
923 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200924 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700925 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
926 kFullStackTestDurationSecs};
927 simulcast.pipe.loss_percent = 0;
928 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200929 std::vector<VideoStream> streams = {
930 VideoQualityTest::DefaultVideoStream(simulcast, 0),
931 VideoQualityTest::DefaultVideoStream(simulcast, 0),
932 VideoQualityTest::DefaultVideoStream(simulcast, 0)
933 };
Sergey Silkin57027362018-05-15 09:12:05 +0200934 simulcast.ss[0] = {
935 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
936 true};
ilnik6b826ef2017-06-16 06:53:48 -0700937 webrtc::test::ScopedFieldTrials override_trials(
938 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/");
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200939 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700940}
941
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200942TEST(FullStackTest, SimulcastVP8_3SL_High) {
943 auto fixture = CreateVideoQualityTestFixture();
944 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800945 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100946 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800947 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800948 kFullStackTestDurationSecs};
949 simulcast.pipe.loss_percent = 0;
950 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200951 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100952 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200953 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100954 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200955 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100956 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800957
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100958 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200959 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
960 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
961 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200962 simulcast.ss[0] = {
963 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
964 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200965 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800966}
967
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200968TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
969 auto fixture = CreateVideoQualityTestFixture();
970 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800971 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100972 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800973 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800974 kFullStackTestDurationSecs};
975 simulcast.pipe.loss_percent = 0;
976 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200977 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100978 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200979 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100980 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200981 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100982 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800983
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100984 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200985 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
986 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
987 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200988 simulcast.ss[0] = {
989 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
990 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200991 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800992}
993
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200994TEST(FullStackTest, SimulcastVP8_3SL_Low) {
995 auto fixture = CreateVideoQualityTestFixture();
996 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800997 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100998 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800999 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001000 kFullStackTestDurationSecs};
1001 simulcast.pipe.loss_percent = 0;
1002 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001003 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001004 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001005 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001006 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001007 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001008 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -08001009
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001010 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001011 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1012 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1013 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001014 simulcast.ss[0] = {
1015 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1016 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001017 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001018}
1019
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001020TEST(FullStackTest, LargeRoomVP8_5thumb) {
1021 auto fixture = CreateVideoQualityTestFixture();
1022 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001023 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001024 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001025 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1026 kFullStackTestDurationSecs};
1027 large_room.pipe.loss_percent = 0;
1028 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001029 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001030 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001031 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001032 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001033 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001034 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001035
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001036 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001037 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1038 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1039 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001040 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001041 large_room.ss[0] = {
1042 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1043 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001044 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001045}
1046
oprypin743117f2017-09-15 05:24:24 -07001047#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1048// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001049// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1050#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001051#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001052#else
1053#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001054#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001055#endif
1056
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001057TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1058 auto fixture = CreateVideoQualityTestFixture();
1059 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001060 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001061 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001062 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1063 kFullStackTestDurationSecs};
1064 large_room.pipe.loss_percent = 0;
1065 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001066 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001067 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001068 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001069 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001070 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001071 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001072
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001073 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001074 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1075 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1076 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001077 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001078 large_room.ss[0] = {
1079 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1080 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001081 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001082}
1083
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001084TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1085 auto fixture = CreateVideoQualityTestFixture();
1086 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001087 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001088 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001089 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1090 kFullStackTestDurationSecs};
1091 large_room.pipe.loss_percent = 0;
1092 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001093 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001094 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001095 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001096 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001097 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001098 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001099
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001100 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001101 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1102 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1103 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001104 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001105 large_room.ss[0] = {
1106 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1107 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001109}
1110
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001111class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001112
1113// Disable dual video test on mobile device becuase it's too heavy.
1114#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1115TEST_P(DualStreamsTest,
1116 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1117 test::ScopedFieldTrials field_trial(
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001118 std::string(kScreenshareSimulcastExperiment) +
1119 AlrProbingExperimentName() +
1120 std::string(kRoundRobinPacingQueueExperiment) +
1121 std::string(kPacerPushBackExperiment));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001122 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001123 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001124
1125 // Screenshare Settings.
1126 dual_streams.screenshare[first_stream] = {true, false, 10};
1127 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1128 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001129 2, 400000, false, false, false,
1130 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001131
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001132 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001133 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 800000,
1134 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001135 0, 400000, false, false, false,
1136 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001137 VideoQualityTest::Params screenshare_params_low;
1138 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000,
1139 200000, 2000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +02001140 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001141 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001142 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1143 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001144
Sergey Silkin57027362018-05-15 09:12:05 +02001145 dual_streams.ss[first_stream] = {
1146 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1147 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001148
1149 // Video settings.
1150 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1151
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001152 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001153 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001154 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001155 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001156 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001157 video_params_low.video[0] = kSimulcastVp8VideoLow;
1158 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001159 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1160 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1161 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001162
1163 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001164 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1165 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001166
1167 // Call settings.
1168 dual_streams.call.send_side_bwe = true;
1169 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001170 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1171 std::to_string(first_stream);
1172 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001173 dual_streams.pipe.loss_percent = 1;
1174 dual_streams.pipe.link_capacity_kbps = 7500;
1175 dual_streams.pipe.queue_length_packets = 30;
1176 dual_streams.pipe.queue_delay_ms = 100;
1177
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001178 auto fixture = CreateVideoQualityTestFixture();
1179 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001180}
1181#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1182
1183TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001184 test::ScopedFieldTrials field_trial(
1185 std::string(kRoundRobinPacingQueueExperiment) +
1186 std::string(kPacerPushBackExperiment));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001187 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001188 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001189
1190 // Screenshare Settings.
1191 dual_streams.screenshare[first_stream] = {true, false, 10};
1192 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1193 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001194 2, 400000, false, false, false,
1195 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001196 // Video settings.
1197 dual_streams.video[1 - first_stream] = {
1198 true, 1280, 720, 30, 150000,
1199 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001200 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001201
1202 // Call settings.
1203 dual_streams.call.send_side_bwe = true;
1204 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001205 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1206 std::to_string(first_stream);
1207 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001208 dual_streams.pipe.loss_percent = 1;
1209 dual_streams.pipe.link_capacity_kbps = 5000;
1210 dual_streams.pipe.queue_length_packets = 30;
1211 dual_streams.pipe.queue_delay_ms = 100;
1212
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001213 auto fixture = CreateVideoQualityTestFixture();
1214 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001215}
1216
1217INSTANTIATE_TEST_CASE_P(FullStackTest,
1218 DualStreamsTest,
1219 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001220
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001221} // namespace webrtc