blob: 32625128b6b5d379e7362080cffa0fcbabaf2cb3 [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
Emircan Uysaler0823eec2018-07-13 17:10:00 -070012#include "media/base/vp9_profile.h"
13#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssoncabe3832018-01-12 10:54:18 +010014#include "rtc_base/experiments/alr_experiment.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020015#include "rtc_base/flags.h"
Erik Språngb6b1cac2018-08-09 16:12:54 +020016#include "system_wrappers/include/field_trial_default.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020017#include "test/field_trial.h"
18#include "test/gtest.h"
19#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000020
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000021namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020022namespace flags {
23
Sebastian Janssonf8518882018-05-31 14:52:59 +020024DEFINE_string(rtc_event_log_name,
25 "",
26 "Filename for rtc event log. Two files "
27 "with \"_send\" and \"_recv\" suffixes will be created.");
28std::string RtcEventLogName() {
29 return static_cast<std::string>(FLAG_rtc_event_log_name);
30}
31DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream.");
32std::string RtpDumpName() {
33 return static_cast<std::string>(FLAG_rtp_dump_name);
34}
35DEFINE_string(encoded_frame_path,
36 "",
37 "The base path for encoded frame logs. Created files will have "
38 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
39std::string EncodedFramePath() {
40 return static_cast<std::string>(FLAG_encoded_frame_path);
41}
42} // namespace flags
43} // namespace webrtc
44
45namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000046
sprang89c4a7e2017-06-30 13:27:40 -070047namespace {
brandtrdd369c62016-11-16 23:56:57 -080048static const int kFullStackTestDurationSecs = 45;
Erik Språngb65aa012018-09-24 11:35:19 +020049const char kScreenshareSimulcastExperiment[] =
50 "WebRTC-SimulcastScreenshare/Enabled/";
Patrik Höglundb6b29e02018-06-21 16:58:01 +020051const char kPacerPushBackExperiment[] =
52 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000053
Patrik Höglundb6b29e02018-06-21 16:58:01 +020054struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000055 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020056 ParamsWithLogging() {
57 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020058 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
59 flags::EncodedFramePath()};
Artem Titovf18b3522018-08-28 16:54:24 +020060 this->config = DefaultNetworkSimulationConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000061 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000062};
63
Patrik Höglundb6b29e02018-06-21 16:58:01 +020064std::unique_ptr<VideoQualityTestFixtureInterface>
65CreateVideoQualityTestFixture() {
Karl Wiberg918f50c2018-07-05 11:40:33 +020066 return absl::make_unique<VideoQualityTest>(nullptr);
Patrik Höglundb6b29e02018-06-21 16:58:01 +020067}
68
Erik Språngb6b1cac2018-08-09 16:12:54 +020069// Takes the current active field trials set, and appends some new trials.
70std::string AppendFieldTrials(std::string new_trial_string) {
71 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
72}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020073} // namespace
74
sprangce4aef12015-11-02 07:23:20 -080075// VideoQualityTest::Params params = {
76// { ... }, // Common.
77// { ... }, // Video-specific settings.
78// { ... }, // Screenshare-specific settings.
79// { ... }, // Analyzer settings.
80// pipe, // FakeNetworkPipe::Config
81// { ... }, // Spatial scalability.
82// logs // bool
83// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000084
Peter Boström12996152016-05-14 02:03:18 +020085#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +020086TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
87 auto fixture = CreateVideoQualityTestFixture();
88 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080089 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +010090 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
91 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +020092 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -080093 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
94 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +020095 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -080096}
97
Lu Liu6f683242018-09-25 18:48:48 +000098TEST(FullStackTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +020099 auto fixture = CreateVideoQualityTestFixture();
100 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800101 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100102 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
103 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200104 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000105 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0,
106 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200107 foreman_cif.config->loss_percent = 5;
108 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200109 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800110}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800111
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700112TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
113 // Profile 2 might not be available on some platforms until
114 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
115 bool profile_2_is_supported = false;
116 for (const auto& codec : SupportedVP9Codecs()) {
117 if (ParseSdpForVP9Profile(codec.parameters)
118 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
119 profile_2_is_supported = true;
120 }
121 }
122 if (!profile_2_is_supported)
123 return;
124 auto fixture = CreateVideoQualityTestFixture();
125
126 SdpVideoFormat::Parameters vp92 = {
127 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
128 ParamsWithLogging generator;
129 generator.call.send_side_bwe = true;
130 generator.video[0] = {
131 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
132 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
133 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
134 kFullStackTestDurationSecs};
135 fixture->RunWithAnalyzer(generator);
136}
137
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200138TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
139 auto fixture = CreateVideoQualityTestFixture();
140 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800141 foreman_cif.call.send_side_bwe = true;
142 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
143 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200144 0, 0, false, false, false,
145 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800146 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
147 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200148 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800149}
150
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200151TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
152 auto fixture = CreateVideoQualityTestFixture();
153
154 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700155 generator.call.send_side_bwe = true;
156 generator.video[0] = {true, 352, 288, 30, 700000,
157 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200158 0, 0, false, false, false,
159 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700160 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
161 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200162 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800163}
164
Peter Boström12996152016-05-14 02:03:18 +0200165#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800166
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200167#if defined(WEBRTC_LINUX)
168// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
169#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
170#else
171#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
172#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200173TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
174 auto fixture = CreateVideoQualityTestFixture();
175 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700176 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100177 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
178 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200179 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700180 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
181 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200182 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000183}
184
Lu Liu6f683242018-09-25 18:48:48 +0000185TEST(FullStackTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200186 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000187 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200188 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700189 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100190 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
191 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200192 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000193 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0,
194 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200195 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000196}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000197
Lu Liu6f683242018-09-25 18:48:48 +0000198TEST(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200199 auto fixture = CreateVideoQualityTestFixture();
200 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800201 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100202 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
203 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200204 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000205 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0", 0.0, 0.0,
206 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200207 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800208}
209
Niels Möller6aa415e2018-06-07 11:14:13 +0200210// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200211TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
212 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200213 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200214 foreman_cif.call.send_side_bwe = true;
215 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
216 500000, 2000000, false, "VP8", 1,
217 0, 0, false, false, true, "foreman_cif"};
218 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
219 0.0, 0.0,
220 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200221 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200222 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200223}
224
Lu Liu6f683242018-09-25 18:48:48 +0000225TEST(FullStackTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200226 auto fixture = CreateVideoQualityTestFixture();
227 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700228 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100229 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
230 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200231 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000232 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
233 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200234 foreman_cif.config->loss_percent = 5;
235 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200236 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000237}
238
Lu Liu6f683242018-09-25 18:48:48 +0000239TEST(FullStackTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200240 auto fixture = CreateVideoQualityTestFixture();
241 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800242 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100243 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
244 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200245 0, 0, true, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000246 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0,
247 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200248 foreman_cif.config->loss_percent = 5;
249 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200250 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800251}
252
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200253TEST(FullStackTest, ForemanCifPlr5Flexfec) {
254 auto fixture = CreateVideoQualityTestFixture();
255 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800256 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100257 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
258 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200259 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800260 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
261 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200262 foreman_cif.config->loss_percent = 5;
263 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200264 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800265}
266
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200267TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
268 auto fixture = CreateVideoQualityTestFixture();
269 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700270 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100271 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
272 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200273 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700274 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
275 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200276 foreman_cif.config->loss_percent = 3;
277 foreman_cif.config->link_capacity_kbps = 500;
278 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200279 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700280}
281
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200282TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
283 auto fixture = CreateVideoQualityTestFixture();
284 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700285 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100286 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
287 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200288 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700289 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
290 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200291 foreman_cif.config->loss_percent = 3;
292 foreman_cif.config->link_capacity_kbps = 500;
293 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200294 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700295}
296
brandtrdd369c62016-11-16 23:56:57 -0800297#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200298TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
299 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800300 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200301 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, 700000,
304 700000, 700000, 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_net_delay_0_0_plr_0_H264", 0.0, 0.0,
307 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200308 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800309}
310
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200311TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
312 auto fixture = CreateVideoQualityTestFixture();
313 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800314 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100315 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
316 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200317 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800318 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
319 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200320 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800321}
322
Lu Liu6f683242018-09-25 18:48:48 +0000323TEST(FullStackTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200324 auto fixture = CreateVideoQualityTestFixture();
325 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800326 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100327 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
328 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200329 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000330 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0,
331 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200332 foreman_cif.config->loss_percent = 5;
333 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200334 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800335}
336
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200337TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
338 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100339 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200340 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100341
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200342 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100343 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100344 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
345 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200346 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100347 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
348 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200349 foreman_cif.config->loss_percent = 5;
350 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200351 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100352}
353
brandtrdd369c62016-11-16 23:56:57 -0800354// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200355TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
356 auto fixture = CreateVideoQualityTestFixture();
357 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800358 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100359 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
360 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200361 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800362 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
363 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200364 foreman_cif.config->loss_percent = 5;
365 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200366 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800367}
368
369// Ulpfec with H264 is an unsupported combination, so this test is only useful
370// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200371TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
372 auto fixture = CreateVideoQualityTestFixture();
373 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800374 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100375 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
376 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200377 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800378 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
379 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200380 foreman_cif.config->loss_percent = 5;
381 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200382 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800383}
384#endif // defined(WEBRTC_USE_H264)
385
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200386TEST(FullStackTest, ForemanCif500kbps) {
387 auto fixture = CreateVideoQualityTestFixture();
388 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700389 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100390 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
391 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200392 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700393 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
394 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200395 foreman_cif.config->queue_length_packets = 0;
396 foreman_cif.config->queue_delay_ms = 0;
397 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200398 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000399}
400
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200401TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
402 auto fixture = CreateVideoQualityTestFixture();
403 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700404 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100405 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
406 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200407 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700408 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
409 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200410 foreman_cif.config->queue_length_packets = 32;
411 foreman_cif.config->queue_delay_ms = 0;
412 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200413 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000414}
415
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200416TEST(FullStackTest, ForemanCif500kbps100ms) {
417 auto fixture = CreateVideoQualityTestFixture();
418 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700419 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100420 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
421 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200422 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700423 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
424 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200425 foreman_cif.config->queue_length_packets = 0;
426 foreman_cif.config->queue_delay_ms = 100;
427 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200428 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000429}
430
Lu Liu6f683242018-09-25 18:48:48 +0000431TEST(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200432 auto fixture = CreateVideoQualityTestFixture();
433 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700434 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100435 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
436 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200437 0, 0, false, false, false, "foreman_cif"};
Lu Liu6f683242018-09-25 18:48:48 +0000438 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
439 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200440 foreman_cif.config->queue_length_packets = 32;
441 foreman_cif.config->queue_delay_ms = 100;
442 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200443 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700444}
445
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200446TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
447 auto fixture = CreateVideoQualityTestFixture();
448 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800449 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100450 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
451 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200452 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800453 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
454 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200455 foreman_cif.config->queue_length_packets = 32;
456 foreman_cif.config->queue_delay_ms = 100;
457 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200458 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000459}
460
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200461TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
462 auto fixture = CreateVideoQualityTestFixture();
463 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700464 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100465 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
466 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200467 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700468 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
469 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200470 foreman_cif.config->queue_length_packets = 32;
471 foreman_cif.config->queue_delay_ms = 100;
472 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200473 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000474}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000475
sprangff19d352017-09-06 07:14:02 -0700476// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200477TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
478 auto fixture = CreateVideoQualityTestFixture();
479 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700480 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100481 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000482 true, 1280, 720, 50, 30000,
483 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200484 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700485 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
486 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200487 conf_motion_hd.config->queue_length_packets = 32;
488 conf_motion_hd.config->queue_delay_ms = 100;
489 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200490 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700491}
492
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200493TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
494 auto fixture = CreateVideoQualityTestFixture();
495 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700496 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100497 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000498 true, 1280, 720, 50, 30000,
499 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200500 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700501 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
502 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200503 conf_motion_hd.config->queue_length_packets = 50;
504 conf_motion_hd.config->loss_percent = 3;
505 conf_motion_hd.config->queue_delay_ms = 100;
506 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200507 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700508}
509
Lu Liu6f683242018-09-25 18:48:48 +0000510TEST(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200511 auto fixture = CreateVideoQualityTestFixture();
512 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700513 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100514 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000515 true, 1280, 720, 50, 30000,
516 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200517 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
Lu Liu6f683242018-09-25 18:48:48 +0000518 conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0,
519 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200520 conf_motion_hd.config->queue_length_packets = 50;
521 conf_motion_hd.config->loss_percent = 3;
522 conf_motion_hd.config->queue_delay_ms = 100;
523 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200524 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700525}
526
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200527TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
528 auto fixture = CreateVideoQualityTestFixture();
529 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700530 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100531 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000532 true, 1280, 720, 50, 30000,
533 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200534 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700535 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
536 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200537 conf_motion_hd.config->queue_length_packets = 50;
538 conf_motion_hd.config->loss_percent = 3;
539 conf_motion_hd.config->queue_delay_ms = 100;
540 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200541 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700542}
543
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200544TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
545 auto fixture = CreateVideoQualityTestFixture();
546 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700547 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100548 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000549 true, 1280, 720, 50, 30000,
550 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200551 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700552 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
553 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200554 conf_motion_hd.config->queue_length_packets = 50;
555 conf_motion_hd.config->loss_percent = 3;
556 conf_motion_hd.config->queue_delay_ms = 100;
557 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200558 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700559}
560
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200561TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
562 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200563 test::ScopedFieldTrials field_trial(
564 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200565 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700566 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100567 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000568 true, 1280, 720, 50, 30000,
569 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200570 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700571 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
572 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200573 conf_motion_hd.config->queue_length_packets = 50;
574 conf_motion_hd.config->loss_percent = 3;
575 conf_motion_hd.config->queue_delay_ms = 100;
576 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200577 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700578}
579
jianj390e64d2017-02-03 09:51:23 -0800580#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200581TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
582 auto fixture = CreateVideoQualityTestFixture();
583 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800584 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100585 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000586 true, 1280, 720, 50, 30000,
587 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200588 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800589 conf_motion_hd.analyzer = {
590 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
591 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200592 conf_motion_hd.config->queue_length_packets = 32;
593 conf_motion_hd.config->queue_delay_ms = 100;
594 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200595 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800596}
597#endif
598
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200599TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
600 auto fixture = CreateVideoQualityTestFixture();
601 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700602 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200603 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
604 1000000, false, "VP8", 2, 1, 400000,
605 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100606 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700607 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
608 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200609 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200610}
611
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200612TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
613 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb65aa012018-09-24 11:35:19 +0200614 test::ScopedFieldTrials field_trial(kScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200615 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800616 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100617 screenshare.screenshare[0] = {true, false, 10};
618 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
619 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200620 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800621 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
622 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200623 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200624 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
625 1000000, false, "VP8", 3, 0, 400000,
626 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800627 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200628 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
629 1000000, false, "VP8", 2, 0, 400000,
630 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800631
632 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200633 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
634 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200635 screenshare.ss[0] = {
636 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
637 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200638 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800639}
640
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200641TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
642 auto fixture = CreateVideoQualityTestFixture();
643 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700644 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200645 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
646 1000000, false, "VP8", 2, 1, 400000,
647 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100648 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700649 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
650 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200651 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700652}
653
Lu Liu6f683242018-09-25 18:48:48 +0000654TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200655 auto fixture = CreateVideoQualityTestFixture();
656 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700657 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200658 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
659 1000000, false, "VP8", 2, 1, 400000,
660 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100661 screenshare.screenshare[0] = {true, false, 10};
Lu Liu6f683242018-09-25 18:48:48 +0000662 screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
663 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200664 screenshare.config->loss_percent = 5;
665 screenshare.config->queue_delay_ms = 200;
666 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200667 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800668}
669
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200670TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
671 auto fixture = CreateVideoQualityTestFixture();
672 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700673 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200674 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
675 1000000, false, "VP8", 2, 1, 400000,
676 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100677 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700678 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
679 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200680 screenshare.config->loss_percent = 10;
681 screenshare.config->queue_delay_ms = 200;
682 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200683 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800684}
685
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200686TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
687 auto fixture = CreateVideoQualityTestFixture();
688 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700689 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200690 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
691 1000000, false, "VP8", 2, 1, 400000,
692 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100693 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700694 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
695 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200696 screenshare.config->loss_percent = 5;
697 screenshare.config->link_capacity_kbps = 200;
698 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700699
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200700 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700701}
702
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200703TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
704 auto fixture = CreateVideoQualityTestFixture();
705 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700706 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200707 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
708 1000000, false, "VP8", 2, 1, 400000,
709 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100710 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700711 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
712 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200713 screenshare.config->loss_percent = 1;
714 screenshare.config->link_capacity_kbps = 1200;
715 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700716
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200717 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700718}
719
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200720const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000721 true, 1280, 720, 30, 800000,
722 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200723 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800724
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200725const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000726 true, 1280, 720, 30, 800000,
727 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200728 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800729
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200730const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000731 true, 640, 360, 30, 150000,
732 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200733 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800734
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200735const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000736 true, 320, 180, 30, 30000,
737 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200738 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800739
Peter Boström12996152016-05-14 02:03:18 +0200740#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200741TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
742 auto fixture = CreateVideoQualityTestFixture();
743 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700744 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100745 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
746 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200747 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100748 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700749 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
750 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200751 screenshare.ss[0] = {
752 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
753 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200754 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000755}
ilnik2a8c2f52017-02-15 02:23:28 -0800756
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200757TEST(FullStackTest, VP9SVC_3SL_High) {
758 auto fixture = CreateVideoQualityTestFixture();
759 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800760 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100761 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800762 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
763 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200764
Sergey Silkin57027362018-05-15 09:12:05 +0200765 simulcast.ss[0] = {
766 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
767 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200768 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800769}
770
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200771TEST(FullStackTest, VP9SVC_3SL_Medium) {
772 auto fixture = CreateVideoQualityTestFixture();
773 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800774 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100775 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800776 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
777 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200778 simulcast.ss[0] = {
779 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
780 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200781 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800782}
783
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200784TEST(FullStackTest, VP9SVC_3SL_Low) {
785 auto fixture = CreateVideoQualityTestFixture();
786 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800787 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100788 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800789 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200790 simulcast.ss[0] = {
791 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
792 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200793 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800794}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200795
Sergey Silkin7f978f12018-09-10 12:01:49 +0000796// bugs.webrtc.org/9506
797#if !defined(WEBRTC_MAC)
798
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200799TEST(FullStackTest, VP9KSVC_3SL_High) {
800 auto fixture = CreateVideoQualityTestFixture();
801 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200802 simulcast.call.send_side_bwe = true;
803 simulcast.video[0] = kSvcVp9Video;
804 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
805 kFullStackTestDurationSecs};
806 simulcast.ss[0] = {
807 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
808 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200809 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200810}
811
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200812TEST(FullStackTest, VP9KSVC_3SL_Medium) {
813 auto fixture = CreateVideoQualityTestFixture();
814 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200815 simulcast.call.send_side_bwe = true;
816 simulcast.video[0] = kSvcVp9Video;
817 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
818 kFullStackTestDurationSecs};
819 simulcast.ss[0] = {
820 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
821 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200823}
824
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200825TEST(FullStackTest, VP9KSVC_3SL_Low) {
826 auto fixture = CreateVideoQualityTestFixture();
827 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200828 simulcast.call.send_side_bwe = true;
829 simulcast.video[0] = kSvcVp9Video;
830 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
831 kFullStackTestDurationSecs};
832 simulcast.ss[0] = {
833 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
834 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200835 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200836}
“Michael277a6562018-06-01 14:09:19 -0500837
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200838TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
839 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200840 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500841 simulcast.call.send_side_bwe = true;
842 simulcast.video[0] = kSvcVp9Video;
843 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
844 kFullStackTestDurationSecs};
845 simulcast.ss[0] = {
846 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
847 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200848 simulcast.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200849 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500850}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000851#endif // !defined(WEBRTC_MAC)
852
Peter Boström12996152016-05-14 02:03:18 +0200853#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800854
ilnik6b826ef2017-06-16 06:53:48 -0700855// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000856// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
857#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700858#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
859#else
860#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
861#endif
862
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200863TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
864 auto fixture = CreateVideoQualityTestFixture();
865 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700866 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100867 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
868 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200869 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700870 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
871 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200872 simulcast.config->loss_percent = 0;
873 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200874 std::vector<VideoStream> streams = {
875 VideoQualityTest::DefaultVideoStream(simulcast, 0),
876 VideoQualityTest::DefaultVideoStream(simulcast, 0),
877 VideoQualityTest::DefaultVideoStream(simulcast, 0)
878 };
Sergey Silkin57027362018-05-15 09:12:05 +0200879 simulcast.ss[0] = {
880 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
881 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200882 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
883 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200884 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700885}
886
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200887TEST(FullStackTest, SimulcastVP8_3SL_High) {
888 auto fixture = CreateVideoQualityTestFixture();
889 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800890 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100891 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800892 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800893 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200894 simulcast.config->loss_percent = 0;
895 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200896 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100897 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200898 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100899 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200900 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100901 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800902
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100903 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200904 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
905 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
906 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200907 simulcast.ss[0] = {
908 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
909 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200910 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800911}
912
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200913TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
914 auto fixture = CreateVideoQualityTestFixture();
915 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800916 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100917 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800918 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800919 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200920 simulcast.config->loss_percent = 0;
921 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200922 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100923 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200924 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100925 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200926 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100927 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800928
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100929 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200930 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
931 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
932 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200933 simulcast.ss[0] = {
934 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
935 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200936 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800937}
938
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200939TEST(FullStackTest, SimulcastVP8_3SL_Low) {
940 auto fixture = CreateVideoQualityTestFixture();
941 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800942 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100943 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800944 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800945 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200946 simulcast.config->loss_percent = 0;
947 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200948 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100949 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200950 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100951 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200952 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100953 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800954
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100955 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200956 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
957 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
958 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200959 simulcast.ss[0] = {
960 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
961 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200962 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800963}
964
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200965TEST(FullStackTest, LargeRoomVP8_5thumb) {
966 auto fixture = CreateVideoQualityTestFixture();
967 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800968 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100969 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800970 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
971 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200972 large_room.config->loss_percent = 0;
973 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200974 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100975 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200976 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100977 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200978 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100979 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -0800980
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100981 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200982 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
983 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
984 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -0700985 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +0200986 large_room.ss[0] = {
987 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
988 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200989 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -0800990}
991
oprypin743117f2017-09-15 05:24:24 -0700992#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
993// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -0800994// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
995#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -0800996#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -0800997#else
998#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -0800999#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001000#endif
1001
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001002TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1003 auto fixture = CreateVideoQualityTestFixture();
1004 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001005 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001006 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001007 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1008 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001009 large_room.config->loss_percent = 0;
1010 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001011 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001012 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001013 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001014 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001015 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001016 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001017
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001018 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001019 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1020 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1021 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001022 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001023 large_room.ss[0] = {
1024 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1025 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001026 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001027}
1028
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001029TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1030 auto fixture = CreateVideoQualityTestFixture();
1031 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001032 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001033 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001034 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1035 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001036 large_room.config->loss_percent = 0;
1037 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001038 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001039 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001040 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001041 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001042 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001043 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001044
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001045 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001046 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1047 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1048 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001049 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001050 large_room.ss[0] = {
1051 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1052 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001053 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001054}
1055
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001056class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001057
1058// Disable dual video test on mobile device becuase it's too heavy.
1059#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1060TEST_P(DualStreamsTest,
1061 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1062 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001063 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1064 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001065 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001066 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001067
1068 // Screenshare Settings.
1069 dual_streams.screenshare[first_stream] = {true, false, 10};
1070 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1071 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001072 2, 400000, false, false, false,
1073 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001074
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001075 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001076 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1077 1000000, false, "VP8", 3, 0, 400000,
1078 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001079 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001080 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1081 1000000, false, "VP8", 2, 0, 400000,
1082 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001083 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001084 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1085 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001086
Sergey Silkin57027362018-05-15 09:12:05 +02001087 dual_streams.ss[first_stream] = {
1088 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1089 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001090
1091 // Video settings.
1092 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1093
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001094 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001095 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001096 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001097 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001098 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001099 video_params_low.video[0] = kSimulcastVp8VideoLow;
1100 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)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001104
1105 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001106 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1107 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001108
1109 // Call settings.
1110 dual_streams.call.send_side_bwe = true;
1111 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001112 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1113 std::to_string(first_stream);
1114 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001115 dual_streams.config->loss_percent = 1;
1116 dual_streams.config->link_capacity_kbps = 7500;
1117 dual_streams.config->queue_length_packets = 30;
1118 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001119
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001120 auto fixture = CreateVideoQualityTestFixture();
1121 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001122}
1123#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1124
1125TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001126 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001127 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001128 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001129 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001130
1131 // Screenshare Settings.
1132 dual_streams.screenshare[first_stream] = {true, false, 10};
1133 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1134 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001135 2, 400000, false, false, false,
1136 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001137 // Video settings.
1138 dual_streams.video[1 - first_stream] = {
1139 true, 1280, 720, 30, 150000,
1140 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001141 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001142
1143 // Call settings.
1144 dual_streams.call.send_side_bwe = true;
1145 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001146 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1147 std::to_string(first_stream);
1148 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001149 dual_streams.config->loss_percent = 1;
1150 dual_streams.config->link_capacity_kbps = 5000;
1151 dual_streams.config->queue_length_packets = 30;
1152 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001153
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001154 auto fixture = CreateVideoQualityTestFixture();
1155 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001156}
1157
1158INSTANTIATE_TEST_CASE_P(FullStackTest,
1159 DualStreamsTest,
1160 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001161
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001162} // namespace webrtc