blob: 5738f8b7f36ce7e856d1410fcc3bd1ea20261dfc [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 */
Yves Gerey3e707812018-11-28 16:47:49 +010010#include <memory>
11#include <string>
12#include <utility>
13#include <vector>
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000014
Yves Gerey3e707812018-11-28 16:47:49 +010015#include "absl/memory/memory.h"
16#include "absl/types/optional.h"
17#include "api/test/simulated_network.h"
Patrik Höglundd8f3c172018-09-26 14:39:17 +020018#include "api/test/test_dependency_factory.h"
Yves Gerey3e707812018-11-28 16:47:49 +010019#include "api/test/video_quality_test_fixture.h"
20#include "api/video_codecs/sdp_video_format.h"
21#include "api/video_codecs/video_codec.h"
22#include "api/video_codecs/video_encoder_config.h"
Emircan Uysaler0823eec2018-07-13 17:10:00 -070023#include "media/base/vp9_profile.h"
24#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020025#include "rtc_base/flags.h"
Mirko Bonadei17f48782018-09-28 08:51:10 +020026#include "system_wrappers/include/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020027#include "test/field_trial.h"
28#include "test/gtest.h"
Rasmus Brandt3c589be2019-03-13 11:32:40 +010029#include "test/testsupport/file_utils.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020030#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000031
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000032namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020033namespace flags {
34
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020035WEBRTC_DEFINE_string(rtc_event_log_name,
36 "",
37 "Filename for rtc event log. Two files "
38 "with \"_send\" and \"_recv\" suffixes will be created.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020039std::string RtcEventLogName() {
40 return static_cast<std::string>(FLAG_rtc_event_log_name);
41}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020042WEBRTC_DEFINE_string(rtp_dump_name,
43 "",
44 "Filename for dumped received RTP stream.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020045std::string RtpDumpName() {
46 return static_cast<std::string>(FLAG_rtp_dump_name);
47}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020048WEBRTC_DEFINE_string(
49 encoded_frame_path,
50 "",
51 "The base path for encoded frame logs. Created files will have "
52 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
Sebastian Janssonf8518882018-05-31 14:52:59 +020053std::string EncodedFramePath() {
54 return static_cast<std::string>(FLAG_encoded_frame_path);
55}
56} // namespace flags
57} // namespace webrtc
58
59namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000060
sprang89c4a7e2017-06-30 13:27:40 -070061namespace {
brandtrdd369c62016-11-16 23:56:57 -080062static const int kFullStackTestDurationSecs = 45;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020063const char kPacerPushBackExperiment[] =
64 "WebRTC-PacerPushbackExperiment/Enabled/";
Erik Språngd3438aa2018-11-08 16:56:43 +010065const char kVp8TrustedRateControllerFieldTrial[] =
66 "WebRTC-LibvpxVp8TrustedRateController/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000067
Patrik Höglundb6b29e02018-06-21 16:58:01 +020068struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000069 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020070 ParamsWithLogging() {
71 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020072 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
73 flags::EncodedFramePath()};
Artem Titov75e36472018-10-08 12:28:56 +020074 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000075 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000076};
77
Patrik Höglundb6b29e02018-06-21 16:58:01 +020078std::unique_ptr<VideoQualityTestFixtureInterface>
79CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020080 // The components will normally be nullptr (= use defaults), but it's possible
81 // for external test runners to override the list of injected components.
82 auto components = TestDependencyFactory::GetInstance().CreateComponents();
83 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020084}
85
Erik Språngb6b1cac2018-08-09 16:12:54 +020086// Takes the current active field trials set, and appends some new trials.
87std::string AppendFieldTrials(std::string new_trial_string) {
88 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
89}
Rasmus Brandt3c589be2019-03-13 11:32:40 +010090
91std::string ClipNameToClipPath(const char* clip_name) {
92 return test::ResourcePath(clip_name, "yuv");
93}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020094} // namespace
95
sprangce4aef12015-11-02 07:23:20 -080096// VideoQualityTest::Params params = {
97// { ... }, // Common.
98// { ... }, // Video-specific settings.
99// { ... }, // Screenshare-specific settings.
100// { ... }, // Analyzer settings.
101// pipe, // FakeNetworkPipe::Config
102// { ... }, // Spatial scalability.
103// logs // bool
104// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000105
philipeldd8b0d82018-09-27 11:18:10 +0200106class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
107 public:
philipelf638bbc2018-10-04 16:57:12 +0200108 GenericDescriptorTest()
Ilya Nikolaevskiy0500b522019-01-22 11:12:51 +0100109 : field_trial_(AppendFieldTrials(GetParam())),
philipelf638bbc2018-10-04 16:57:12 +0200110 generic_descriptor_enabled_(
111 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +0200112
113 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +0200114 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +0200115 base += "_generic_descriptor";
116 return base;
117 }
118
philipelf638bbc2018-10-04 16:57:12 +0200119 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
120
philipeldd8b0d82018-09-27 11:18:10 +0200121 private:
122 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200123 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200124};
125
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100126#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200127TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
128 auto fixture = CreateVideoQualityTestFixture();
129 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800130 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100131 foreman_cif.video[0] = {
132 true, 352, 288, 30,
133 700000, 700000, 700000, false,
134 "VP9", 1, 0, 0,
135 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800136 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
137 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200138 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800139}
140
philipeldd8b0d82018-09-27 11:18:10 +0200141TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200142 auto fixture = CreateVideoQualityTestFixture();
143 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800144 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100145 foreman_cif.video[0] = {
146 true, 352, 288, 30,
147 30000, 500000, 2000000, false,
148 "VP9", 1, 0, 0,
149 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200150 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
151 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200152 foreman_cif.config->loss_percent = 5;
153 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200154 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200155 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800156}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800157
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700158TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
159 // Profile 2 might not be available on some platforms until
160 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
161 bool profile_2_is_supported = false;
162 for (const auto& codec : SupportedVP9Codecs()) {
163 if (ParseSdpForVP9Profile(codec.parameters)
164 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
165 profile_2_is_supported = true;
166 }
167 }
168 if (!profile_2_is_supported)
169 return;
170 auto fixture = CreateVideoQualityTestFixture();
171
172 SdpVideoFormat::Parameters vp92 = {
173 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
174 ParamsWithLogging generator;
175 generator.call.send_side_bwe = true;
176 generator.video[0] = {
177 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100178 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700179 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
180 kFullStackTestDurationSecs};
181 fixture->RunWithAnalyzer(generator);
182}
183
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200184TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
185 auto fixture = CreateVideoQualityTestFixture();
186 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800187 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100188 foreman_cif.video[0] = {
189 true, 352, 288, 30,
190 700000, 700000, 700000, false,
191 "multiplex", 1, 0, 0,
192 false, false, false, ClipNameToClipPath("foreman_cif")};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800193 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
194 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200195 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800196}
197
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200198TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
199 auto fixture = CreateVideoQualityTestFixture();
200
201 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700202 generator.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100203 generator.video[0] = {
204 true, 352, 288, 30, 700000, 700000, 700000, false,
205 "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700206 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
207 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200208 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800209}
210
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100211#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800212
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200213#if defined(WEBRTC_LINUX)
214// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
215#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
216#else
217#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
218#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200219TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
220 auto fixture = CreateVideoQualityTestFixture();
221 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700222 paris_qcif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100223 paris_qcif.video[0] = {
224 true, 176, 144, 30,
225 300000, 300000, 300000, false,
226 "VP8", 1, 0, 0,
227 false, false, true, ClipNameToClipPath("paris_qcif")};
minyue626bc952016-10-31 05:47:02 -0700228 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
229 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200230 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000231}
232
philipeldd8b0d82018-09-27 11:18:10 +0200233TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200234 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000235 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200236 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700237 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100238 foreman_cif.video[0] = {
239 true, 352, 288, 30,
240 700000, 700000, 700000, false,
241 "VP8", 1, 0, 0,
242 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200243 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
244 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200245 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200246 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000247}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000248
philipeldd8b0d82018-09-27 11:18:10 +0200249TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200250 auto fixture = CreateVideoQualityTestFixture();
251 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800252 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100253 foreman_cif.video[0] = {
254 true, 352, 288, 10,
255 30000, 30000, 30000, false,
256 "VP8", 1, 0, 0,
257 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200258 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
259 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200260 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200261 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800262}
263
Erik Språngd3438aa2018-11-08 16:56:43 +0100264// TODO(webrtc:9722): Remove when experiment is cleaned up.
265TEST_P(GenericDescriptorTest,
266 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
267 test::ScopedFieldTrials override_field_trials(
268 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
269 auto fixture = CreateVideoQualityTestFixture();
270
271 ParamsWithLogging foreman_cif;
272 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100273 foreman_cif.video[0] = {
274 true, 352, 288, 10,
275 30000, 30000, 30000, false,
276 "VP8", 1, 0, 0,
277 false, false, true, ClipNameToClipPath("foreman_cif")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100278 foreman_cif.analyzer = {
279 GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"),
280 0.0, 0.0, kFullStackTestDurationSecs};
281 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
282 fixture->RunWithAnalyzer(foreman_cif);
283}
284
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100285// Link capacity below default start rate.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200286TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
287 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200288 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200289 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100290 foreman_cif.video[0] = {
291 true, 352, 288, 30,
292 30000, 500000, 2000000, false,
293 "VP8", 1, 0, 0,
294 false, false, true, ClipNameToClipPath("foreman_cif")};
Niels Möller6aa415e2018-06-07 11:14:13 +0200295 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
296 0.0, 0.0,
297 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200298 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200299 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200300}
301
Erik Språng616b2332019-02-11 14:16:28 +0100302// Restricted network and encoder overproducing by 30%.
303TEST(FullStackTest, ForemanCifLink150kbpsBadRateController) {
304 auto fixture = CreateVideoQualityTestFixture();
305 ParamsWithLogging foreman_cif;
306 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100307 foreman_cif.video[0] = {
308 true, 352, 288, 30,
309 30000, 500000, 2000000, false,
310 "VP8", 1, 0, 0,
311 false, false, true, ClipNameToClipPath("foreman_cif"),
312 0, {}, 1.30};
Erik Språng616b2332019-02-11 14:16:28 +0100313 foreman_cif.analyzer = {
314 "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
315 kFullStackTestDurationSecs};
316 foreman_cif.config->link_capacity_kbps = 150;
317 foreman_cif.config->queue_length_packets = 30;
318 foreman_cif.config->queue_delay_ms = 100;
319 fixture->RunWithAnalyzer(foreman_cif);
320}
321
Erik Språng8b8d01a2019-03-02 20:54:55 +0100322// Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
323// Packet rate and loss are low enough that loss will happen with ~3s interval.
324// This triggers protection overhead to toggle between zero and non-zero.
325// Link queue is restrictive enough to trigger loss on probes.
326TEST(FullStackTest, ForemanCifMediaCapacitySmallLossAndQueue) {
327 auto fixture = CreateVideoQualityTestFixture();
328 ParamsWithLogging foreman_cif;
329 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100330 foreman_cif.video[0] = {
331 true, 352, 288, 30,
332 30000, 500000, 2000000, false,
333 "VP8", 1, 0, 0,
334 false, false, true, ClipNameToClipPath("foreman_cif"),
335 0, {}, 1.30};
Erik Språng8b8d01a2019-03-02 20:54:55 +0100336 foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
337 0.0, 0.0, kFullStackTestDurationSecs};
338 foreman_cif.config->link_capacity_kbps = 250;
339 foreman_cif.config->queue_length_packets = 10;
340 foreman_cif.config->queue_delay_ms = 100;
341 foreman_cif.config->loss_percent = 1;
342 fixture->RunWithAnalyzer(foreman_cif);
343}
344
philipeldd8b0d82018-09-27 11:18:10 +0200345TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200346 auto fixture = CreateVideoQualityTestFixture();
347 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700348 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100349 foreman_cif.video[0] = {
350 true, 352, 288, 30,
351 30000, 500000, 2000000, false,
352 "VP8", 1, 0, 0,
353 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200354 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000355 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200356 foreman_cif.config->loss_percent = 5;
357 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200358 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200359 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000360}
361
philipeldd8b0d82018-09-27 11:18:10 +0200362TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200363 auto fixture = CreateVideoQualityTestFixture();
364 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800365 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100366 foreman_cif.video[0] = {
367 true, 352, 288, 30,
368 30000, 500000, 2000000, false,
369 "VP8", 1, 0, 0,
370 true, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200371 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
372 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200373 foreman_cif.config->loss_percent = 5;
374 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200375 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200376 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800377}
378
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200379TEST(FullStackTest, ForemanCifPlr5Flexfec) {
380 auto fixture = CreateVideoQualityTestFixture();
381 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800382 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100383 foreman_cif.video[0] = {
384 true, 352, 288, 30,
385 30000, 500000, 2000000, false,
386 "VP8", 1, 0, 0,
387 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800388 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
389 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200390 foreman_cif.config->loss_percent = 5;
391 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200392 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800393}
394
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200395TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
396 auto fixture = CreateVideoQualityTestFixture();
397 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700398 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100399 foreman_cif.video[0] = {
400 true, 352, 288, 30,
401 30000, 500000, 2000000, false,
402 "VP8", 1, 0, 0,
403 false, true, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700404 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
405 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200406 foreman_cif.config->loss_percent = 3;
407 foreman_cif.config->link_capacity_kbps = 500;
408 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200409 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700410}
411
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200412TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
413 auto fixture = CreateVideoQualityTestFixture();
414 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700415 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100416 foreman_cif.video[0] = {
417 true, 352, 288, 30,
418 30000, 500000, 2000000, false,
419 "VP8", 1, 0, 0,
420 true, false, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700421 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
422 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200423 foreman_cif.config->loss_percent = 3;
424 foreman_cif.config->link_capacity_kbps = 500;
425 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200426 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700427}
428
brandtrdd369c62016-11-16 23:56:57 -0800429#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200430TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
431 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800432 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200433 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800434 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100435 foreman_cif.video[0] = {
436 true, 352, 288, 30,
437 700000, 700000, 700000, false,
438 "H264", 1, 0, 0,
439 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800440 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
441 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200442 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800443}
444
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200445TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
446 auto fixture = CreateVideoQualityTestFixture();
447 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800448 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100449 foreman_cif.video[0] = {
450 true, 352, 288, 10,
451 30000, 30000, 30000, false,
452 "H264", 1, 0, 0,
453 false, false, true, ClipNameToClipPath("foreman_cif")};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800454 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
455 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200456 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800457}
458
philipeldd8b0d82018-09-27 11:18:10 +0200459TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200460 auto fixture = CreateVideoQualityTestFixture();
461 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800462 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100463 foreman_cif.video[0] = {
464 true, 352, 288, 30,
465 30000, 500000, 2000000, false,
466 "H264", 1, 0, 0,
467 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200468 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
469 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200470 foreman_cif.config->loss_percent = 5;
471 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200472 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200473 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800474}
475
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200476TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100477 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200478 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100479 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100480
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200481 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100482 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100483 foreman_cif.video[0] = {
484 true, 352, 288, 30,
485 30000, 500000, 2000000, false,
486 "H264", 1, 0, 0,
487 false, false, true, ClipNameToClipPath("foreman_cif")};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100488 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
489 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200490 foreman_cif.config->loss_percent = 5;
491 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200492 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100493}
494
brandtrdd369c62016-11-16 23:56:57 -0800495// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200496TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
497 auto fixture = CreateVideoQualityTestFixture();
498 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800499 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100500 foreman_cif.video[0] = {
501 true, 352, 288, 30,
502 30000, 500000, 2000000, false,
503 "H264", 1, 0, 0,
504 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800505 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
506 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200507 foreman_cif.config->loss_percent = 5;
508 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200509 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800510}
511
512// Ulpfec with H264 is an unsupported combination, so this test is only useful
513// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200514TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
515 auto fixture = CreateVideoQualityTestFixture();
516 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800517 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100518 foreman_cif.video[0] = {
519 true, 352, 288, 30,
520 30000, 500000, 2000000, false,
521 "H264", 1, 0, 0,
522 true, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800523 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
524 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200525 foreman_cif.config->loss_percent = 5;
526 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200527 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800528}
529#endif // defined(WEBRTC_USE_H264)
530
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200531TEST(FullStackTest, ForemanCif500kbps) {
532 auto fixture = CreateVideoQualityTestFixture();
533 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700534 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100535 foreman_cif.video[0] = {
536 true, 352, 288, 30,
537 30000, 500000, 2000000, false,
538 "VP8", 1, 0, 0,
539 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700540 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
541 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200542 foreman_cif.config->queue_length_packets = 0;
543 foreman_cif.config->queue_delay_ms = 0;
544 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200545 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000546}
547
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200548TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
549 auto fixture = CreateVideoQualityTestFixture();
550 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700551 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100552 foreman_cif.video[0] = {
553 true, 352, 288, 30,
554 30000, 500000, 2000000, false,
555 "VP8", 1, 0, 0,
556 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700557 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
558 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200559 foreman_cif.config->queue_length_packets = 32;
560 foreman_cif.config->queue_delay_ms = 0;
561 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200562 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000563}
564
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200565TEST(FullStackTest, ForemanCif500kbps100ms) {
566 auto fixture = CreateVideoQualityTestFixture();
567 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700568 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100569 foreman_cif.video[0] = {
570 true, 352, 288, 30,
571 30000, 500000, 2000000, false,
572 "VP8", 1, 0, 0,
573 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700574 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
575 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200576 foreman_cif.config->queue_length_packets = 0;
577 foreman_cif.config->queue_delay_ms = 100;
578 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200579 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000580}
581
philipeldd8b0d82018-09-27 11:18:10 +0200582TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200583 auto fixture = CreateVideoQualityTestFixture();
584 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700585 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100586 foreman_cif.video[0] = {
587 true, 352, 288, 30,
588 30000, 500000, 2000000, false,
589 "VP8", 1, 0, 0,
590 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200591 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
592 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200593 foreman_cif.config->queue_length_packets = 32;
594 foreman_cif.config->queue_delay_ms = 100;
595 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200596 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200597 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700598}
599
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200600TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
601 auto fixture = CreateVideoQualityTestFixture();
602 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800603 foreman_cif.call.send_side_bwe = false;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100604 foreman_cif.video[0] = {
605 true, 352, 288, 30,
606 30000, 500000, 2000000, false,
607 "VP8", 1, 0, 0,
608 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800609 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
610 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200611 foreman_cif.config->queue_length_packets = 32;
612 foreman_cif.config->queue_delay_ms = 100;
613 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200614 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000615}
616
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200617TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
618 auto fixture = CreateVideoQualityTestFixture();
619 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700620 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100621 foreman_cif.video[0] = {
622 true, 352, 288, 30,
623 30000, 2000000, 2000000, false,
624 "VP8", 1, 0, 0,
625 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700626 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
627 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200628 foreman_cif.config->queue_length_packets = 32;
629 foreman_cif.config->queue_delay_ms = 100;
630 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200631 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000632}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000633
sprangff19d352017-09-06 07:14:02 -0700634// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200635TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
636 auto fixture = CreateVideoQualityTestFixture();
637 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700638 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100639 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100640 true, 1280,
641 720, 50,
642 30000, 3000000,
643 3000000, false,
644 "VP8", 1,
645 0, 0,
646 false, false,
647 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
minyue626bc952016-10-31 05:47:02 -0700648 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
649 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200650 conf_motion_hd.config->queue_length_packets = 32;
651 conf_motion_hd.config->queue_delay_ms = 100;
652 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200653 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700654}
655
Erik Språngd3438aa2018-11-08 16:56:43 +0100656// TODO(webrtc:9722): Remove when experiment is cleaned up.
657TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
658 test::ScopedFieldTrials override_field_trials(
659 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200660 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100661
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200662 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700663 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100664 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100665 true, 1280,
666 720, 50,
667 30000, 3000000,
668 3000000, false,
669 "VP8", 1,
670 -1, 0,
671 false, false,
672 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100673 conf_motion_hd.analyzer = {
674 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
675 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200676 conf_motion_hd.config->queue_length_packets = 50;
677 conf_motion_hd.config->loss_percent = 3;
678 conf_motion_hd.config->queue_delay_ms = 100;
679 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200680 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700681}
682
philipeldd8b0d82018-09-27 11:18:10 +0200683TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200684 auto fixture = CreateVideoQualityTestFixture();
685 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700686 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100687 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100688 true, 1280,
689 720, 50,
690 30000, 3000000,
691 3000000, false,
692 "VP8", 2,
693 -1, 0,
694 false, false,
695 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
philipeldd8b0d82018-09-27 11:18:10 +0200696 conf_motion_hd.analyzer = {
697 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
698 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200699 conf_motion_hd.config->queue_length_packets = 50;
700 conf_motion_hd.config->loss_percent = 3;
701 conf_motion_hd.config->queue_delay_ms = 100;
702 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200703 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200704 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700705}
706
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200707TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
708 auto fixture = CreateVideoQualityTestFixture();
709 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700710 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100711 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100712 true, 1280,
713 720, 50,
714 30000, 3000000,
715 3000000, false,
716 "VP8", 3,
717 -1, 0,
718 false, false,
719 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700720 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
721 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200722 conf_motion_hd.config->queue_length_packets = 50;
723 conf_motion_hd.config->loss_percent = 3;
724 conf_motion_hd.config->queue_delay_ms = 100;
725 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200726 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700727}
728
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200729TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
730 auto fixture = CreateVideoQualityTestFixture();
731 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700732 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100733 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100734 true, 1280,
735 720, 50,
736 30000, 3000000,
737 3000000, false,
738 "VP8", 4,
739 -1, 0,
740 false, false,
741 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700742 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
743 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200744 conf_motion_hd.config->queue_length_packets = 50;
745 conf_motion_hd.config->loss_percent = 3;
746 conf_motion_hd.config->queue_delay_ms = 100;
747 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200748 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700749}
750
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200751TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200752 test::ScopedFieldTrials field_trial(
753 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100754 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200755 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700756 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100757 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100758 true, 1280,
759 720, 50,
760 30000, 3000000,
761 3000000, false,
762 "VP8", 3,
763 -1, 0,
764 false, false,
765 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200766 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
767 0.0, 0.0, kFullStackTestDurationSecs};
768 conf_motion_hd.config->queue_length_packets = 50;
769 conf_motion_hd.config->loss_percent = 3;
770 conf_motion_hd.config->queue_delay_ms = 100;
771 conf_motion_hd.config->link_capacity_kbps = 2000;
772 fixture->RunWithAnalyzer(conf_motion_hd);
773}
774
775TEST(FullStackTest,
776 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
777 auto fixture = CreateVideoQualityTestFixture();
778 test::ScopedFieldTrials field_trial(
779 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
780 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
781 ParamsWithLogging conf_motion_hd;
782 conf_motion_hd.call.send_side_bwe = true;
783 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100784 true, 1280,
785 720, 50,
786 30000, 3000000,
787 3000000, false,
788 "VP8", 3,
789 -1, 0,
790 false, false,
791 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200792 conf_motion_hd.analyzer = {
793 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
794 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200795 conf_motion_hd.config->queue_length_packets = 50;
796 conf_motion_hd.config->loss_percent = 3;
797 conf_motion_hd.config->queue_delay_ms = 100;
798 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200799 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700800}
801
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100802#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200803TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
804 auto fixture = CreateVideoQualityTestFixture();
805 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800806 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100807 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100808 true, 1280,
809 720, 50,
810 30000, 3000000,
811 3000000, false,
812 "VP9", 1,
813 0, 0,
814 false, false,
815 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
jianj390e64d2017-02-03 09:51:23 -0800816 conf_motion_hd.analyzer = {
817 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
818 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200819 conf_motion_hd.config->queue_length_packets = 32;
820 conf_motion_hd.config->queue_delay_ms = 100;
821 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200822 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800823}
824#endif
825
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200826TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
827 auto fixture = CreateVideoQualityTestFixture();
828 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700829 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200830 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
831 1000000, false, "VP8", 2, 1, 400000,
832 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100833 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700834 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
835 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200836 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200837}
838
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200839#if !defined(WEBRTC_MAC)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100840// All the tests using this constant are disabled on Mac.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200841const char kScreenshareSimulcastExperiment[] =
842 "WebRTC-SimulcastScreenshare/Enabled/";
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100843// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
844#if !defined(WEBRTC_WIN)
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100845const char kScreenshareSimulcastVariableFramerateExperiment[] =
846 "WebRTC-SimulcastScreenshare/Enabled/"
847 "WebRTC-VP8VariableFramerateScreenshare/"
848 "Enabled,min_fps:5.0,min_qp:15,undershoot:30/";
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100849TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100850 test::ScopedFieldTrials field_trial(
851 AppendFieldTrials(kScreenshareSimulcastExperiment));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200852 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200853 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800854 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100855 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100856 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100857 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100858 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800859 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
860 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200861 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100862 screenshare_params_high.video[0] = {
863 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
864 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800865 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100866 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200867 1000000, false, "VP8", 2, 0, 400000,
868 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800869
870 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200871 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
872 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200873 screenshare.ss[0] = {
874 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
875 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200876 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800877}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100878
879TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_Variable_Framerate) {
880 test::ScopedFieldTrials field_trial(
881 AppendFieldTrials(kScreenshareSimulcastVariableFramerateExperiment));
882 auto fixture = CreateVideoQualityTestFixture();
883 ParamsWithLogging screenshare;
884 screenshare.call.send_side_bwe = true;
885 screenshare.screenshare[0] = {true, false, 10};
886 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
887 2500000, false, "VP8", 2, 1, 400000,
888 false, false, false, ""};
889 screenshare.analyzer = {"screenshare_slides_simulcast_variable_framerate",
890 0.0, 0.0, kFullStackTestDurationSecs};
891 ParamsWithLogging screenshare_params_high;
892 screenshare_params_high.video[0] = {
893 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
894 "VP8", 2, 0, 400000, false, false, false, ""};
895 VideoQualityTest::Params screenshare_params_low;
896 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
897 1000000, false, "VP8", 2, 0, 400000,
898 false, false, false, ""};
899
900 std::vector<VideoStream> streams = {
901 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
902 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
903 screenshare.ss[0] = {
904 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
905 false};
906 fixture->RunWithAnalyzer(screenshare);
907}
Ilya Nikolaevskiy9699f092019-03-12 14:02:26 +0100908
909TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_low) {
910 test::ScopedFieldTrials field_trial(
911 AppendFieldTrials(kScreenshareSimulcastExperiment));
912 auto fixture = CreateVideoQualityTestFixture();
913 ParamsWithLogging screenshare;
914 screenshare.call.send_side_bwe = true;
915 screenshare.screenshare[0] = {true, false, 10};
916 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
917 2500000, false, "VP8", 2, 1, 400000,
918 false, false, false, ""};
919 screenshare.analyzer = {"screenshare_slides_simulcast_low", 0.0, 0.0,
920 kFullStackTestDurationSecs};
921 VideoQualityTest::Params screenshare_params_high;
922 screenshare_params_high.video[0] = {
923 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
924 "VP8", 2, 0, 400000, false, false, false, ""};
925 VideoQualityTest::Params screenshare_params_low;
926 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
927 1000000, false, "VP8", 2, 0, 400000,
928 false, false, false, ""};
929
930 std::vector<VideoStream> streams = {
931 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
932 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
933 screenshare.ss[0] = {
934 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
935 false};
936 fixture->RunWithAnalyzer(screenshare);
937}
938
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100939#endif // !defined(WEBRTC_WIN)
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200940#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800941
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200942TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
943 auto fixture = CreateVideoQualityTestFixture();
944 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700945 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200946 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
947 1000000, false, "VP8", 2, 1, 400000,
948 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100949 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700950 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
951 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200952 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700953}
954
philipeldd8b0d82018-09-27 11:18:10 +0200955TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200956 auto fixture = CreateVideoQualityTestFixture();
957 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700958 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200959 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
960 1000000, false, "VP8", 2, 1, 400000,
961 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100962 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200963 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000964 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200965 screenshare.config->loss_percent = 5;
966 screenshare.config->queue_delay_ms = 200;
967 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200968 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200969 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800970}
971
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200972TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
973 auto fixture = CreateVideoQualityTestFixture();
974 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700975 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200976 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
977 1000000, false, "VP8", 2, 1, 400000,
978 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100979 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700980 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
981 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200982 screenshare.config->loss_percent = 10;
983 screenshare.config->queue_delay_ms = 200;
984 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200985 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800986}
987
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200988TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
989 auto fixture = CreateVideoQualityTestFixture();
990 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700991 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200992 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
993 1000000, false, "VP8", 2, 1, 400000,
994 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100995 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700996 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
997 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200998 screenshare.config->loss_percent = 5;
999 screenshare.config->link_capacity_kbps = 200;
1000 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -07001001
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001002 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -07001003}
1004
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001005TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
1006 auto fixture = CreateVideoQualityTestFixture();
1007 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -07001008 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +02001009 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1010 1000000, false, "VP8", 2, 1, 400000,
1011 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001012 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -07001013 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
1014 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001015 screenshare.config->loss_percent = 1;
1016 screenshare.config->link_capacity_kbps = 1200;
1017 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -07001018
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001019 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -07001020}
1021
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001022// Since ParamsWithLogging::Video is not trivially destructible, we can't
1023// store these structs as const globals.
1024ParamsWithLogging::Video SvcVp9Video() {
1025 return ParamsWithLogging::Video{
1026 true, 1280,
1027 720, 30,
1028 800000, 2500000,
1029 2500000, false,
1030 "VP9", 3,
1031 2, 400000,
1032 false, false,
1033 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1034}
ilnik566c43b2017-03-07 04:42:54 -08001035
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001036ParamsWithLogging::Video SimulcastVp8VideoHigh() {
1037 return ParamsWithLogging::Video{
1038 true, 1280,
1039 720, 30,
1040 800000, 2500000,
1041 2500000, false,
1042 "VP8", 3,
1043 2, 400000,
1044 false, false,
1045 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1046}
ilnik566c43b2017-03-07 04:42:54 -08001047
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001048ParamsWithLogging::Video SimulcastVp8VideoMedium() {
1049 return ParamsWithLogging::Video{
1050 true, 640,
1051 360, 30,
1052 150000, 500000,
1053 700000, false,
1054 "VP8", 3,
1055 2, 400000,
1056 false, false,
1057 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1058}
ilnik566c43b2017-03-07 04:42:54 -08001059
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001060ParamsWithLogging::Video SimulcastVp8VideoLow() {
1061 return ParamsWithLogging::Video{
1062 true, 320,
1063 180, 30,
1064 30000, 150000,
1065 200000, false,
1066 "VP8", 3,
1067 2, 400000,
1068 false, false,
1069 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1070}
ilnik566c43b2017-03-07 04:42:54 -08001071
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001072#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001073
1074TEST(FullStackTest, ScreenshareSlidesVP9_3SL_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001075 auto fixture = CreateVideoQualityTestFixture();
1076 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -07001077 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001078 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
1079 2000000, false, "VP9", 1, 0, 400000,
1080 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001081 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001082 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -07001083 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001084 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001085 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1086 std::vector<SpatialLayer>(), true};
1087 fixture->RunWithAnalyzer(screenshare);
1088}
1089
1090TEST(FullStackTest, ScreenshareSlidesVP9_3SL_Variable_Fps) {
1091 webrtc::test::ScopedFieldTrials override_trials(
1092 AppendFieldTrials("WebRTC-VP9VariableFramerateScreenshare/"
1093 "Enabled,min_qp:32,min_fps:5.0,undershoot:30,frames_"
1094 "before_steady_state:5/"));
1095 auto fixture = CreateVideoQualityTestFixture();
1096 ParamsWithLogging screenshare;
1097 screenshare.call.send_side_bwe = true;
1098 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
1099 2000000, false, "VP9", 1, 0, 400000,
1100 false, false, false, ""};
1101 screenshare.screenshare[0] = {true, false, 10};
1102 screenshare.analyzer = {"screenshare_slides_vp9_3sl_variable_fps", 0.0, 0.0,
1103 kFullStackTestDurationSecs};
1104 screenshare.ss[0] = {
1105 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1106 std::vector<SpatialLayer>(), true};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001107 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +00001108}
ilnik2a8c2f52017-02-15 02:23:28 -08001109
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001110TEST(FullStackTest, VP9SVC_3SL_High) {
1111 auto fixture = CreateVideoQualityTestFixture();
1112 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001113 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001114 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001115 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
1116 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001117
Sergey Silkin57027362018-05-15 09:12:05 +02001118 simulcast.ss[0] = {
1119 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1120 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001121 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001122}
1123
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001124TEST(FullStackTest, VP9SVC_3SL_Medium) {
1125 auto fixture = CreateVideoQualityTestFixture();
1126 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001127 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001128 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001129 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
1130 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001131 simulcast.ss[0] = {
1132 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
1133 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001134 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001135}
1136
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001137TEST(FullStackTest, VP9SVC_3SL_Low) {
1138 auto fixture = CreateVideoQualityTestFixture();
1139 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001140 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001141 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001142 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001143 simulcast.ss[0] = {
1144 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
1145 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001146 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001147}
Sergey Silkin0643fd62018-05-17 12:50:53 +02001148
Sergey Silkin7f978f12018-09-10 12:01:49 +00001149// bugs.webrtc.org/9506
1150#if !defined(WEBRTC_MAC)
1151
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001152TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001153 webrtc::test::ScopedFieldTrials override_trials(
1154 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001155 auto fixture = CreateVideoQualityTestFixture();
1156 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001157 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001158 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001159 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
1160 kFullStackTestDurationSecs};
1161 simulcast.ss[0] = {
1162 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
1163 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001164 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001165}
1166
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001167TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001168 webrtc::test::ScopedFieldTrials override_trials(
1169 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001170 auto fixture = CreateVideoQualityTestFixture();
1171 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001172 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001173 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001174 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
1175 kFullStackTestDurationSecs};
1176 simulcast.ss[0] = {
1177 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
1178 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001179 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001180}
1181
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001182TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001183 webrtc::test::ScopedFieldTrials override_trials(
1184 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001185 auto fixture = CreateVideoQualityTestFixture();
1186 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001187 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001188 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001189 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
1190 kFullStackTestDurationSecs};
1191 simulcast.ss[0] = {
1192 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1193 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001194 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001195}
“Michael277a6562018-06-01 14:09:19 -05001196
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001197TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001198 webrtc::test::ScopedFieldTrials override_trials(
1199 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001200 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +02001201 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -05001202 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001203 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 14:09:19 -05001204 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1205 kFullStackTestDurationSecs};
1206 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001207 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -05001208 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +02001209 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +02001210 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001211 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -05001212}
Erik Språngd3438aa2018-11-08 16:56:43 +01001213
1214// TODO(webrtc:9722): Remove when experiment is cleaned up.
1215TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
1216 webrtc::test::ScopedFieldTrials override_trials(
1217 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1218 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
1219 auto fixture = CreateVideoQualityTestFixture();
1220 ParamsWithLogging simulcast;
1221 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001222 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 16:56:43 +01001223 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1224 0.0, 0.0, kFullStackTestDurationSecs};
1225 simulcast.ss[0] = {
1226 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1227 std::vector<SpatialLayer>(), false};
1228 simulcast.config->link_capacity_kbps = 1000;
1229 simulcast.config->queue_delay_ms = 100;
1230 fixture->RunWithAnalyzer(simulcast);
1231}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001232#endif // !defined(WEBRTC_MAC)
1233
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001234#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001235
ilnik6b826ef2017-06-16 06:53:48 -07001236// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001237// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1238#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -07001239#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
1240#else
1241#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
1242#endif
1243
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001244TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
1245 auto fixture = CreateVideoQualityTestFixture();
1246 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001247 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001248 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
1249 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001250 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001251 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1252 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001253 simulcast.config->loss_percent = 0;
1254 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001255 std::vector<VideoStream> streams = {
1256 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1257 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1258 VideoQualityTest::DefaultVideoStream(simulcast, 0)
1259 };
Sergey Silkin57027362018-05-15 09:12:05 +02001260 simulcast.ss[0] = {
1261 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1262 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001263 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1264 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001265 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001266}
1267
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001268TEST(FullStackTest, SimulcastVP8_3SL_High) {
1269 auto fixture = CreateVideoQualityTestFixture();
1270 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001271 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001272 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001273 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001274 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001275 simulcast.config->loss_percent = 0;
1276 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001277 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001278 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001279 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001280 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001281 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001282 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001283
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001284 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001285 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1286 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1287 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001288 simulcast.ss[0] = {
1289 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1290 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001291 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001292}
1293
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001294TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1295 auto fixture = CreateVideoQualityTestFixture();
1296 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001297 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001298 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001299 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001300 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001301 simulcast.config->loss_percent = 0;
1302 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001303 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001304 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001305 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001306 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001307 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001308 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001309
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001310 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001311 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1312 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1313 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001314 simulcast.ss[0] = {
1315 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1316 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001317 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001318}
1319
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001320TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1321 auto fixture = CreateVideoQualityTestFixture();
1322 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001323 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001324 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001325 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001326 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001327 simulcast.config->loss_percent = 0;
1328 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001329 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001330 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001331 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001332 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001333 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001334 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001335
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001336 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001337 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1338 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1339 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001340 simulcast.ss[0] = {
1341 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1342 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001343 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001344}
1345
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001346// This test assumes ideal network conditions with target bandwidth being
1347// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1348// Android32 bots can't handle this high bitrate, so disable test for those.
1349#if defined(WEBRTC_ANDROID)
Emircan Uysaler62f55322019-01-16 17:48:47 -05001350#define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001351#else
1352#define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec
1353#endif // defined(WEBRTC_ANDROID)
1354TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) {
1355 auto fixture = CreateVideoQualityTestFixture();
1356 const int target_bitrate = 100000000;
1357 ParamsWithLogging generator;
1358 generator.call.send_side_bwe = true;
1359 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1360 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1361 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1362 generator.video[0] = {true,
1363 360,
1364 240,
1365 30,
1366 target_bitrate / 2,
1367 target_bitrate,
1368 target_bitrate * 2,
1369 false,
1370 "FakeCodec",
1371 1,
1372 0,
1373 0,
1374 false,
1375 false,
1376 false,
1377 "Generator"};
1378 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1379 kFullStackTestDurationSecs};
1380 fixture->RunWithAnalyzer(generator);
1381}
1382
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001383TEST(FullStackTest, LargeRoomVP8_5thumb) {
1384 auto fixture = CreateVideoQualityTestFixture();
1385 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001386 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001387 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001388 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1389 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001390 large_room.config->loss_percent = 0;
1391 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001392 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001393 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001394 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001395 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001396 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001397 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001398
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001399 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001400 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1401 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1402 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001403 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001404 large_room.ss[0] = {
1405 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1406 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001407 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001408}
1409
oprypin743117f2017-09-15 05:24:24 -07001410#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1411// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001412// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1413#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001414#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001415#else
1416#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001417#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001418#endif
1419
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001420TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1421 auto fixture = CreateVideoQualityTestFixture();
1422 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001423 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001424 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001425 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1426 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001427 large_room.config->loss_percent = 0;
1428 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001429 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001430 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001431 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001432 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001433 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001434 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001435
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001436 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001437 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1438 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1439 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001440 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001441 large_room.ss[0] = {
1442 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1443 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001444 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001445}
1446
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001447TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1448 auto fixture = CreateVideoQualityTestFixture();
1449 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001450 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001451 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001452 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1453 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001454 large_room.config->loss_percent = 0;
1455 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001456 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001457 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001458 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001459 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001460 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001461 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001462
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001463 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001464 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1465 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1466 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001467 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001468 large_room.ss[0] = {
1469 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1470 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001471 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001472}
1473
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001474INSTANTIATE_TEST_SUITE_P(
1475 FullStackTest,
1476 GenericDescriptorTest,
1477 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1478 "WebRTC-GenericDescriptor/Enabled/"));
philipeldd8b0d82018-09-27 11:18:10 +02001479
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001480class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001481
1482// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001483// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1484#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001485TEST_P(DualStreamsTest,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001486 ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) {
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001487 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001488 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1489 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001490 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001491 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001492
1493 // Screenshare Settings.
1494 dual_streams.screenshare[first_stream] = {true, false, 10};
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +01001495 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
1496 2500000, false, "VP8", 2, 1, 400000,
1497 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001498
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001499 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001500 screenshare_params_high.video[0] = {
1501 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
1502 "VP8", 2, 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001503 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001504 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +02001505 1000000, false, "VP8", 2, 0, 400000,
1506 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001507 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001508 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1509 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001510
Sergey Silkin57027362018-05-15 09:12:05 +02001511 dual_streams.ss[first_stream] = {
1512 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1513 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001514
1515 // Video settings.
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001516 dual_streams.video[1 - first_stream] = SimulcastVp8VideoHigh();
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001517
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001518 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001519 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001520 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001521 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001522 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001523 video_params_low.video[0] = SimulcastVp8VideoLow();
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001524 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001525 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1526 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1527 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001528
1529 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001530 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1531 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001532
1533 // Call settings.
1534 dual_streams.call.send_side_bwe = true;
1535 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001536 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1537 std::to_string(first_stream);
1538 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001539 dual_streams.config->loss_percent = 1;
1540 dual_streams.config->link_capacity_kbps = 7500;
1541 dual_streams.config->queue_length_packets = 30;
1542 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001543
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001544 auto fixture = CreateVideoQualityTestFixture();
1545 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001546}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001547#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1548 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001549
1550TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001551 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001552 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001553 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001554 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001555
1556 // Screenshare Settings.
1557 dual_streams.screenshare[first_stream] = {true, false, 10};
1558 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1559 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001560 2, 400000, false, false, false,
1561 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001562 // Video settings.
1563 dual_streams.video[1 - first_stream] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001564 true, 1280,
1565 720, 30,
1566 150000, 500000,
1567 700000, false,
1568 "VP8", 3,
1569 2, 400000,
1570 false, false,
1571 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001572
1573 // Call settings.
1574 dual_streams.call.send_side_bwe = true;
1575 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001576 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1577 std::to_string(first_stream);
1578 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001579 dual_streams.config->loss_percent = 1;
1580 dual_streams.config->link_capacity_kbps = 5000;
1581 dual_streams.config->queue_length_packets = 30;
1582 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001583
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001584 auto fixture = CreateVideoQualityTestFixture();
1585 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001586}
1587
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001588INSTANTIATE_TEST_SUITE_P(FullStackTest,
1589 DualStreamsTest,
1590 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001591
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001592} // namespace webrtc