blob: a27f0f6f5ebc024890c90cf32fba151ccbd09d85 [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;
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +020049const char kNotScreenshareSimulcastExperiment[] =
50 "WebRTC-SimulcastScreenshare/Disabled/";
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
Patrik Höglundb6b29e02018-06-21 16:58:01 +020098TEST(FullStackTest, ForemanCifPlr5Vp9) {
99 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"};
brandtr93c5d032016-11-30 07:50:07 -0800105 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200185TEST(FullStackTest, ForemanCifWithoutPacketLoss) {
186 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"};
minyue626bc952016-10-31 05:47:02 -0700193 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200198TEST(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
199 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"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800205 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200225TEST(FullStackTest, ForemanCifPlr5) {
226 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"};
minyue626bc952016-10-31 05:47:02 -0700232 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200239TEST(FullStackTest, ForemanCifPlr5Ulpfec) {
240 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"};
brandtr93c5d032016-11-30 07:50:07 -0800246 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200323TEST(FullStackTest, ForemanCifPlr5H264) {
324 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"};
brandtr93c5d032016-11-30 07:50:07 -0800330 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200431TEST(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
432 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"};
minyue626bc952016-10-31 05:47:02 -0700438 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200510TEST(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
511 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"};
sprangff19d352017-09-06 07:14:02 -0700518 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) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200600 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200601 auto fixture = CreateVideoQualityTestFixture();
602 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700603 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200604 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
605 1000000, false, "VP8", 2, 1, 400000,
606 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100607 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700608 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
609 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200610 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200611}
612
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200613TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
614 auto fixture = CreateVideoQualityTestFixture();
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) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200642 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
643
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200644 auto fixture = CreateVideoQualityTestFixture();
645 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700646 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200647 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
648 1000000, false, "VP8", 2, 1, 400000,
649 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100650 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700651 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
652 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200653 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700654}
655
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200656TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200657 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
658
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};
minyue626bc952016-10-31 05:47:02 -0700666 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) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200675 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
676
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200677 auto fixture = CreateVideoQualityTestFixture();
678 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700679 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200680 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
681 1000000, false, "VP8", 2, 1, 400000,
682 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100683 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700684 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
685 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200686 screenshare.config->loss_percent = 10;
687 screenshare.config->queue_delay_ms = 200;
688 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200689 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800690}
691
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200692TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200693 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
694
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200695 auto fixture = CreateVideoQualityTestFixture();
696 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700697 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200698 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
699 1000000, false, "VP8", 2, 1, 400000,
700 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100701 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700702 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
703 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200704 screenshare.config->loss_percent = 5;
705 screenshare.config->link_capacity_kbps = 200;
706 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700707
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200708 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700709}
710
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200711TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200712 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
713
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200714 auto fixture = CreateVideoQualityTestFixture();
715 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700716 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200717 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
718 1000000, false, "VP8", 2, 1, 400000,
719 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100720 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700721 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
722 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200723 screenshare.config->loss_percent = 1;
724 screenshare.config->link_capacity_kbps = 1200;
725 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700726
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200727 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700728}
729
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200730const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000731 true, 1280, 720, 30, 800000,
732 2500000, 2500000, false, "VP9", 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 kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000736 true, 1280, 720, 30, 800000,
737 2500000, 2500000, 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
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200740const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000741 true, 640, 360, 30, 150000,
742 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200743 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800744
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200745const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000746 true, 320, 180, 30, 30000,
747 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200748 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800749
Peter Boström12996152016-05-14 02:03:18 +0200750#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200751TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
752 auto fixture = CreateVideoQualityTestFixture();
753 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700754 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100755 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
756 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200757 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100758 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700759 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
760 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200761 screenshare.ss[0] = {
762 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
763 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200764 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000765}
ilnik2a8c2f52017-02-15 02:23:28 -0800766
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200767TEST(FullStackTest, VP9SVC_3SL_High) {
768 auto fixture = CreateVideoQualityTestFixture();
769 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800770 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100771 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800772 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
773 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200774
Sergey Silkin57027362018-05-15 09:12:05 +0200775 simulcast.ss[0] = {
776 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
777 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200778 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800779}
780
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200781TEST(FullStackTest, VP9SVC_3SL_Medium) {
782 auto fixture = CreateVideoQualityTestFixture();
783 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800784 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100785 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800786 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
787 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200788 simulcast.ss[0] = {
789 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
790 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200791 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800792}
793
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200794TEST(FullStackTest, VP9SVC_3SL_Low) {
795 auto fixture = CreateVideoQualityTestFixture();
796 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800797 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100798 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800799 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200800 simulcast.ss[0] = {
801 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
802 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200803 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800804}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200805
Sergey Silkin7f978f12018-09-10 12:01:49 +0000806// bugs.webrtc.org/9506
807#if !defined(WEBRTC_MAC)
808
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200809TEST(FullStackTest, VP9KSVC_3SL_High) {
810 auto fixture = CreateVideoQualityTestFixture();
811 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200812 simulcast.call.send_side_bwe = true;
813 simulcast.video[0] = kSvcVp9Video;
814 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
815 kFullStackTestDurationSecs};
816 simulcast.ss[0] = {
817 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
818 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200819 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200820}
821
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822TEST(FullStackTest, VP9KSVC_3SL_Medium) {
823 auto fixture = CreateVideoQualityTestFixture();
824 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200825 simulcast.call.send_side_bwe = true;
826 simulcast.video[0] = kSvcVp9Video;
827 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
828 kFullStackTestDurationSecs};
829 simulcast.ss[0] = {
830 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
831 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200832 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200833}
834
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200835TEST(FullStackTest, VP9KSVC_3SL_Low) {
836 auto fixture = CreateVideoQualityTestFixture();
837 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200838 simulcast.call.send_side_bwe = true;
839 simulcast.video[0] = kSvcVp9Video;
840 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
841 kFullStackTestDurationSecs};
842 simulcast.ss[0] = {
843 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
844 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200845 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200846}
“Michael277a6562018-06-01 14:09:19 -0500847
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200848TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
849 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200850 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500851 simulcast.call.send_side_bwe = true;
852 simulcast.video[0] = kSvcVp9Video;
853 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
854 kFullStackTestDurationSecs};
855 simulcast.ss[0] = {
856 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
857 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +0200858 simulcast.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200859 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500860}
Sergey Silkin7f978f12018-09-10 12:01:49 +0000861#endif // !defined(WEBRTC_MAC)
862
Peter Boström12996152016-05-14 02:03:18 +0200863#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800864
ilnik6b826ef2017-06-16 06:53:48 -0700865// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +0000866// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
867#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700868#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
869#else
870#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
871#endif
872
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200873TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
874 auto fixture = CreateVideoQualityTestFixture();
875 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700876 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100877 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
878 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200879 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700880 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
881 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200882 simulcast.config->loss_percent = 0;
883 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200884 std::vector<VideoStream> streams = {
885 VideoQualityTest::DefaultVideoStream(simulcast, 0),
886 VideoQualityTest::DefaultVideoStream(simulcast, 0),
887 VideoQualityTest::DefaultVideoStream(simulcast, 0)
888 };
Sergey Silkin57027362018-05-15 09:12:05 +0200889 simulcast.ss[0] = {
890 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
891 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200892 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
893 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200894 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700895}
896
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200897TEST(FullStackTest, SimulcastVP8_3SL_High) {
898 auto fixture = CreateVideoQualityTestFixture();
899 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800900 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100901 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800902 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800903 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200904 simulcast.config->loss_percent = 0;
905 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200906 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100907 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200908 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100909 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200910 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100911 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800912
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100913 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200914 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
915 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
916 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200917 simulcast.ss[0] = {
918 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
919 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200920 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800921}
922
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200923TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
924 auto fixture = CreateVideoQualityTestFixture();
925 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800926 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100927 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800928 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800929 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200930 simulcast.config->loss_percent = 0;
931 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200932 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100933 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200934 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100935 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200936 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100937 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800938
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100939 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200940 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
941 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
942 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200943 simulcast.ss[0] = {
944 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
945 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200946 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800947}
948
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200949TEST(FullStackTest, SimulcastVP8_3SL_Low) {
950 auto fixture = CreateVideoQualityTestFixture();
951 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800952 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100953 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800954 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800955 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200956 simulcast.config->loss_percent = 0;
957 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200958 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100959 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200960 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100961 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200962 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100963 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800964
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100965 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200966 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
967 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
968 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200969 simulcast.ss[0] = {
970 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
971 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200972 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800973}
974
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200975TEST(FullStackTest, LargeRoomVP8_5thumb) {
976 auto fixture = CreateVideoQualityTestFixture();
977 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800978 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100979 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800980 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
981 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200982 large_room.config->loss_percent = 0;
983 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200984 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100985 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200986 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100987 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200988 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100989 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -0800990
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100991 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200992 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
993 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
994 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -0700995 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +0200996 large_room.ss[0] = {
997 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
998 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200999 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001000}
1001
oprypin743117f2017-09-15 05:24:24 -07001002#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1003// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001004// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1005#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001006#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001007#else
1008#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001009#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001010#endif
1011
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001012TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1013 auto fixture = CreateVideoQualityTestFixture();
1014 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001015 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001016 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001017 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1018 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001019 large_room.config->loss_percent = 0;
1020 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001021 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001022 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001023 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001024 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001025 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001026 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001027
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001028 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001029 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1030 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1031 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001032 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001033 large_room.ss[0] = {
1034 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1035 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001036 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001037}
1038
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001039TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1040 auto fixture = CreateVideoQualityTestFixture();
1041 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001042 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001043 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001044 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1045 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001046 large_room.config->loss_percent = 0;
1047 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001048 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001049 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001050 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001051 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001052 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001053 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001054
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001055 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001056 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1057 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1058 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001059 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001060 large_room.ss[0] = {
1061 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1062 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001063 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001064}
1065
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001066class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001067
1068// Disable dual video test on mobile device becuase it's too heavy.
1069#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1070TEST_P(DualStreamsTest,
1071 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1072 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001073 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001074 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001075 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001076
1077 // Screenshare Settings.
1078 dual_streams.screenshare[first_stream] = {true, false, 10};
1079 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1080 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001081 2, 400000, false, false, false,
1082 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001083
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001084 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001085 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1086 1000000, false, "VP8", 3, 0, 400000,
1087 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001088 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001089 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1090 1000000, false, "VP8", 2, 0, 400000,
1091 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001092 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001093 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1094 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001095
Sergey Silkin57027362018-05-15 09:12:05 +02001096 dual_streams.ss[first_stream] = {
1097 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1098 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001099
1100 // Video settings.
1101 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1102
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001103 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001104 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001105 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001106 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001107 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001108 video_params_low.video[0] = kSimulcastVp8VideoLow;
1109 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001110 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1111 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1112 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001113
1114 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001115 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1116 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001117
1118 // Call settings.
1119 dual_streams.call.send_side_bwe = true;
1120 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001121 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1122 std::to_string(first_stream);
1123 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001124 dual_streams.config->loss_percent = 1;
1125 dual_streams.config->link_capacity_kbps = 7500;
1126 dual_streams.config->queue_length_packets = 30;
1127 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001128
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001129 auto fixture = CreateVideoQualityTestFixture();
1130 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001131}
1132#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1133
1134TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001135 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001136 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001137 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001138 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001139
1140 // Screenshare Settings.
1141 dual_streams.screenshare[first_stream] = {true, false, 10};
1142 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1143 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001144 2, 400000, false, false, false,
1145 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001146 // Video settings.
1147 dual_streams.video[1 - first_stream] = {
1148 true, 1280, 720, 30, 150000,
1149 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001150 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001151
1152 // Call settings.
1153 dual_streams.call.send_side_bwe = true;
1154 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001155 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1156 std::to_string(first_stream);
1157 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001158 dual_streams.config->loss_percent = 1;
1159 dual_streams.config->link_capacity_kbps = 5000;
1160 dual_streams.config->queue_length_packets = 30;
1161 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001162
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001163 auto fixture = CreateVideoQualityTestFixture();
1164 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001165}
1166
1167INSTANTIATE_TEST_CASE_P(FullStackTest,
1168 DualStreamsTest,
1169 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001170
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001171} // namespace webrtc