blob: 382440fa783b4aab0a7a2629db36260f8e6da784 [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
Patrik Höglundd8f3c172018-09-26 14:39:17 +020012#include "api/test/test_dependency_factory.h"
Emircan Uysaler0823eec2018-07-13 17:10:00 -070013#include "media/base/vp9_profile.h"
14#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssoncabe3832018-01-12 10:54:18 +010015#include "rtc_base/experiments/alr_experiment.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020016#include "rtc_base/flags.h"
Erik Språngb6b1cac2018-08-09 16:12:54 +020017#include "system_wrappers/include/field_trial_default.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020018#include "test/field_trial.h"
19#include "test/gtest.h"
20#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000021
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000022namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020023namespace flags {
24
Sebastian Janssonf8518882018-05-31 14:52:59 +020025DEFINE_string(rtc_event_log_name,
26 "",
27 "Filename for rtc event log. Two files "
28 "with \"_send\" and \"_recv\" suffixes will be created.");
29std::string RtcEventLogName() {
30 return static_cast<std::string>(FLAG_rtc_event_log_name);
31}
32DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream.");
33std::string RtpDumpName() {
34 return static_cast<std::string>(FLAG_rtp_dump_name);
35}
36DEFINE_string(encoded_frame_path,
37 "",
38 "The base path for encoded frame logs. Created files will have "
39 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
40std::string EncodedFramePath() {
41 return static_cast<std::string>(FLAG_encoded_frame_path);
42}
43} // namespace flags
44} // namespace webrtc
45
46namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000047
sprang89c4a7e2017-06-30 13:27:40 -070048namespace {
brandtrdd369c62016-11-16 23:56:57 -080049static const int kFullStackTestDurationSecs = 45;
Erik Språngb65aa012018-09-24 11:35:19 +020050const char kScreenshareSimulcastExperiment[] =
51 "WebRTC-SimulcastScreenshare/Enabled/";
Patrik Höglundb6b29e02018-06-21 16:58:01 +020052const char kPacerPushBackExperiment[] =
53 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000054
Patrik Höglundb6b29e02018-06-21 16:58:01 +020055struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000056 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020057 ParamsWithLogging() {
58 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020059 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
60 flags::EncodedFramePath()};
Artem Titovf18b3522018-08-28 16:54:24 +020061 this->config = DefaultNetworkSimulationConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000062 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000063};
64
Patrik Höglundb6b29e02018-06-21 16:58:01 +020065std::unique_ptr<VideoQualityTestFixtureInterface>
66CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020067 // The components will normally be nullptr (= use defaults), but it's possible
68 // for external test runners to override the list of injected components.
69 auto components = TestDependencyFactory::GetInstance().CreateComponents();
70 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020071}
72
Erik Språngb6b1cac2018-08-09 16:12:54 +020073// Takes the current active field trials set, and appends some new trials.
74std::string AppendFieldTrials(std::string new_trial_string) {
75 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
76}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020077} // namespace
78
sprangce4aef12015-11-02 07:23:20 -080079// VideoQualityTest::Params params = {
80// { ... }, // Common.
81// { ... }, // Video-specific settings.
82// { ... }, // Screenshare-specific settings.
83// { ... }, // Analyzer settings.
84// pipe, // FakeNetworkPipe::Config
85// { ... }, // Spatial scalability.
86// logs // bool
87// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000088
Peter Boström12996152016-05-14 02:03:18 +020089#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +020090TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
91 auto fixture = CreateVideoQualityTestFixture();
92 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080093 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +010094 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
95 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +020096 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -080097 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
98 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +020099 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800100}
101
Lu Liu6f683242018-09-25 18:48:48 +0000102TEST(FullStackTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200103 auto fixture = CreateVideoQualityTestFixture();
104 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800105 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100106 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
107 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200108 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000109 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0,
110 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200111 foreman_cif.config->loss_percent = 5;
112 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200113 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800114}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800115
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700116TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
117 // Profile 2 might not be available on some platforms until
118 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
119 bool profile_2_is_supported = false;
120 for (const auto& codec : SupportedVP9Codecs()) {
121 if (ParseSdpForVP9Profile(codec.parameters)
122 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
123 profile_2_is_supported = true;
124 }
125 }
126 if (!profile_2_is_supported)
127 return;
128 auto fixture = CreateVideoQualityTestFixture();
129
130 SdpVideoFormat::Parameters vp92 = {
131 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
132 ParamsWithLogging generator;
133 generator.call.send_side_bwe = true;
134 generator.video[0] = {
135 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
136 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
137 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
138 kFullStackTestDurationSecs};
139 fixture->RunWithAnalyzer(generator);
140}
141
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200142TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
143 auto fixture = CreateVideoQualityTestFixture();
144 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800145 foreman_cif.call.send_side_bwe = true;
146 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
147 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200148 0, 0, false, false, false,
149 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800150 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
151 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200152 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800153}
154
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200155TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
156 auto fixture = CreateVideoQualityTestFixture();
157
158 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700159 generator.call.send_side_bwe = true;
160 generator.video[0] = {true, 352, 288, 30, 700000,
161 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200162 0, 0, false, false, false,
163 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700164 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
165 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200166 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800167}
168
Peter Boström12996152016-05-14 02:03:18 +0200169#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800170
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200171#if defined(WEBRTC_LINUX)
172// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
173#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
174#else
175#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
176#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200177TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
178 auto fixture = CreateVideoQualityTestFixture();
179 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700180 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100181 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
182 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200183 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700184 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
185 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200186 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000187}
188
Lu Liu6f683242018-09-25 18:48:48 +0000189TEST(FullStackTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200190 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000191 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200192 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700193 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100194 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
195 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200196 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000197 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0,
198 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200199 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000200}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000201
Lu Liu6f683242018-09-25 18:48:48 +0000202TEST(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200203 auto fixture = CreateVideoQualityTestFixture();
204 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800205 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100206 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
207 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200208 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000209 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0", 0.0, 0.0,
210 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200211 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800212}
213
Niels Möller6aa415e2018-06-07 11:14:13 +0200214// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200215TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
216 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200217 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200218 foreman_cif.call.send_side_bwe = true;
219 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
220 500000, 2000000, false, "VP8", 1,
221 0, 0, false, false, true, "foreman_cif"};
222 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
223 0.0, 0.0,
224 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200225 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200226 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200227}
228
Lu Liu6f683242018-09-25 18:48:48 +0000229TEST(FullStackTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200230 auto fixture = CreateVideoQualityTestFixture();
231 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700232 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, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000236 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
237 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200238 foreman_cif.config->loss_percent = 5;
239 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200240 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000241}
242
Lu Liu6f683242018-09-25 18:48:48 +0000243TEST(FullStackTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200244 auto fixture = CreateVideoQualityTestFixture();
245 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800246 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, true, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000250 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0,
251 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200252 foreman_cif.config->loss_percent = 5;
253 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200254 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800255}
256
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200257TEST(FullStackTest, ForemanCifPlr5Flexfec) {
258 auto fixture = CreateVideoQualityTestFixture();
259 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800260 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100261 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
262 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200263 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800264 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
265 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200266 foreman_cif.config->loss_percent = 5;
267 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200268 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800269}
270
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200271TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
272 auto fixture = CreateVideoQualityTestFixture();
273 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700274 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100275 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
276 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200277 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700278 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
279 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200280 foreman_cif.config->loss_percent = 3;
281 foreman_cif.config->link_capacity_kbps = 500;
282 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200283 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700284}
285
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200286TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
287 auto fixture = CreateVideoQualityTestFixture();
288 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700289 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100290 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
291 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200292 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700293 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
294 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200295 foreman_cif.config->loss_percent = 3;
296 foreman_cif.config->link_capacity_kbps = 500;
297 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200298 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700299}
300
brandtrdd369c62016-11-16 23:56:57 -0800301#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200302TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
303 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800304 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200305 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800306 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100307 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
308 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200309 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800310 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
311 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200312 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800313}
314
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200315TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
316 auto fixture = CreateVideoQualityTestFixture();
317 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800318 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100319 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
320 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200321 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800322 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
323 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200324 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800325}
326
Lu Liu6f683242018-09-25 18:48:48 +0000327TEST(FullStackTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200328 auto fixture = CreateVideoQualityTestFixture();
329 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800330 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100331 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
332 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200333 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000334 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0,
335 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200336 foreman_cif.config->loss_percent = 5;
337 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200338 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800339}
340
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200341TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
342 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100343 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200344 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100345
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200346 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100347 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100348 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
349 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200350 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100351 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
352 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200353 foreman_cif.config->loss_percent = 5;
354 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200355 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100356}
357
brandtrdd369c62016-11-16 23:56:57 -0800358// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200359TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
360 auto fixture = CreateVideoQualityTestFixture();
361 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800362 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100363 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
364 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200365 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800366 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
367 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200368 foreman_cif.config->loss_percent = 5;
369 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200370 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800371}
372
373// Ulpfec with H264 is an unsupported combination, so this test is only useful
374// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200375TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
376 auto fixture = CreateVideoQualityTestFixture();
377 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800378 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100379 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
380 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200381 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800382 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
383 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200384 foreman_cif.config->loss_percent = 5;
385 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200386 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800387}
388#endif // defined(WEBRTC_USE_H264)
389
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200390TEST(FullStackTest, ForemanCif500kbps) {
391 auto fixture = CreateVideoQualityTestFixture();
392 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700393 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100394 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
395 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200396 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700397 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
398 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200399 foreman_cif.config->queue_length_packets = 0;
400 foreman_cif.config->queue_delay_ms = 0;
401 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200402 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000403}
404
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200405TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
406 auto fixture = CreateVideoQualityTestFixture();
407 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700408 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100409 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
410 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200411 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700412 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
413 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200414 foreman_cif.config->queue_length_packets = 32;
415 foreman_cif.config->queue_delay_ms = 0;
416 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200417 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000418}
419
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200420TEST(FullStackTest, ForemanCif500kbps100ms) {
421 auto fixture = CreateVideoQualityTestFixture();
422 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700423 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100424 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
425 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200426 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700427 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
428 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200429 foreman_cif.config->queue_length_packets = 0;
430 foreman_cif.config->queue_delay_ms = 100;
431 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200432 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000433}
434
Lu Liu6f683242018-09-25 18:48:48 +0000435TEST(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200436 auto fixture = CreateVideoQualityTestFixture();
437 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700438 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100439 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
440 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200441 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000442 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
443 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200444 foreman_cif.config->queue_length_packets = 32;
445 foreman_cif.config->queue_delay_ms = 100;
446 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200447 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700448}
449
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200450TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
451 auto fixture = CreateVideoQualityTestFixture();
452 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800453 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100454 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
455 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200456 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800457 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
458 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200459 foreman_cif.config->queue_length_packets = 32;
460 foreman_cif.config->queue_delay_ms = 100;
461 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200462 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000463}
464
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200465TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
466 auto fixture = CreateVideoQualityTestFixture();
467 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700468 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100469 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
470 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200471 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700472 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
473 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200474 foreman_cif.config->queue_length_packets = 32;
475 foreman_cif.config->queue_delay_ms = 100;
476 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200477 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000478}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000479
sprangff19d352017-09-06 07:14:02 -0700480// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200481TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
482 auto fixture = CreateVideoQualityTestFixture();
483 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700484 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100485 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000486 true, 1280, 720, 50, 30000,
487 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200488 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700489 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
490 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200491 conf_motion_hd.config->queue_length_packets = 32;
492 conf_motion_hd.config->queue_delay_ms = 100;
493 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200494 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700495}
496
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200497TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
498 auto fixture = CreateVideoQualityTestFixture();
499 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700500 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100501 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000502 true, 1280, 720, 50, 30000,
503 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200504 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700505 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
506 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200507 conf_motion_hd.config->queue_length_packets = 50;
508 conf_motion_hd.config->loss_percent = 3;
509 conf_motion_hd.config->queue_delay_ms = 100;
510 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200511 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700512}
513
Lu Liu6f683242018-09-25 18:48:48 +0000514TEST(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200515 auto fixture = CreateVideoQualityTestFixture();
516 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700517 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100518 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000519 true, 1280, 720, 50, 30000,
520 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200521 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Lu Liu6f683242018-09-25 18:48:48 +0000522 conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0,
523 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200524 conf_motion_hd.config->queue_length_packets = 50;
525 conf_motion_hd.config->loss_percent = 3;
526 conf_motion_hd.config->queue_delay_ms = 100;
527 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200528 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700529}
530
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200531TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
532 auto fixture = CreateVideoQualityTestFixture();
533 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700534 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100535 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000536 true, 1280, 720, 50, 30000,
537 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200538 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700539 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
540 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200541 conf_motion_hd.config->queue_length_packets = 50;
542 conf_motion_hd.config->loss_percent = 3;
543 conf_motion_hd.config->queue_delay_ms = 100;
544 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200545 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700546}
547
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200548TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
549 auto fixture = CreateVideoQualityTestFixture();
550 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700551 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100552 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000553 true, 1280, 720, 50, 30000,
554 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200555 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700556 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
557 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200558 conf_motion_hd.config->queue_length_packets = 50;
559 conf_motion_hd.config->loss_percent = 3;
560 conf_motion_hd.config->queue_delay_ms = 100;
561 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200562 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700563}
564
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200565TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
566 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200567 test::ScopedFieldTrials field_trial(
568 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200569 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700570 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100571 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000572 true, 1280, 720, 50, 30000,
573 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200574 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700575 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
576 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200577 conf_motion_hd.config->queue_length_packets = 50;
578 conf_motion_hd.config->loss_percent = 3;
579 conf_motion_hd.config->queue_delay_ms = 100;
580 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200581 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700582}
583
jianj390e64d2017-02-03 09:51:23 -0800584#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200585TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
586 auto fixture = CreateVideoQualityTestFixture();
587 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800588 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100589 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000590 true, 1280, 720, 50, 30000,
591 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200592 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800593 conf_motion_hd.analyzer = {
594 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
595 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200596 conf_motion_hd.config->queue_length_packets = 32;
597 conf_motion_hd.config->queue_delay_ms = 100;
598 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200599 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800600}
601#endif
602
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200603TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
604 auto fixture = CreateVideoQualityTestFixture();
605 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700606 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200607 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
608 1000000, false, "VP8", 2, 1, 400000,
609 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100610 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700611 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
612 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200613 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200614}
615
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200616TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
617 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb65aa012018-09-24 11:35:19 +0200618 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200619 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800620 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100621 screenshare.screenshare[0] = {true, false, 10};
622 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
623 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200624 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800625 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
626 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200627 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200628 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
629 1000000, false, "VP8", 3, 0, 400000,
630 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800631 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200632 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
633 1000000, false, "VP8", 2, 0, 400000,
634 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800635
636 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200637 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
638 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200639 screenshare.ss[0] = {
640 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
641 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200642 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800643}
644
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200645TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
646 auto fixture = CreateVideoQualityTestFixture();
647 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700648 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200649 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
650 1000000, false, "VP8", 2, 1, 400000,
651 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100652 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700653 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
654 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200655 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700656}
657
Lu Liu6f683242018-09-25 18:48:48 +0000658TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200659 auto fixture = CreateVideoQualityTestFixture();
660 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700661 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200662 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
663 1000000, false, "VP8", 2, 1, 400000,
664 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100665 screenshare.screenshare[0] = {true, false, 10};
Lu Liu6f683242018-09-25 18:48:48 +0000666 screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
667 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200668 screenshare.config->loss_percent = 5;
669 screenshare.config->queue_delay_ms = 200;
670 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200671 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800672}
673
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200674TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
675 auto fixture = CreateVideoQualityTestFixture();
676 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700677 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200678 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
679 1000000, false, "VP8", 2, 1, 400000,
680 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100681 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700682 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
683 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200684 screenshare.config->loss_percent = 10;
685 screenshare.config->queue_delay_ms = 200;
686 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200687 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800688}
689
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200690TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
691 auto fixture = CreateVideoQualityTestFixture();
692 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700693 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200694 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
695 1000000, false, "VP8", 2, 1, 400000,
696 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100697 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700698 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
699 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200700 screenshare.config->loss_percent = 5;
701 screenshare.config->link_capacity_kbps = 200;
702 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700703
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200704 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700705}
706
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200707TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
708 auto fixture = CreateVideoQualityTestFixture();
709 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700710 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200711 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
712 1000000, false, "VP8", 2, 1, 400000,
713 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100714 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700715 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
716 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200717 screenshare.config->loss_percent = 1;
718 screenshare.config->link_capacity_kbps = 1200;
719 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700720
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200721 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700722}
723
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200724const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000725 true, 1280, 720, 30, 800000,
726 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200727 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800728
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200729const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000730 true, 1280, 720, 30, 800000,
731 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200732 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800733
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200734const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000735 true, 640, 360, 30, 150000,
736 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200737 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800738
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200739const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000740 true, 320, 180, 30, 30000,
741 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200742 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800743
Peter Boström12996152016-05-14 02:03:18 +0200744#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200745TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
746 auto fixture = CreateVideoQualityTestFixture();
747 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700748 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100749 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
750 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200751 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100752 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700753 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
754 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200755 screenshare.ss[0] = {
756 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
757 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200758 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000759}
ilnik2a8c2f52017-02-15 02:23:28 -0800760
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200761TEST(FullStackTest, VP9SVC_3SL_High) {
762 auto fixture = CreateVideoQualityTestFixture();
763 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800764 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100765 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800766 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
767 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200768
Sergey Silkin57027362018-05-15 09:12:05 +0200769 simulcast.ss[0] = {
770 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
771 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200772 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800773}
774
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200775TEST(FullStackTest, VP9SVC_3SL_Medium) {
776 auto fixture = CreateVideoQualityTestFixture();
777 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800778 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100779 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800780 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
781 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200782 simulcast.ss[0] = {
783 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
784 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200785 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800786}
787
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200788TEST(FullStackTest, VP9SVC_3SL_Low) {
789 auto fixture = CreateVideoQualityTestFixture();
790 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800791 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100792 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800793 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200794 simulcast.ss[0] = {
795 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
796 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200797 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800798}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200799
Sergey Silkin7f978f12018-09-10 12:01:49 +0000800// bugs.webrtc.org/9506
801#if !defined(WEBRTC_MAC)
802
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200803TEST(FullStackTest, VP9KSVC_3SL_High) {
804 auto fixture = CreateVideoQualityTestFixture();
805 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200806 simulcast.call.send_side_bwe = true;
807 simulcast.video[0] = kSvcVp9Video;
808 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
809 kFullStackTestDurationSecs};
810 simulcast.ss[0] = {
811 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
812 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200813 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200814}
815
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200816TEST(FullStackTest, VP9KSVC_3SL_Medium) {
817 auto fixture = CreateVideoQualityTestFixture();
818 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200819 simulcast.call.send_side_bwe = true;
820 simulcast.video[0] = kSvcVp9Video;
821 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
822 kFullStackTestDurationSecs};
823 simulcast.ss[0] = {
824 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
825 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200826 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200827}
828
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200829TEST(FullStackTest, VP9KSVC_3SL_Low) {
830 auto fixture = CreateVideoQualityTestFixture();
831 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200832 simulcast.call.send_side_bwe = true;
833 simulcast.video[0] = kSvcVp9Video;
834 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
835 kFullStackTestDurationSecs};
836 simulcast.ss[0] = {
837 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
838 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200839 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200840}
“Michael277a6562018-06-01 14:09:19 -0500841
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200842TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
843 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200844 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500845 simulcast.call.send_side_bwe = true;
846 simulcast.video[0] = kSvcVp9Video;
847 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
848 kFullStackTestDurationSecs};
849 simulcast.ss[0] = {
850 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
851 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200852 simulcast.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200853 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500854}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000855#endif // !defined(WEBRTC_MAC)
856
Peter Boström12996152016-05-14 02:03:18 +0200857#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800858
ilnik6b826ef2017-06-16 06:53:48 -0700859// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000860// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
861#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700862#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
863#else
864#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
865#endif
866
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200867TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
868 auto fixture = CreateVideoQualityTestFixture();
869 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700870 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100871 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
872 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200873 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700874 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
875 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200876 simulcast.config->loss_percent = 0;
877 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200878 std::vector<VideoStream> streams = {
879 VideoQualityTest::DefaultVideoStream(simulcast, 0),
880 VideoQualityTest::DefaultVideoStream(simulcast, 0),
881 VideoQualityTest::DefaultVideoStream(simulcast, 0)
882 };
Sergey Silkin57027362018-05-15 09:12:05 +0200883 simulcast.ss[0] = {
884 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
885 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200886 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
887 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200888 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700889}
890
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200891TEST(FullStackTest, SimulcastVP8_3SL_High) {
892 auto fixture = CreateVideoQualityTestFixture();
893 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800894 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100895 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800896 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800897 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200898 simulcast.config->loss_percent = 0;
899 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200900 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100901 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200902 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100903 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200904 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100905 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800906
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100907 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200908 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
909 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
910 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200911 simulcast.ss[0] = {
912 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
913 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200914 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800915}
916
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200917TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
918 auto fixture = CreateVideoQualityTestFixture();
919 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800920 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100921 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800922 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800923 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200924 simulcast.config->loss_percent = 0;
925 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200926 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100927 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200928 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100929 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200930 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100931 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800932
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100933 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200934 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
935 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
936 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200937 simulcast.ss[0] = {
938 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
939 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200940 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800941}
942
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200943TEST(FullStackTest, SimulcastVP8_3SL_Low) {
944 auto fixture = CreateVideoQualityTestFixture();
945 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800946 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100947 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800948 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800949 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200950 simulcast.config->loss_percent = 0;
951 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200952 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100953 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200954 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100955 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200956 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100957 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800958
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100959 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200960 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
961 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
962 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200963 simulcast.ss[0] = {
964 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
965 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200966 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800967}
968
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200969TEST(FullStackTest, LargeRoomVP8_5thumb) {
970 auto fixture = CreateVideoQualityTestFixture();
971 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800972 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100973 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800974 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
975 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200976 large_room.config->loss_percent = 0;
977 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200978 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100979 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200980 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100981 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200982 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100983 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -0800984
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100985 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200986 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
987 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
988 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -0700989 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +0200990 large_room.ss[0] = {
991 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
992 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200993 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -0800994}
995
oprypin743117f2017-09-15 05:24:24 -0700996#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
997// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -0800998// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
999#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001000#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001001#else
1002#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001003#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001004#endif
1005
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001006TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1007 auto fixture = CreateVideoQualityTestFixture();
1008 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001009 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001010 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001011 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1012 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001013 large_room.config->loss_percent = 0;
1014 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001015 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001016 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001017 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001018 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001019 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001020 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001021
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001022 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001023 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1024 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1025 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001026 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001027 large_room.ss[0] = {
1028 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1029 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001030 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001031}
1032
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001033TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1034 auto fixture = CreateVideoQualityTestFixture();
1035 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001036 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001037 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001038 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1039 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001040 large_room.config->loss_percent = 0;
1041 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001042 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001043 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001044 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001045 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001046 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001047 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001048
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001049 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001050 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1051 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1052 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001053 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001054 large_room.ss[0] = {
1055 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1056 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001057 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001058}
1059
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001060class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001061
1062// Disable dual video test on mobile device becuase it's too heavy.
1063#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1064TEST_P(DualStreamsTest,
1065 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1066 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001067 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1068 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001069 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001070 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001071
1072 // Screenshare Settings.
1073 dual_streams.screenshare[first_stream] = {true, false, 10};
1074 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1075 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001076 2, 400000, false, false, false,
1077 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001078
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001079 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001080 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1081 1000000, false, "VP8", 3, 0, 400000,
1082 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001083 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001084 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1085 1000000, false, "VP8", 2, 0, 400000,
1086 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001087 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001088 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1089 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001090
Sergey Silkin57027362018-05-15 09:12:05 +02001091 dual_streams.ss[first_stream] = {
1092 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1093 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001094
1095 // Video settings.
1096 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1097
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001098 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001099 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001100 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001101 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001102 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001103 video_params_low.video[0] = kSimulcastVp8VideoLow;
1104 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001105 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1106 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1107 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001108
1109 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001110 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1111 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001112
1113 // Call settings.
1114 dual_streams.call.send_side_bwe = true;
1115 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001116 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1117 std::to_string(first_stream);
1118 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001119 dual_streams.config->loss_percent = 1;
1120 dual_streams.config->link_capacity_kbps = 7500;
1121 dual_streams.config->queue_length_packets = 30;
1122 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001123
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001124 auto fixture = CreateVideoQualityTestFixture();
1125 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001126}
1127#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1128
1129TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001130 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001131 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001132 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001133 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001134
1135 // Screenshare Settings.
1136 dual_streams.screenshare[first_stream] = {true, false, 10};
1137 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1138 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001139 2, 400000, false, false, false,
1140 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001141 // Video settings.
1142 dual_streams.video[1 - first_stream] = {
1143 true, 1280, 720, 30, 150000,
1144 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001145 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001146
1147 // Call settings.
1148 dual_streams.call.send_side_bwe = true;
1149 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001150 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1151 std::to_string(first_stream);
1152 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001153 dual_streams.config->loss_percent = 1;
1154 dual_streams.config->link_capacity_kbps = 5000;
1155 dual_streams.config->queue_length_packets = 30;
1156 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001157
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001158 auto fixture = CreateVideoQualityTestFixture();
1159 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001160}
1161
1162INSTANTIATE_TEST_CASE_P(FullStackTest,
1163 DualStreamsTest,
1164 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001165
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001166} // namespace webrtc