blob: 9c320d795f6984b143991618d1402e15829c0002 [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 kRoundRobinPacingQueueExperiment[] =
52 "WebRTC-RoundRobinPacing/Enabled/";
53const char kPacerPushBackExperiment[] =
54 "WebRTC-PacerPushbackExperiment/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000055
Patrik Höglundb6b29e02018-06-21 16:58:01 +020056struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000057 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020058 ParamsWithLogging() {
59 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020060 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
61 flags::EncodedFramePath()};
pbos@webrtc.org94015242013-10-16 11:05:37 +000062 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000063};
64
Patrik Höglundb6b29e02018-06-21 16:58:01 +020065std::unique_ptr<VideoQualityTestFixtureInterface>
66CreateVideoQualityTestFixture() {
Karl Wiberg918f50c2018-07-05 11:40:33 +020067 return absl::make_unique<VideoQualityTest>(nullptr);
Patrik Höglundb6b29e02018-06-21 16:58:01 +020068}
69
Erik Språngb6b1cac2018-08-09 16:12:54 +020070// Takes the current active field trials set, and appends some new trials.
71std::string AppendFieldTrials(std::string new_trial_string) {
72 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
73}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020074} // namespace
75
sprangce4aef12015-11-02 07:23:20 -080076// VideoQualityTest::Params params = {
77// { ... }, // Common.
78// { ... }, // Video-specific settings.
79// { ... }, // Screenshare-specific settings.
80// { ... }, // Analyzer settings.
81// pipe, // FakeNetworkPipe::Config
82// { ... }, // Spatial scalability.
83// logs // bool
84// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000085
Peter Boström12996152016-05-14 02:03:18 +020086#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +020087TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
88 auto fixture = CreateVideoQualityTestFixture();
89 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -080090 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +010091 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
92 700000, 700000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +020093 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -080094 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
95 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +020096 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -080097}
98
Patrik Höglundb6b29e02018-06-21 16:58:01 +020099TEST(FullStackTest, ForemanCifPlr5Vp9) {
100 auto fixture = CreateVideoQualityTestFixture();
101 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800102 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100103 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
104 500000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200105 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800106 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0,
107 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000108 foreman_cif.pipe.loss_percent = 5;
109 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200110 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800111}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800112
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700113TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
114 // Profile 2 might not be available on some platforms until
115 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
116 bool profile_2_is_supported = false;
117 for (const auto& codec : SupportedVP9Codecs()) {
118 if (ParseSdpForVP9Profile(codec.parameters)
119 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
120 profile_2_is_supported = true;
121 }
122 }
123 if (!profile_2_is_supported)
124 return;
125 auto fixture = CreateVideoQualityTestFixture();
126
127 SdpVideoFormat::Parameters vp92 = {
128 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
129 ParamsWithLogging generator;
130 generator.call.send_side_bwe = true;
131 generator.video[0] = {
132 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
133 1, 0, 0, false, false, false, "GeneratorI010", 0, vp92};
134 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
135 kFullStackTestDurationSecs};
136 fixture->RunWithAnalyzer(generator);
137}
138
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200139TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
140 auto fixture = CreateVideoQualityTestFixture();
141 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800142 foreman_cif.call.send_side_bwe = true;
143 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
144 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200145 0, 0, false, false, false,
146 "foreman_cif"};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800147 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
148 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200149 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800150}
151
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200152TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
153 auto fixture = CreateVideoQualityTestFixture();
154
155 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700156 generator.call.send_side_bwe = true;
157 generator.video[0] = {true, 352, 288, 30, 700000,
158 700000, 700000, false, "multiplex", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200159 0, 0, false, false, false,
160 "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700161 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
162 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200163 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800164}
165
Peter Boström12996152016-05-14 02:03:18 +0200166#endif // !defined(RTC_DISABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800167
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200168#if defined(WEBRTC_LINUX)
169// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
170#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
171#else
172#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
173#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200174TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
175 auto fixture = CreateVideoQualityTestFixture();
176 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700177 paris_qcif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100178 paris_qcif.video[0] = {true, 176, 144, 30, 300000,
179 300000, 300000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200180 0, 0, false, false, false, "paris_qcif"};
minyue626bc952016-10-31 05:47:02 -0700181 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
182 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200183 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000184}
185
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200186TEST(FullStackTest, ForemanCifWithoutPacketLoss) {
187 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000188 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200189 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700190 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100191 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
192 700000, 700000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200193 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700194 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0,
195 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200196 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000197}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000198
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200199TEST(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
200 auto fixture = CreateVideoQualityTestFixture();
201 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800202 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100203 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
204 30000, 30000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200205 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800206 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0", 0.0, 0.0,
207 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200208 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800209}
210
Niels Möller6aa415e2018-06-07 11:14:13 +0200211// Link capacity below default start rate. Automatic down scaling enabled.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200212TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
213 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200214 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200215 foreman_cif.call.send_side_bwe = true;
216 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
217 500000, 2000000, false, "VP8", 1,
218 0, 0, false, false, true, "foreman_cif"};
219 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
220 0.0, 0.0,
221 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000222 foreman_cif.pipe.link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200223 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200224}
225
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200226TEST(FullStackTest, ForemanCifPlr5) {
227 auto fixture = CreateVideoQualityTestFixture();
228 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700229 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100230 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
231 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200232 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700233 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
234 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000235 foreman_cif.pipe.loss_percent = 5;
236 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200237 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000238}
239
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200240TEST(FullStackTest, ForemanCifPlr5Ulpfec) {
241 auto fixture = CreateVideoQualityTestFixture();
242 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800243 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100244 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
245 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200246 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800247 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0,
248 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000249 foreman_cif.pipe.loss_percent = 5;
250 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200251 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800252}
253
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200254TEST(FullStackTest, ForemanCifPlr5Flexfec) {
255 auto fixture = CreateVideoQualityTestFixture();
256 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800257 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100258 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
259 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200260 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800261 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
262 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000263 foreman_cif.pipe.loss_percent = 5;
264 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200265 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800266}
267
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200268TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
269 auto fixture = CreateVideoQualityTestFixture();
270 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700271 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100272 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
273 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200274 0, 0, false, true, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700275 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
276 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000277 foreman_cif.pipe.loss_percent = 3;
278 foreman_cif.pipe.link_capacity_kbps = 500;
279 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200280 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700281}
282
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200283TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
284 auto fixture = CreateVideoQualityTestFixture();
285 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700286 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100287 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
288 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200289 0, 0, true, false, false, "foreman_cif"};
stefan889d9652017-07-05 03:03:02 -0700290 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
291 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000292 foreman_cif.pipe.loss_percent = 3;
293 foreman_cif.pipe.link_capacity_kbps = 500;
294 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200295 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700296}
297
brandtrdd369c62016-11-16 23:56:57 -0800298#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200299TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
300 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800301 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200302 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800303 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100304 foreman_cif.video[0] = {true, 352, 288, 30, 700000,
305 700000, 700000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200306 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800307 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
308 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200309 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800310}
311
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200312TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
313 auto fixture = CreateVideoQualityTestFixture();
314 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800315 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100316 foreman_cif.video[0] = {true, 352, 288, 10, 30000,
317 30000, 30000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200318 0, 0, false, false, false, "foreman_cif"};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800319 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
320 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200321 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800322}
323
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200324TEST(FullStackTest, ForemanCifPlr5H264) {
325 auto fixture = CreateVideoQualityTestFixture();
326 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800327 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100328 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
329 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200330 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800331 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0,
332 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000333 foreman_cif.pipe.loss_percent = 5;
334 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200335 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800336}
337
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200338TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
339 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100340 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200341 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100342
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200343 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100344 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100345 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
346 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200347 0, 0, false, false, false, "foreman_cif"};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100348 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
349 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000350 foreman_cif.pipe.loss_percent = 5;
351 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200352 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100353}
354
brandtrdd369c62016-11-16 23:56:57 -0800355// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200356TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
357 auto fixture = CreateVideoQualityTestFixture();
358 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800359 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100360 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
361 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200362 0, 0, false, true, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800363 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
364 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000365 foreman_cif.pipe.loss_percent = 5;
366 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200367 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800368}
369
370// Ulpfec with H264 is an unsupported combination, so this test is only useful
371// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200372TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
373 auto fixture = CreateVideoQualityTestFixture();
374 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800375 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100376 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
377 500000, 2000000, false, "H264", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200378 0, 0, true, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800379 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
380 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000381 foreman_cif.pipe.loss_percent = 5;
382 foreman_cif.pipe.queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200383 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800384}
385#endif // defined(WEBRTC_USE_H264)
386
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200387TEST(FullStackTest, ForemanCif500kbps) {
388 auto fixture = CreateVideoQualityTestFixture();
389 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700390 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100391 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
392 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200393 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700394 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
395 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000396 foreman_cif.pipe.queue_length_packets = 0;
397 foreman_cif.pipe.queue_delay_ms = 0;
398 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200399 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000400}
401
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200402TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
403 auto fixture = CreateVideoQualityTestFixture();
404 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700405 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100406 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
407 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200408 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700409 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
410 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000411 foreman_cif.pipe.queue_length_packets = 32;
412 foreman_cif.pipe.queue_delay_ms = 0;
413 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200414 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000415}
416
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200417TEST(FullStackTest, ForemanCif500kbps100ms) {
418 auto fixture = CreateVideoQualityTestFixture();
419 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700420 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100421 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
422 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200423 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700424 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
425 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000426 foreman_cif.pipe.queue_length_packets = 0;
427 foreman_cif.pipe.queue_delay_ms = 100;
428 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200429 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000430}
431
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200432TEST(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
433 auto fixture = CreateVideoQualityTestFixture();
434 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700435 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100436 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
437 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200438 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700439 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
440 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000441 foreman_cif.pipe.queue_length_packets = 32;
442 foreman_cif.pipe.queue_delay_ms = 100;
443 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200444 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700445}
446
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200447TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
448 auto fixture = CreateVideoQualityTestFixture();
449 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800450 foreman_cif.call.send_side_bwe = false;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100451 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
452 500000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200453 0, 0, false, false, false, "foreman_cif"};
brandtr93c5d032016-11-30 07:50:07 -0800454 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
455 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000456 foreman_cif.pipe.queue_length_packets = 32;
457 foreman_cif.pipe.queue_delay_ms = 100;
458 foreman_cif.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200459 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000460}
461
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200462TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
463 auto fixture = CreateVideoQualityTestFixture();
464 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700465 foreman_cif.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100466 foreman_cif.video[0] = {true, 352, 288, 30, 30000,
467 2000000, 2000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200468 0, 0, false, false, false, "foreman_cif"};
minyue626bc952016-10-31 05:47:02 -0700469 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
470 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000471 foreman_cif.pipe.queue_length_packets = 32;
472 foreman_cif.pipe.queue_delay_ms = 100;
473 foreman_cif.pipe.link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200474 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000475}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000476
sprangff19d352017-09-06 07:14:02 -0700477// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200478TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
479 auto fixture = CreateVideoQualityTestFixture();
480 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700481 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100482 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000483 true, 1280, 720, 50, 30000,
484 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200485 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
minyue626bc952016-10-31 05:47:02 -0700486 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
487 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000488 conf_motion_hd.pipe.queue_length_packets = 32;
489 conf_motion_hd.pipe.queue_delay_ms = 100;
490 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200491 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700492}
493
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200494TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
495 auto fixture = CreateVideoQualityTestFixture();
496 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700497 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100498 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000499 true, 1280, 720, 50, 30000,
500 3000000, 3000000, false, "VP8", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200501 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700502 conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
503 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000504 conf_motion_hd.pipe.queue_length_packets = 50;
505 conf_motion_hd.pipe.loss_percent = 3;
506 conf_motion_hd.pipe.queue_delay_ms = 100;
507 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200508 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700509}
510
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200511TEST(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
512 auto fixture = CreateVideoQualityTestFixture();
513 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700514 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100515 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000516 true, 1280, 720, 50, 30000,
517 3000000, 3000000, false, "VP8", 2,
Niels Möller6aa415e2018-06-07 11:14:13 +0200518 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700519 conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0,
520 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000521 conf_motion_hd.pipe.queue_length_packets = 50;
522 conf_motion_hd.pipe.loss_percent = 3;
523 conf_motion_hd.pipe.queue_delay_ms = 100;
524 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200525 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700526}
527
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200528TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
529 auto fixture = CreateVideoQualityTestFixture();
530 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700531 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100532 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000533 true, 1280, 720, 50, 30000,
534 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200535 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700536 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
537 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000538 conf_motion_hd.pipe.queue_length_packets = 50;
539 conf_motion_hd.pipe.loss_percent = 3;
540 conf_motion_hd.pipe.queue_delay_ms = 100;
541 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200542 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700543}
544
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200545TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
546 auto fixture = CreateVideoQualityTestFixture();
547 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700548 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100549 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000550 true, 1280, 720, 50, 30000,
551 3000000, 3000000, false, "VP8", 4,
Niels Möller6aa415e2018-06-07 11:14:13 +0200552 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700553 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
554 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000555 conf_motion_hd.pipe.queue_length_packets = 50;
556 conf_motion_hd.pipe.loss_percent = 3;
557 conf_motion_hd.pipe.queue_delay_ms = 100;
558 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200559 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700560}
561
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200562TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
563 auto fixture = CreateVideoQualityTestFixture();
Erik Språngb6b1cac2018-08-09 16:12:54 +0200564 test::ScopedFieldTrials field_trial(
565 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200566 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700567 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100568 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000569 true, 1280, 720, 50, 30000,
570 3000000, 3000000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200571 -1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
sprangff19d352017-09-06 07:14:02 -0700572 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
573 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000574 conf_motion_hd.pipe.queue_length_packets = 50;
575 conf_motion_hd.pipe.loss_percent = 3;
576 conf_motion_hd.pipe.queue_delay_ms = 100;
577 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200578 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700579}
580
jianj390e64d2017-02-03 09:51:23 -0800581#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200582TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
583 auto fixture = CreateVideoQualityTestFixture();
584 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800585 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100586 conf_motion_hd.video[0] = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000587 true, 1280, 720, 50, 30000,
588 3000000, 3000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200589 0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
jianj390e64d2017-02-03 09:51:23 -0800590 conf_motion_hd.analyzer = {
591 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
592 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000593 conf_motion_hd.pipe.queue_length_packets = 32;
594 conf_motion_hd.pipe.queue_delay_ms = 100;
595 conf_motion_hd.pipe.link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200596 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800597}
598#endif
599
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200600TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200601 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200602 auto fixture = CreateVideoQualityTestFixture();
603 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700604 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200605 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
606 1000000, false, "VP8", 2, 1, 400000,
607 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100608 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700609 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
610 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200611 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200612}
613
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200614TEST(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
615 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200616 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800617 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100618 screenshare.screenshare[0] = {true, false, 10};
619 screenshare.video[0] = {true, 1850, 1110, 5, 800000,
620 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200621 2, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800622 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
623 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200624 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +0200625 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
626 1000000, false, "VP8", 3, 0, 400000,
627 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800628 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +0200629 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
630 1000000, false, "VP8", 2, 0, 400000,
631 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800632
633 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200634 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
635 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200636 screenshare.ss[0] = {
637 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
638 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200639 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800640}
641
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200642TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200643 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
644
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200645 auto fixture = CreateVideoQualityTestFixture();
646 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700647 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200648 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
649 1000000, false, "VP8", 2, 1, 400000,
650 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100651 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700652 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
653 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200654 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700655}
656
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200657TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200658 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
659
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200660 auto fixture = CreateVideoQualityTestFixture();
661 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700662 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200663 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
664 1000000, false, "VP8", 2, 1, 400000,
665 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100666 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700667 screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
668 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000669 screenshare.pipe.loss_percent = 5;
670 screenshare.pipe.queue_delay_ms = 200;
671 screenshare.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200672 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800673}
674
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200675TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200676 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
677
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200678 auto fixture = CreateVideoQualityTestFixture();
679 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700680 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200681 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
682 1000000, false, "VP8", 2, 1, 400000,
683 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100684 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700685 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
686 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000687 screenshare.pipe.loss_percent = 10;
688 screenshare.pipe.queue_delay_ms = 200;
689 screenshare.pipe.link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200690 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800691}
692
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200693TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200694 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
695
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200696 auto fixture = CreateVideoQualityTestFixture();
697 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700698 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200699 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
700 1000000, false, "VP8", 2, 1, 400000,
701 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100702 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700703 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
704 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000705 screenshare.pipe.loss_percent = 5;
706 screenshare.pipe.link_capacity_kbps = 200;
707 screenshare.pipe.queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -0700708
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200709 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -0700710}
711
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200712TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
Ilya Nikolaevskiy3df1d5d2018-08-22 09:26:51 +0200713 test::ScopedFieldTrials field_trial(kNotScreenshareSimulcastExperiment);
714
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200715 auto fixture = CreateVideoQualityTestFixture();
716 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -0700717 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200718 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
719 1000000, false, "VP8", 2, 1, 400000,
720 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100721 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -0700722 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
723 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000724 screenshare.pipe.loss_percent = 1;
725 screenshare.pipe.link_capacity_kbps = 1200;
726 screenshare.pipe.queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -0700727
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200728 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -0700729}
730
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200731const ParamsWithLogging::Video kSvcVp9Video = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000732 true, 1280, 720, 30, 800000,
733 2500000, 2500000, false, "VP9", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200734 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800735
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200736const ParamsWithLogging::Video kSimulcastVp8VideoHigh = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000737 true, 1280, 720, 30, 800000,
738 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200739 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800740
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200741const ParamsWithLogging::Video kSimulcastVp8VideoMedium = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000742 true, 640, 360, 30, 150000,
743 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200744 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800745
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200746const ParamsWithLogging::Video kSimulcastVp8VideoLow = {
Rasmus Brandt31027342017-09-29 13:48:12 +0000747 true, 320, 180, 30, 30000,
748 150000, 200000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200749 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
ilnik566c43b2017-03-07 04:42:54 -0800750
Peter Boström12996152016-05-14 02:03:18 +0200751#if !defined(RTC_DISABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200752TEST(FullStackTest, ScreenshareSlidesVP9_2SL) {
753 auto fixture = CreateVideoQualityTestFixture();
754 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700755 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100756 screenshare.video[0] = {true, 1850, 1110, 5, 50000,
757 200000, 2000000, false, "VP9", 1,
Niels Möller6aa415e2018-06-07 11:14:13 +0200758 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100759 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700760 screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
761 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200762 screenshare.ss[0] = {
763 std::vector<VideoStream>(), 0, 2, 1, InterLayerPredMode::kOn,
764 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200765 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000766}
ilnik2a8c2f52017-02-15 02:23:28 -0800767
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200768TEST(FullStackTest, VP9SVC_3SL_High) {
769 auto fixture = CreateVideoQualityTestFixture();
770 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800771 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100772 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800773 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
774 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200775
Sergey Silkin57027362018-05-15 09:12:05 +0200776 simulcast.ss[0] = {
777 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
778 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200779 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800780}
781
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200782TEST(FullStackTest, VP9SVC_3SL_Medium) {
783 auto fixture = CreateVideoQualityTestFixture();
784 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800785 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100786 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800787 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
788 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200789 simulcast.ss[0] = {
790 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
791 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200792 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800793}
794
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200795TEST(FullStackTest, VP9SVC_3SL_Low) {
796 auto fixture = CreateVideoQualityTestFixture();
797 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -0800798 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100799 simulcast.video[0] = kSvcVp9Video;
ilnik2a8c2f52017-02-15 02:23:28 -0800800 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +0200801 simulcast.ss[0] = {
802 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
803 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200804 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -0800805}
Sergey Silkin0643fd62018-05-17 12:50:53 +0200806
Ilya Nikolaevskiy14ac7932018-07-12 10:39:41 +0200807// bugs.webrtc.org/9506
808#if !defined(WEBRTC_MAC)
809
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200810TEST(FullStackTest, VP9KSVC_3SL_High) {
811 auto fixture = CreateVideoQualityTestFixture();
812 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200813 simulcast.call.send_side_bwe = true;
814 simulcast.video[0] = kSvcVp9Video;
815 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
816 kFullStackTestDurationSecs};
817 simulcast.ss[0] = {
818 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
819 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200820 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200821}
822
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200823TEST(FullStackTest, VP9KSVC_3SL_Medium) {
824 auto fixture = CreateVideoQualityTestFixture();
825 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200826 simulcast.call.send_side_bwe = true;
827 simulcast.video[0] = kSvcVp9Video;
828 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
829 kFullStackTestDurationSecs};
830 simulcast.ss[0] = {
831 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
832 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200833 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200834}
835
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200836TEST(FullStackTest, VP9KSVC_3SL_Low) {
837 auto fixture = CreateVideoQualityTestFixture();
838 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +0200839 simulcast.call.send_side_bwe = true;
840 simulcast.video[0] = kSvcVp9Video;
841 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
842 kFullStackTestDurationSecs};
843 simulcast.ss[0] = {
844 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
845 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200846 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +0200847}
“Michael277a6562018-06-01 14:09:19 -0500848
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200849TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
850 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200851 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -0500852 simulcast.call.send_side_bwe = true;
853 simulcast.video[0] = kSvcVp9Video;
854 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
855 kFullStackTestDurationSecs};
856 simulcast.ss[0] = {
857 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
858 std::vector<SpatialLayer>(), false};
Artem Titov17790c32018-08-28 13:48:59 +0000859 simulcast.pipe.link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200860 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -0500861}
Ilya Nikolaevskiy14ac7932018-07-12 10:39:41 +0200862#endif // !defined(WEBRTC_MAC)
“Michael277a6562018-06-01 14:09:19 -0500863
Peter Boström12996152016-05-14 02:03:18 +0200864#endif // !defined(RTC_DISABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -0800865
ilnik6b826ef2017-06-16 06:53:48 -0700866// Android bots can't handle FullHD, so disable the test.
Sam Zackrissonc3d8bb12018-05-02 10:22:32 +0200867// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
868#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -0700869#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
870#else
871#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
872#endif
873
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200874TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
875 auto fixture = CreateVideoQualityTestFixture();
876 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -0700877 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100878 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
879 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +0200880 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -0700881 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
882 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000883 simulcast.pipe.loss_percent = 0;
884 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200885 std::vector<VideoStream> streams = {
886 VideoQualityTest::DefaultVideoStream(simulcast, 0),
887 VideoQualityTest::DefaultVideoStream(simulcast, 0),
888 VideoQualityTest::DefaultVideoStream(simulcast, 0)
889 };
Sergey Silkin57027362018-05-15 09:12:05 +0200890 simulcast.ss[0] = {
891 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
892 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +0200893 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
894 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200895 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -0700896}
897
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200898TEST(FullStackTest, SimulcastVP8_3SL_High) {
899 auto fixture = CreateVideoQualityTestFixture();
900 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800901 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100902 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800903 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800904 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000905 simulcast.pipe.loss_percent = 0;
906 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200907 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100908 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200909 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100910 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200911 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100912 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800913
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100914 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200915 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
916 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
917 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200918 simulcast.ss[0] = {
919 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
920 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200921 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800922}
923
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200924TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
925 auto fixture = CreateVideoQualityTestFixture();
926 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800927 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100928 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800929 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800930 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000931 simulcast.pipe.loss_percent = 0;
932 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200933 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100934 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200935 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100936 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200937 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100938 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800939
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100940 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200941 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
942 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
943 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200944 simulcast.ss[0] = {
945 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
946 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200947 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800948}
949
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200950TEST(FullStackTest, SimulcastVP8_3SL_Low) {
951 auto fixture = CreateVideoQualityTestFixture();
952 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -0800953 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100954 simulcast.video[0] = kSimulcastVp8VideoHigh;
ilnik2a8c2f52017-02-15 02:23:28 -0800955 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -0800956 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000957 simulcast.pipe.loss_percent = 0;
958 simulcast.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200959 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100960 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200961 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100962 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200963 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100964 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnik3dd5ad92017-02-09 04:58:53 -0800965
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100966 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200967 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
968 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
969 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200970 simulcast.ss[0] = {
971 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
972 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200973 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -0800974}
975
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200976TEST(FullStackTest, LargeRoomVP8_5thumb) {
977 auto fixture = CreateVideoQualityTestFixture();
978 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -0800979 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100980 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -0800981 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
982 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +0000983 large_room.pipe.loss_percent = 0;
984 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200985 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100986 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200987 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100988 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200989 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100990 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -0800991
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100992 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200993 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
994 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
995 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -0700996 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +0200997 large_room.ss[0] = {
998 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
999 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001000 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001001}
1002
oprypin743117f2017-09-15 05:24:24 -07001003#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1004// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001005// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1006#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001007#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001008#else
1009#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001010#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001011#endif
1012
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001013TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1014 auto fixture = CreateVideoQualityTestFixture();
1015 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001016 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001017 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001018 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1019 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +00001020 large_room.pipe.loss_percent = 0;
1021 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001022 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001023 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001024 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001025 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001026 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001027 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001028
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001029 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001030 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1031 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1032 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001033 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001034 large_room.ss[0] = {
1035 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1036 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001037 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001038}
1039
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001040TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1041 auto fixture = CreateVideoQualityTestFixture();
1042 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001043 large_room.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001044 large_room.video[0] = kSimulcastVp8VideoHigh;
ilnika014cc52017-03-07 04:21:04 -08001045 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1046 kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +00001047 large_room.pipe.loss_percent = 0;
1048 large_room.pipe.queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001049 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001050 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001051 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001052 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001053 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001054 video_params_low.video[0] = kSimulcastVp8VideoLow;
ilnika014cc52017-03-07 04:21:04 -08001055
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001056 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001057 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1058 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1059 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001060 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001061 large_room.ss[0] = {
1062 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1063 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001064 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001065}
1066
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001067class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001068
1069// Disable dual video test on mobile device becuase it's too heavy.
1070#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1071TEST_P(DualStreamsTest,
1072 ModeratelyRestricted_SlidesVp8_3TL_Simulcast_Video_Simulcast_High) {
1073 test::ScopedFieldTrials field_trial(
Erik Språngb6b1cac2018-08-09 16:12:54 +02001074 AppendFieldTrials(std::string(kRoundRobinPacingQueueExperiment) +
1075 std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001076 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001077 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001078
1079 // Screenshare Settings.
1080 dual_streams.screenshare[first_stream] = {true, false, 10};
1081 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1082 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001083 2, 400000, false, false, false,
1084 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001085
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001086 ParamsWithLogging screenshare_params_high;
Erik Språng28bb3912018-07-11 16:06:55 +02001087 screenshare_params_high.video[0] = {true, 1850, 1110, 5, 400000, 1000000,
1088 1000000, false, "VP8", 3, 0, 400000,
1089 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001090 VideoQualityTest::Params screenshare_params_low;
Erik Språng28bb3912018-07-11 16:06:55 +02001091 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1092 1000000, false, "VP8", 2, 0, 400000,
1093 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001094 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001095 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1096 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001097
Sergey Silkin57027362018-05-15 09:12:05 +02001098 dual_streams.ss[first_stream] = {
1099 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1100 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001101
1102 // Video settings.
1103 dual_streams.video[1 - first_stream] = kSimulcastVp8VideoHigh;
1104
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001105 ParamsWithLogging video_params_high;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001106 video_params_high.video[0] = kSimulcastVp8VideoHigh;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001107 ParamsWithLogging video_params_medium;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001108 video_params_medium.video[0] = kSimulcastVp8VideoMedium;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001109 ParamsWithLogging video_params_low;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001110 video_params_low.video[0] = kSimulcastVp8VideoLow;
1111 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001112 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1113 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1114 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001115
1116 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001117 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1118 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001119
1120 // Call settings.
1121 dual_streams.call.send_side_bwe = true;
1122 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001123 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1124 std::to_string(first_stream);
1125 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +00001126 dual_streams.pipe.loss_percent = 1;
1127 dual_streams.pipe.link_capacity_kbps = 7500;
1128 dual_streams.pipe.queue_length_packets = 30;
1129 dual_streams.pipe.queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001130
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001131 auto fixture = CreateVideoQualityTestFixture();
1132 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001133}
1134#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
1135
1136TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001137 test::ScopedFieldTrials field_trial(
Erik Språngb6b1cac2018-08-09 16:12:54 +02001138 AppendFieldTrials(std::string(kRoundRobinPacingQueueExperiment) +
1139 std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001140 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001141 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001142
1143 // Screenshare Settings.
1144 dual_streams.screenshare[first_stream] = {true, false, 10};
1145 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1146 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001147 2, 400000, false, false, false,
1148 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001149 // Video settings.
1150 dual_streams.video[1 - first_stream] = {
1151 true, 1280, 720, 30, 150000,
1152 500000, 700000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001153 2, 400000, false, false, false, "ConferenceMotion_1280_720_50"};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001154
1155 // Call settings.
1156 dual_streams.call.send_side_bwe = true;
1157 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001158 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1159 std::to_string(first_stream);
1160 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titov17790c32018-08-28 13:48:59 +00001161 dual_streams.pipe.loss_percent = 1;
1162 dual_streams.pipe.link_capacity_kbps = 5000;
1163 dual_streams.pipe.queue_length_packets = 30;
1164 dual_streams.pipe.queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001165
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001166 auto fixture = CreateVideoQualityTestFixture();
1167 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001168}
1169
1170INSTANTIATE_TEST_CASE_P(FullStackTest,
1171 DualStreamsTest,
1172 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001173
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001174} // namespace webrtc