blob: 7a366adc71ee2ea9f3bddbf50821f2b20d2e071f [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"
23#include "common_types.h" // NOLINT(build/include)
Emircan Uysaler0823eec2018-07-13 17:10:00 -070024#include "media/base/vp9_profile.h"
25#include "modules/video_coding/codecs/vp9/include/vp9.h"
Sebastian Janssonf8518882018-05-31 14:52:59 +020026#include "rtc_base/flags.h"
Mirko Bonadei17f48782018-09-28 08:51:10 +020027#include "system_wrappers/include/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020028#include "test/field_trial.h"
29#include "test/gtest.h"
Rasmus Brandt3c589be2019-03-13 11:32:40 +010030#include "test/testsupport/file_utils.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020031#include "video/video_quality_test.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000032
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000033namespace webrtc {
Sebastian Janssonf8518882018-05-31 14:52:59 +020034namespace flags {
35
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020036WEBRTC_DEFINE_string(rtc_event_log_name,
37 "",
38 "Filename for rtc event log. Two files "
39 "with \"_send\" and \"_recv\" suffixes will be created.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020040std::string RtcEventLogName() {
41 return static_cast<std::string>(FLAG_rtc_event_log_name);
42}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020043WEBRTC_DEFINE_string(rtp_dump_name,
44 "",
45 "Filename for dumped received RTP stream.");
Sebastian Janssonf8518882018-05-31 14:52:59 +020046std::string RtpDumpName() {
47 return static_cast<std::string>(FLAG_rtp_dump_name);
48}
Mirko Bonadei2dfa9982018-10-18 11:35:32 +020049WEBRTC_DEFINE_string(
50 encoded_frame_path,
51 "",
52 "The base path for encoded frame logs. Created files will have "
53 "the form <encoded_frame_path>.<n>.(recv|send.<m>).ivf");
Sebastian Janssonf8518882018-05-31 14:52:59 +020054std::string EncodedFramePath() {
55 return static_cast<std::string>(FLAG_encoded_frame_path);
56}
57} // namespace flags
58} // namespace webrtc
59
60namespace webrtc {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000061
sprang89c4a7e2017-06-30 13:27:40 -070062namespace {
brandtrdd369c62016-11-16 23:56:57 -080063static const int kFullStackTestDurationSecs = 45;
Patrik Höglundb6b29e02018-06-21 16:58:01 +020064const char kPacerPushBackExperiment[] =
65 "WebRTC-PacerPushbackExperiment/Enabled/";
Erik Språngd3438aa2018-11-08 16:56:43 +010066const char kVp8TrustedRateControllerFieldTrial[] =
67 "WebRTC-LibvpxVp8TrustedRateController/Enabled/";
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000068
Patrik Höglundb6b29e02018-06-21 16:58:01 +020069struct ParamsWithLogging : public VideoQualityTest::Params {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000070 public:
Patrik Höglundb6b29e02018-06-21 16:58:01 +020071 ParamsWithLogging() {
72 // Use these logging flags by default, for everything.
Mirko Bonadei45a4c412018-07-31 15:07:28 +020073 logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
74 flags::EncodedFramePath()};
Artem Titov75e36472018-10-08 12:28:56 +020075 this->config = BuiltInNetworkBehaviorConfig();
pbos@webrtc.org94015242013-10-16 11:05:37 +000076 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000077};
78
Patrik Höglundb6b29e02018-06-21 16:58:01 +020079std::unique_ptr<VideoQualityTestFixtureInterface>
80CreateVideoQualityTestFixture() {
Patrik Höglundd8f3c172018-09-26 14:39:17 +020081 // The components will normally be nullptr (= use defaults), but it's possible
82 // for external test runners to override the list of injected components.
83 auto components = TestDependencyFactory::GetInstance().CreateComponents();
84 return absl::make_unique<VideoQualityTest>(std::move(components));
Patrik Höglundb6b29e02018-06-21 16:58:01 +020085}
86
Erik Språngb6b1cac2018-08-09 16:12:54 +020087// Takes the current active field trials set, and appends some new trials.
88std::string AppendFieldTrials(std::string new_trial_string) {
89 return std::string(field_trial::GetFieldTrialString()) + new_trial_string;
90}
Rasmus Brandt3c589be2019-03-13 11:32:40 +010091
92std::string ClipNameToClipPath(const char* clip_name) {
93 return test::ResourcePath(clip_name, "yuv");
94}
Patrik Höglundb6b29e02018-06-21 16:58:01 +020095} // namespace
96
sprangce4aef12015-11-02 07:23:20 -080097// VideoQualityTest::Params params = {
98// { ... }, // Common.
99// { ... }, // Video-specific settings.
100// { ... }, // Screenshare-specific settings.
101// { ... }, // Analyzer settings.
102// pipe, // FakeNetworkPipe::Config
103// { ... }, // Spatial scalability.
104// logs // bool
105// };
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000106
philipeldd8b0d82018-09-27 11:18:10 +0200107class GenericDescriptorTest : public ::testing::TestWithParam<std::string> {
108 public:
philipelf638bbc2018-10-04 16:57:12 +0200109 GenericDescriptorTest()
Ilya Nikolaevskiy0500b522019-01-22 11:12:51 +0100110 : field_trial_(AppendFieldTrials(GetParam())),
philipelf638bbc2018-10-04 16:57:12 +0200111 generic_descriptor_enabled_(
112 field_trial::IsEnabled("WebRTC-GenericDescriptor")) {}
philipeldd8b0d82018-09-27 11:18:10 +0200113
114 std::string GetTestName(std::string base) {
philipelf638bbc2018-10-04 16:57:12 +0200115 if (generic_descriptor_enabled_)
philipeldd8b0d82018-09-27 11:18:10 +0200116 base += "_generic_descriptor";
117 return base;
118 }
119
philipelf638bbc2018-10-04 16:57:12 +0200120 bool GenericDescriptorEnabled() const { return generic_descriptor_enabled_; }
121
philipeldd8b0d82018-09-27 11:18:10 +0200122 private:
123 test::ScopedFieldTrials field_trial_;
philipelf638bbc2018-10-04 16:57:12 +0200124 bool generic_descriptor_enabled_;
philipeldd8b0d82018-09-27 11:18:10 +0200125};
126
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100127#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200128TEST(FullStackTest, ForemanCifWithoutPacketLossVp9) {
129 auto fixture = CreateVideoQualityTestFixture();
130 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800131 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100132 foreman_cif.video[0] = {
133 true, 352, 288, 30,
134 700000, 700000, 700000, false,
135 "VP9", 1, 0, 0,
136 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800137 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
138 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200139 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800140}
141
philipeldd8b0d82018-09-27 11:18:10 +0200142TEST_P(GenericDescriptorTest, ForemanCifPlr5Vp9) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200143 auto fixture = CreateVideoQualityTestFixture();
144 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800145 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100146 foreman_cif.video[0] = {
147 true, 352, 288, 30,
148 30000, 500000, 2000000, false,
149 "VP9", 1, 0, 0,
150 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200151 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_VP9"), 0.0,
152 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200153 foreman_cif.config->loss_percent = 5;
154 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200155 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200156 fixture->RunWithAnalyzer(foreman_cif);
asapersson88b0a222016-02-12 13:16:43 -0800157}
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800158
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700159TEST(FullStackTest, GeneratorWithoutPacketLossVp9Profile2) {
160 // Profile 2 might not be available on some platforms until
161 // https://bugs.chromium.org/p/webm/issues/detail?id=1544 is solved.
162 bool profile_2_is_supported = false;
163 for (const auto& codec : SupportedVP9Codecs()) {
164 if (ParseSdpForVP9Profile(codec.parameters)
165 .value_or(VP9Profile::kProfile0) == VP9Profile::kProfile2) {
166 profile_2_is_supported = true;
167 }
168 }
169 if (!profile_2_is_supported)
170 return;
171 auto fixture = CreateVideoQualityTestFixture();
172
173 SdpVideoFormat::Parameters vp92 = {
174 {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
175 ParamsWithLogging generator;
176 generator.call.send_side_bwe = true;
177 generator.video[0] = {
178 true, 352, 288, 30, 700000, 700000, 700000, false, "VP9",
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100179 1, 0, 0, false, false, true, "GeneratorI010", 0, vp92};
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700180 generator.analyzer = {"generator_net_delay_0_0_plr_0_VP9Profile2", 0.0, 0.0,
181 kFullStackTestDurationSecs};
182 fixture->RunWithAnalyzer(generator);
183}
184
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200185TEST(FullStackTest, ForemanCifWithoutPacketLossMultiplexI420Frame) {
186 auto fixture = CreateVideoQualityTestFixture();
187 ParamsWithLogging foreman_cif;
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800188 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100189 foreman_cif.video[0] = {
190 true, 352, 288, 30,
191 700000, 700000, 700000, false,
192 "multiplex", 1, 0, 0,
193 false, false, false, ClipNameToClipPath("foreman_cif")};
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800194 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
195 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200196 fixture->RunWithAnalyzer(foreman_cif);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800197}
198
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200199TEST(FullStackTest, GeneratorWithoutPacketLossMultiplexI420AFrame) {
200 auto fixture = CreateVideoQualityTestFixture();
201
202 ParamsWithLogging generator;
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700203 generator.call.send_side_bwe = true;
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100204 generator.video[0] = {
205 true, 352, 288, 30, 700000, 700000, 700000, false,
206 "multiplex", 1, 0, 0, false, false, false, "GeneratorI420A"};
Emircan Uysalerf1ff3bd2018-03-12 11:53:21 -0700207 generator.analyzer = {"generator_net_delay_0_0_plr_0_Multiplex", 0.0, 0.0,
208 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200209 fixture->RunWithAnalyzer(generator);
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800210}
211
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100212#endif // defined(RTC_ENABLE_VP9)
asapersson88b0a222016-02-12 13:16:43 -0800213
Patrik Höglund11bf2fa2018-04-09 12:20:50 +0200214#if defined(WEBRTC_LINUX)
215// Crashes on the linux trusty perf bot: bugs.webrtc.org/9129.
216#define MAYBE_ParisQcifWithoutPacketLoss DISABLED_ParisQcifWithoutPacketLoss
217#else
218#define MAYBE_ParisQcifWithoutPacketLoss ParisQcifWithoutPacketLoss
219#endif
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200220TEST(FullStackTest, MAYBE_ParisQcifWithoutPacketLoss) {
221 auto fixture = CreateVideoQualityTestFixture();
222 ParamsWithLogging paris_qcif;
minyue626bc952016-10-31 05:47:02 -0700223 paris_qcif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100224 paris_qcif.video[0] = {
225 true, 176, 144, 30,
226 300000, 300000, 300000, false,
227 "VP8", 1, 0, 0,
228 false, false, true, ClipNameToClipPath("paris_qcif")};
minyue626bc952016-10-31 05:47:02 -0700229 paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
230 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200231 fixture->RunWithAnalyzer(paris_qcif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000232}
233
philipeldd8b0d82018-09-27 11:18:10 +0200234TEST_P(GenericDescriptorTest, ForemanCifWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200235 auto fixture = CreateVideoQualityTestFixture();
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000236 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200237 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700238 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100239 foreman_cif.video[0] = {
240 true, 352, 288, 30,
241 700000, 700000, 700000, false,
242 "VP8", 1, 0, 0,
243 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200244 foreman_cif.analyzer = {GetTestName("foreman_cif_net_delay_0_0_plr_0"), 0.0,
245 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200246 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200247 fixture->RunWithAnalyzer(foreman_cif);
pbos@webrtc.org994d0b72014-06-27 08:47:52 +0000248}
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000249
philipeldd8b0d82018-09-27 11:18:10 +0200250TEST_P(GenericDescriptorTest, ForemanCif30kbpsWithoutPacketLoss) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200251 auto fixture = CreateVideoQualityTestFixture();
252 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800253 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100254 foreman_cif.video[0] = {
255 true, 352, 288, 10,
256 30000, 30000, 30000, false,
257 "VP8", 1, 0, 0,
258 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200259 foreman_cif.analyzer = {GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0"),
260 0.0, 0.0, kFullStackTestDurationSecs};
philipelf638bbc2018-10-04 16:57:12 +0200261 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200262 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800263}
264
Erik Språngd3438aa2018-11-08 16:56:43 +0100265// TODO(webrtc:9722): Remove when experiment is cleaned up.
266TEST_P(GenericDescriptorTest,
267 ForemanCif30kbpsWithoutPacketLossTrustedRateControl) {
268 test::ScopedFieldTrials override_field_trials(
269 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
270 auto fixture = CreateVideoQualityTestFixture();
271
272 ParamsWithLogging foreman_cif;
273 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100274 foreman_cif.video[0] = {
275 true, 352, 288, 10,
276 30000, 30000, 30000, false,
277 "VP8", 1, 0, 0,
278 false, false, true, ClipNameToClipPath("foreman_cif")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100279 foreman_cif.analyzer = {
280 GetTestName("foreman_cif_30kbps_net_delay_0_0_plr_0_trusted_rate_ctrl"),
281 0.0, 0.0, kFullStackTestDurationSecs};
282 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
283 fixture->RunWithAnalyzer(foreman_cif);
284}
285
Stefan Holmer1f7a0082019-01-11 15:39:08 +0100286// Link capacity below default start rate.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200287TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
288 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +0200289 ParamsWithLogging foreman_cif;
Niels Möller6aa415e2018-06-07 11:14:13 +0200290 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100291 foreman_cif.video[0] = {
292 true, 352, 288, 30,
293 30000, 500000, 2000000, false,
294 "VP8", 1, 0, 0,
295 false, false, true, ClipNameToClipPath("foreman_cif")};
Niels Möller6aa415e2018-06-07 11:14:13 +0200296 foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
297 0.0, 0.0,
298 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200299 foreman_cif.config->link_capacity_kbps = 150;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200300 fixture->RunWithAnalyzer(foreman_cif);
Niels Möller6aa415e2018-06-07 11:14:13 +0200301}
302
Erik Språng616b2332019-02-11 14:16:28 +0100303// Restricted network and encoder overproducing by 30%.
304TEST(FullStackTest, ForemanCifLink150kbpsBadRateController) {
305 auto fixture = CreateVideoQualityTestFixture();
306 ParamsWithLogging foreman_cif;
307 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100308 foreman_cif.video[0] = {
309 true, 352, 288, 30,
310 30000, 500000, 2000000, false,
311 "VP8", 1, 0, 0,
312 false, false, true, ClipNameToClipPath("foreman_cif"),
313 0, {}, 1.30};
Erik Språng616b2332019-02-11 14:16:28 +0100314 foreman_cif.analyzer = {
315 "foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", 0.0, 0.0,
316 kFullStackTestDurationSecs};
317 foreman_cif.config->link_capacity_kbps = 150;
318 foreman_cif.config->queue_length_packets = 30;
319 foreman_cif.config->queue_delay_ms = 100;
320 fixture->RunWithAnalyzer(foreman_cif);
321}
322
Erik Språng8b8d01a2019-03-02 20:54:55 +0100323// Weak 3G-style link: 250kbps, 1% loss, 100ms delay, 15 packets queue.
324// Packet rate and loss are low enough that loss will happen with ~3s interval.
325// This triggers protection overhead to toggle between zero and non-zero.
326// Link queue is restrictive enough to trigger loss on probes.
327TEST(FullStackTest, ForemanCifMediaCapacitySmallLossAndQueue) {
328 auto fixture = CreateVideoQualityTestFixture();
329 ParamsWithLogging foreman_cif;
330 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100331 foreman_cif.video[0] = {
332 true, 352, 288, 30,
333 30000, 500000, 2000000, false,
334 "VP8", 1, 0, 0,
335 false, false, true, ClipNameToClipPath("foreman_cif"),
336 0, {}, 1.30};
Erik Språng8b8d01a2019-03-02 20:54:55 +0100337 foreman_cif.analyzer = {"foreman_cif_link_250kbps_delay100ms_10pkts_loss1",
338 0.0, 0.0, kFullStackTestDurationSecs};
339 foreman_cif.config->link_capacity_kbps = 250;
340 foreman_cif.config->queue_length_packets = 10;
341 foreman_cif.config->queue_delay_ms = 100;
342 foreman_cif.config->loss_percent = 1;
343 fixture->RunWithAnalyzer(foreman_cif);
344}
345
philipeldd8b0d82018-09-27 11:18:10 +0200346TEST_P(GenericDescriptorTest, ForemanCifPlr5) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200347 auto fixture = CreateVideoQualityTestFixture();
348 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700349 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100350 foreman_cif.video[0] = {
351 true, 352, 288, 30,
352 30000, 500000, 2000000, false,
353 "VP8", 1, 0, 0,
354 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200355 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000356 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200357 foreman_cif.config->loss_percent = 5;
358 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200359 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200360 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgc216b9a2014-10-14 10:38:49 +0000361}
362
philipeldd8b0d82018-09-27 11:18:10 +0200363TEST_P(GenericDescriptorTest, ForemanCifPlr5Ulpfec) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200364 auto fixture = CreateVideoQualityTestFixture();
365 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800366 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100367 foreman_cif.video[0] = {
368 true, 352, 288, 30,
369 30000, 500000, 2000000, false,
370 "VP8", 1, 0, 0,
371 true, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200372 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_ulpfec"),
373 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200374 foreman_cif.config->loss_percent = 5;
375 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200376 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200377 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800378}
379
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200380TEST(FullStackTest, ForemanCifPlr5Flexfec) {
381 auto fixture = CreateVideoQualityTestFixture();
382 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800383 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100384 foreman_cif.video[0] = {
385 true, 352, 288, 30,
386 30000, 500000, 2000000, false,
387 "VP8", 1, 0, 0,
388 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800389 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
390 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200391 foreman_cif.config->loss_percent = 5;
392 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200393 fixture->RunWithAnalyzer(foreman_cif);
brandtr93c5d032016-11-30 07:50:07 -0800394}
395
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200396TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
397 auto fixture = CreateVideoQualityTestFixture();
398 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700399 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100400 foreman_cif.video[0] = {
401 true, 352, 288, 30,
402 30000, 500000, 2000000, false,
403 "VP8", 1, 0, 0,
404 false, true, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700405 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
406 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200407 foreman_cif.config->loss_percent = 3;
408 foreman_cif.config->link_capacity_kbps = 500;
409 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200410 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700411}
412
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200413TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
414 auto fixture = CreateVideoQualityTestFixture();
415 ParamsWithLogging foreman_cif;
stefan889d9652017-07-05 03:03:02 -0700416 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100417 foreman_cif.video[0] = {
418 true, 352, 288, 30,
419 30000, 500000, 2000000, false,
420 "VP8", 1, 0, 0,
421 true, false, true, ClipNameToClipPath("foreman_cif")};
stefan889d9652017-07-05 03:03:02 -0700422 foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
423 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200424 foreman_cif.config->loss_percent = 3;
425 foreman_cif.config->link_capacity_kbps = 500;
426 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200427 fixture->RunWithAnalyzer(foreman_cif);
stefan889d9652017-07-05 03:03:02 -0700428}
429
brandtrdd369c62016-11-16 23:56:57 -0800430#if defined(WEBRTC_USE_H264)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200431TEST(FullStackTest, ForemanCifWithoutPacketlossH264) {
432 auto fixture = CreateVideoQualityTestFixture();
brandtr93c5d032016-11-30 07:50:07 -0800433 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200434 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800435 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100436 foreman_cif.video[0] = {
437 true, 352, 288, 30,
438 700000, 700000, 700000, false,
439 "H264", 1, 0, 0,
440 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800441 foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
442 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200443 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800444}
445
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200446TEST(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
447 auto fixture = CreateVideoQualityTestFixture();
448 ParamsWithLogging foreman_cif;
asaperssonfb6ad3b2016-12-16 06:54:01 -0800449 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100450 foreman_cif.video[0] = {
451 true, 352, 288, 10,
452 30000, 30000, 30000, false,
453 "H264", 1, 0, 0,
454 false, false, true, ClipNameToClipPath("foreman_cif")};
asaperssonfb6ad3b2016-12-16 06:54:01 -0800455 foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
456 0.0, kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200457 fixture->RunWithAnalyzer(foreman_cif);
asaperssonfb6ad3b2016-12-16 06:54:01 -0800458}
459
philipeldd8b0d82018-09-27 11:18:10 +0200460TEST_P(GenericDescriptorTest, ForemanCifPlr5H264) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200461 auto fixture = CreateVideoQualityTestFixture();
462 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800463 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100464 foreman_cif.video[0] = {
465 true, 352, 288, 30,
466 30000, 500000, 2000000, false,
467 "H264", 1, 0, 0,
468 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200469 foreman_cif.analyzer = {GetTestName("foreman_cif_delay_50_0_plr_5_H264"), 0.0,
470 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200471 foreman_cif.config->loss_percent = 5;
472 foreman_cif.config->queue_delay_ms = 50;
philipelf638bbc2018-10-04 16:57:12 +0200473 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200474 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800475}
476
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200477TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100478 test::ScopedFieldTrials override_field_trials(
Erik Språngb6b1cac2018-08-09 16:12:54 +0200479 AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100480 auto fixture = CreateVideoQualityTestFixture();
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100481
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200482 ParamsWithLogging foreman_cif;
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100483 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100484 foreman_cif.video[0] = {
485 true, 352, 288, 30,
486 30000, 500000, 2000000, false,
487 "H264", 1, 0, 0,
488 false, false, true, ClipNameToClipPath("foreman_cif")};
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100489 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
490 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200491 foreman_cif.config->loss_percent = 5;
492 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200493 fixture->RunWithAnalyzer(foreman_cif);
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100494}
495
brandtrdd369c62016-11-16 23:56:57 -0800496// Verify that this is worth the bot time, before enabling.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200497TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
498 auto fixture = CreateVideoQualityTestFixture();
499 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800500 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100501 foreman_cif.video[0] = {
502 true, 352, 288, 30,
503 30000, 500000, 2000000, false,
504 "H264", 1, 0, 0,
505 false, true, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800506 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
507 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200508 foreman_cif.config->loss_percent = 5;
509 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200510 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800511}
512
513// Ulpfec with H264 is an unsupported combination, so this test is only useful
514// for debugging. It is therefore disabled by default.
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200515TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
516 auto fixture = CreateVideoQualityTestFixture();
517 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800518 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100519 foreman_cif.video[0] = {
520 true, 352, 288, 30,
521 30000, 500000, 2000000, false,
522 "H264", 1, 0, 0,
523 true, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800524 foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
525 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200526 foreman_cif.config->loss_percent = 5;
527 foreman_cif.config->queue_delay_ms = 50;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200528 fixture->RunWithAnalyzer(foreman_cif);
brandtrdd369c62016-11-16 23:56:57 -0800529}
530#endif // defined(WEBRTC_USE_H264)
531
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200532TEST(FullStackTest, ForemanCif500kbps) {
533 auto fixture = CreateVideoQualityTestFixture();
534 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700535 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100536 foreman_cif.video[0] = {
537 true, 352, 288, 30,
538 30000, 500000, 2000000, false,
539 "VP8", 1, 0, 0,
540 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700541 foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
542 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200543 foreman_cif.config->queue_length_packets = 0;
544 foreman_cif.config->queue_delay_ms = 0;
545 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200546 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000547}
548
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200549TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
550 auto fixture = CreateVideoQualityTestFixture();
551 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700552 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100553 foreman_cif.video[0] = {
554 true, 352, 288, 30,
555 30000, 500000, 2000000, false,
556 "VP8", 1, 0, 0,
557 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700558 foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
559 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200560 foreman_cif.config->queue_length_packets = 32;
561 foreman_cif.config->queue_delay_ms = 0;
562 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200563 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000564}
565
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200566TEST(FullStackTest, ForemanCif500kbps100ms) {
567 auto fixture = CreateVideoQualityTestFixture();
568 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700569 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100570 foreman_cif.video[0] = {
571 true, 352, 288, 30,
572 30000, 500000, 2000000, false,
573 "VP8", 1, 0, 0,
574 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700575 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
576 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200577 foreman_cif.config->queue_length_packets = 0;
578 foreman_cif.config->queue_delay_ms = 100;
579 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200580 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000581}
582
philipeldd8b0d82018-09-27 11:18:10 +0200583TEST_P(GenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200584 auto fixture = CreateVideoQualityTestFixture();
585 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700586 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100587 foreman_cif.video[0] = {
588 true, 352, 288, 30,
589 30000, 500000, 2000000, false,
590 "VP8", 1, 0, 0,
591 false, false, true, ClipNameToClipPath("foreman_cif")};
philipeldd8b0d82018-09-27 11:18:10 +0200592 foreman_cif.analyzer = {GetTestName("foreman_cif_500kbps_100ms_32pkts_queue"),
593 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200594 foreman_cif.config->queue_length_packets = 32;
595 foreman_cif.config->queue_delay_ms = 100;
596 foreman_cif.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200597 foreman_cif.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200598 fixture->RunWithAnalyzer(foreman_cif);
stefanb1797672016-08-11 07:00:57 -0700599}
600
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200601TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
602 auto fixture = CreateVideoQualityTestFixture();
603 ParamsWithLogging foreman_cif;
brandtr93c5d032016-11-30 07:50:07 -0800604 foreman_cif.call.send_side_bwe = false;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100605 foreman_cif.video[0] = {
606 true, 352, 288, 30,
607 30000, 500000, 2000000, false,
608 "VP8", 1, 0, 0,
609 false, false, true, ClipNameToClipPath("foreman_cif")};
brandtr93c5d032016-11-30 07:50:07 -0800610 foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
611 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200612 foreman_cif.config->queue_length_packets = 32;
613 foreman_cif.config->queue_delay_ms = 100;
614 foreman_cif.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200615 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000616}
617
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200618TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
619 auto fixture = CreateVideoQualityTestFixture();
620 ParamsWithLogging foreman_cif;
minyue626bc952016-10-31 05:47:02 -0700621 foreman_cif.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100622 foreman_cif.video[0] = {
623 true, 352, 288, 30,
624 30000, 2000000, 2000000, false,
625 "VP8", 1, 0, 0,
626 false, false, true, ClipNameToClipPath("foreman_cif")};
minyue626bc952016-10-31 05:47:02 -0700627 foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
628 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200629 foreman_cif.config->queue_length_packets = 32;
630 foreman_cif.config->queue_delay_ms = 100;
631 foreman_cif.config->link_capacity_kbps = 1000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200632 fixture->RunWithAnalyzer(foreman_cif);
stefan@webrtc.orgb8e9e442014-07-09 11:29:06 +0000633}
sprang@webrtc.org131bea82015-02-18 12:46:06 +0000634
sprangff19d352017-09-06 07:14:02 -0700635// TODO(sprang): Remove this if we have the similar ModerateLimits below?
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200636TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
637 auto fixture = CreateVideoQualityTestFixture();
638 ParamsWithLogging conf_motion_hd;
minyue626bc952016-10-31 05:47:02 -0700639 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100640 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100641 true, 1280,
642 720, 50,
643 30000, 3000000,
644 3000000, false,
645 "VP8", 1,
646 0, 0,
647 false, false,
648 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
minyue626bc952016-10-31 05:47:02 -0700649 conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
650 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200651 conf_motion_hd.config->queue_length_packets = 32;
652 conf_motion_hd.config->queue_delay_ms = 100;
653 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200654 fixture->RunWithAnalyzer(conf_motion_hd);
stefanb1797672016-08-11 07:00:57 -0700655}
656
Erik Språngd3438aa2018-11-08 16:56:43 +0100657// TODO(webrtc:9722): Remove when experiment is cleaned up.
658TEST(FullStackTest, ConferenceMotionHd1TLModerateLimitsWhitelistVp8) {
659 test::ScopedFieldTrials override_field_trials(
660 AppendFieldTrials(kVp8TrustedRateControllerFieldTrial));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200661 auto fixture = CreateVideoQualityTestFixture();
Erik Språngd3438aa2018-11-08 16:56:43 +0100662
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200663 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700664 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100665 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100666 true, 1280,
667 720, 50,
668 30000, 3000000,
669 3000000, false,
670 "VP8", 1,
671 -1, 0,
672 false, false,
673 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Erik Språngd3438aa2018-11-08 16:56:43 +0100674 conf_motion_hd.analyzer = {
675 "conference_motion_hd_1tl_moderate_limits_trusted_rate_ctrl", 0.0, 0.0,
676 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200677 conf_motion_hd.config->queue_length_packets = 50;
678 conf_motion_hd.config->loss_percent = 3;
679 conf_motion_hd.config->queue_delay_ms = 100;
680 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200681 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700682}
683
philipeldd8b0d82018-09-27 11:18:10 +0200684TEST_P(GenericDescriptorTest, ConferenceMotionHd2TLModerateLimits) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200685 auto fixture = CreateVideoQualityTestFixture();
686 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700687 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100688 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100689 true, 1280,
690 720, 50,
691 30000, 3000000,
692 3000000, false,
693 "VP8", 2,
694 -1, 0,
695 false, false,
696 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
philipeldd8b0d82018-09-27 11:18:10 +0200697 conf_motion_hd.analyzer = {
698 GetTestName("conference_motion_hd_2tl_moderate_limits"), 0.0, 0.0,
699 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200700 conf_motion_hd.config->queue_length_packets = 50;
701 conf_motion_hd.config->loss_percent = 3;
702 conf_motion_hd.config->queue_delay_ms = 100;
703 conf_motion_hd.config->link_capacity_kbps = 2000;
philipelf638bbc2018-10-04 16:57:12 +0200704 conf_motion_hd.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200705 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700706}
707
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200708TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
709 auto fixture = CreateVideoQualityTestFixture();
710 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700711 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100712 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100713 true, 1280,
714 720, 50,
715 30000, 3000000,
716 3000000, false,
717 "VP8", 3,
718 -1, 0,
719 false, false,
720 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700721 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
722 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200723 conf_motion_hd.config->queue_length_packets = 50;
724 conf_motion_hd.config->loss_percent = 3;
725 conf_motion_hd.config->queue_delay_ms = 100;
726 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200727 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700728}
729
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200730TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
731 auto fixture = CreateVideoQualityTestFixture();
732 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700733 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100734 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100735 true, 1280,
736 720, 50,
737 30000, 3000000,
738 3000000, false,
739 "VP8", 4,
740 -1, 0,
741 false, false,
742 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
sprangff19d352017-09-06 07:14:02 -0700743 conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
744 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200745 conf_motion_hd.config->queue_length_packets = 50;
746 conf_motion_hd.config->loss_percent = 3;
747 conf_motion_hd.config->queue_delay_ms = 100;
748 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200749 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700750}
751
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200752TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
Erik Språngb6b1cac2018-08-09 16:12:54 +0200753 test::ScopedFieldTrials field_trial(
754 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"));
Erik Språngd3438aa2018-11-08 16:56:43 +0100755 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200756 ParamsWithLogging conf_motion_hd;
sprangff19d352017-09-06 07:14:02 -0700757 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100758 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100759 true, 1280,
760 720, 50,
761 30000, 3000000,
762 3000000, false,
763 "VP8", 3,
764 -1, 0,
765 false, false,
766 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200767 conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
768 0.0, 0.0, kFullStackTestDurationSecs};
769 conf_motion_hd.config->queue_length_packets = 50;
770 conf_motion_hd.config->loss_percent = 3;
771 conf_motion_hd.config->queue_delay_ms = 100;
772 conf_motion_hd.config->link_capacity_kbps = 2000;
773 fixture->RunWithAnalyzer(conf_motion_hd);
774}
775
776TEST(FullStackTest,
777 ConferenceMotionHd3TLModerateLimitsAltTLPatternAndBaseHeavyTLAllocation) {
778 auto fixture = CreateVideoQualityTestFixture();
779 test::ScopedFieldTrials field_trial(
780 AppendFieldTrials("WebRTC-UseShortVP8TL3Pattern/Enabled/"
781 "WebRTC-UseBaseHeavyVP8TL3RateAllocation/Enabled/"));
782 ParamsWithLogging conf_motion_hd;
783 conf_motion_hd.call.send_side_bwe = true;
784 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100785 true, 1280,
786 720, 50,
787 30000, 3000000,
788 3000000, false,
789 "VP8", 3,
790 -1, 0,
791 false, false,
792 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Rasmus Brandt35836932018-10-23 09:17:24 +0200793 conf_motion_hd.analyzer = {
794 "conference_motion_hd_3tl_alt_heavy_moderate_limits", 0.0, 0.0,
795 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200796 conf_motion_hd.config->queue_length_packets = 50;
797 conf_motion_hd.config->loss_percent = 3;
798 conf_motion_hd.config->queue_delay_ms = 100;
799 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200800 fixture->RunWithAnalyzer(conf_motion_hd);
sprangff19d352017-09-06 07:14:02 -0700801}
802
Mirko Bonadei8ef57932018-11-16 14:38:03 +0100803#if defined(RTC_ENABLE_VP9)
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200804TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
805 auto fixture = CreateVideoQualityTestFixture();
806 ParamsWithLogging conf_motion_hd;
jianj390e64d2017-02-03 09:51:23 -0800807 conf_motion_hd.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100808 conf_motion_hd.video[0] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +0100809 true, 1280,
810 720, 50,
811 30000, 3000000,
812 3000000, false,
813 "VP9", 1,
814 0, 0,
815 false, false,
816 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
jianj390e64d2017-02-03 09:51:23 -0800817 conf_motion_hd.analyzer = {
818 "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
819 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200820 conf_motion_hd.config->queue_length_packets = 32;
821 conf_motion_hd.config->queue_delay_ms = 100;
822 conf_motion_hd.config->link_capacity_kbps = 2000;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200823 fixture->RunWithAnalyzer(conf_motion_hd);
jianj390e64d2017-02-03 09:51:23 -0800824}
825#endif
826
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200827TEST(FullStackTest, ScreenshareSlidesVP8_2TL) {
828 auto fixture = CreateVideoQualityTestFixture();
829 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700830 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200831 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
832 1000000, false, "VP8", 2, 1, 400000,
833 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100834 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700835 screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
836 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200837 fixture->RunWithAnalyzer(screenshare);
Erik Språng6ee69aa2015-09-03 15:58:05 +0200838}
839
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200840#if !defined(WEBRTC_MAC)
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100841// All the tests using this constant are disabled on Mac.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200842const char kScreenshareSimulcastExperiment[] =
843 "WebRTC-SimulcastScreenshare/Enabled/";
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100844// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
845#if !defined(WEBRTC_WIN)
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100846const char kScreenshareSimulcastVariableFramerateExperiment[] =
847 "WebRTC-SimulcastScreenshare/Enabled/"
848 "WebRTC-VP8VariableFramerateScreenshare/"
849 "Enabled,min_fps:5.0,min_qp:15,undershoot:30/";
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100850TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
Erik Språngd3438aa2018-11-08 16:56:43 +0100851 test::ScopedFieldTrials field_trial(
852 AppendFieldTrials(kScreenshareSimulcastExperiment));
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200853 auto fixture = CreateVideoQualityTestFixture();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200854 ParamsWithLogging screenshare;
ilnikcb8c1462017-03-09 09:23:30 -0800855 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100856 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100857 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +0100858 2500000, false, "VP8", 2, 1, 400000,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100859 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800860 screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
861 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200862 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100863 screenshare_params_high.video[0] = {
864 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
865 "VP8", 2, 0, 400000, false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800866 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +0100867 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +0200868 1000000, false, "VP8", 2, 0, 400000,
869 false, false, false, ""};
ilnikcb8c1462017-03-09 09:23:30 -0800870
871 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200872 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
873 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +0200874 screenshare.ss[0] = {
875 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
876 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200877 fixture->RunWithAnalyzer(screenshare);
ilnikcb8c1462017-03-09 09:23:30 -0800878}
Ilya Nikolaevskiy7b412252019-03-06 16:40:42 +0100879
880TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_Variable_Framerate) {
881 test::ScopedFieldTrials field_trial(
882 AppendFieldTrials(kScreenshareSimulcastVariableFramerateExperiment));
883 auto fixture = CreateVideoQualityTestFixture();
884 ParamsWithLogging screenshare;
885 screenshare.call.send_side_bwe = true;
886 screenshare.screenshare[0] = {true, false, 10};
887 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
888 2500000, false, "VP8", 2, 1, 400000,
889 false, false, false, ""};
890 screenshare.analyzer = {"screenshare_slides_simulcast_variable_framerate",
891 0.0, 0.0, kFullStackTestDurationSecs};
892 ParamsWithLogging screenshare_params_high;
893 screenshare_params_high.video[0] = {
894 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
895 "VP8", 2, 0, 400000, false, false, false, ""};
896 VideoQualityTest::Params screenshare_params_low;
897 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
898 1000000, false, "VP8", 2, 0, 400000,
899 false, false, false, ""};
900
901 std::vector<VideoStream> streams = {
902 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
903 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
904 screenshare.ss[0] = {
905 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
906 false};
907 fixture->RunWithAnalyzer(screenshare);
908}
Ilya Nikolaevskiy9699f092019-03-12 14:02:26 +0100909
910TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_low) {
911 test::ScopedFieldTrials field_trial(
912 AppendFieldTrials(kScreenshareSimulcastExperiment));
913 auto fixture = CreateVideoQualityTestFixture();
914 ParamsWithLogging screenshare;
915 screenshare.call.send_side_bwe = true;
916 screenshare.screenshare[0] = {true, false, 10};
917 screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
918 2500000, false, "VP8", 2, 1, 400000,
919 false, false, false, ""};
920 screenshare.analyzer = {"screenshare_slides_simulcast_low", 0.0, 0.0,
921 kFullStackTestDurationSecs};
922 VideoQualityTest::Params screenshare_params_high;
923 screenshare_params_high.video[0] = {
924 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
925 "VP8", 2, 0, 400000, false, false, false, ""};
926 VideoQualityTest::Params screenshare_params_low;
927 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
928 1000000, false, "VP8", 2, 0, 400000,
929 false, false, false, ""};
930
931 std::vector<VideoStream> streams = {
932 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
933 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
934 screenshare.ss[0] = {
935 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
936 false};
937 fixture->RunWithAnalyzer(screenshare);
938}
939
Oskar Sundbom8bacf252019-01-08 16:40:08 +0100940#endif // !defined(WEBRTC_WIN)
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +0200941#endif // !defined(WEBRTC_MAC)
ilnikcb8c1462017-03-09 09:23:30 -0800942
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200943TEST(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
944 auto fixture = CreateVideoQualityTestFixture();
945 ParamsWithLogging config;
minyue626bc952016-10-31 05:47:02 -0700946 config.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200947 config.video[0] = {true, 1850, 1110 / 2, 5, 50000, 200000,
948 1000000, false, "VP8", 2, 1, 400000,
949 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100950 config.screenshare[0] = {true, false, 10, 2};
minyue626bc952016-10-31 05:47:02 -0700951 config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
952 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200953 fixture->RunWithAnalyzer(config);
ivica028cf482015-07-30 02:15:56 -0700954}
955
philipeldd8b0d82018-09-27 11:18:10 +0200956TEST_P(GenericDescriptorTest, ScreenshareSlidesVP8_2TL_LossyNet) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200957 auto fixture = CreateVideoQualityTestFixture();
958 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700959 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200960 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
961 1000000, false, "VP8", 2, 1, 400000,
962 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100963 screenshare.screenshare[0] = {true, false, 10};
philipeldd8b0d82018-09-27 11:18:10 +0200964 screenshare.analyzer = {GetTestName("screenshare_slides_lossy_net"), 0.0, 0.0,
Lu Liu6f683242018-09-25 18:48:48 +0000965 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200966 screenshare.config->loss_percent = 5;
967 screenshare.config->queue_delay_ms = 200;
968 screenshare.config->link_capacity_kbps = 500;
philipelf638bbc2018-10-04 16:57:12 +0200969 screenshare.call.generic_descriptor = GenericDescriptorEnabled();
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200970 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800971}
972
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200973TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
974 auto fixture = CreateVideoQualityTestFixture();
975 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -0700976 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200977 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
978 1000000, false, "VP8", 2, 1, 400000,
979 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100980 screenshare.screenshare[0] = {true, false, 10};
minyue626bc952016-10-31 05:47:02 -0700981 screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
982 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200983 screenshare.config->loss_percent = 10;
984 screenshare.config->queue_delay_ms = 200;
985 screenshare.config->link_capacity_kbps = 500;
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200986 fixture->RunWithAnalyzer(screenshare);
sprangee37de32015-11-23 06:10:23 -0800987}
988
Patrik Höglundb6b29e02018-06-21 16:58:01 +0200989TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
990 auto fixture = CreateVideoQualityTestFixture();
991 ParamsWithLogging screenshare;
sprange566e172017-06-08 01:29:15 -0700992 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +0200993 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
994 1000000, false, "VP8", 2, 1, 400000,
995 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +0100996 screenshare.screenshare[0] = {true, false, 10};
sprange566e172017-06-08 01:29:15 -0700997 screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
998 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +0200999 screenshare.config->loss_percent = 5;
1000 screenshare.config->link_capacity_kbps = 200;
1001 screenshare.config->queue_length_packets = 30;
sprange566e172017-06-08 01:29:15 -07001002
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001003 fixture->RunWithAnalyzer(screenshare);
sprange566e172017-06-08 01:29:15 -07001004}
1005
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001006TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
1007 auto fixture = CreateVideoQualityTestFixture();
1008 ParamsWithLogging screenshare;
sprang89c4a7e2017-06-30 13:27:40 -07001009 screenshare.call.send_side_bwe = true;
Erik Språng28bb3912018-07-11 16:06:55 +02001010 screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
1011 1000000, false, "VP8", 2, 1, 400000,
1012 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001013 screenshare.screenshare[0] = {true, false, 10};
sprang89c4a7e2017-06-30 13:27:40 -07001014 screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
1015 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001016 screenshare.config->loss_percent = 1;
1017 screenshare.config->link_capacity_kbps = 1200;
1018 screenshare.config->queue_length_packets = 30;
sprang89c4a7e2017-06-30 13:27:40 -07001019
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001020 fixture->RunWithAnalyzer(screenshare);
sprang89c4a7e2017-06-30 13:27:40 -07001021}
1022
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001023// Since ParamsWithLogging::Video is not trivially destructible, we can't
1024// store these structs as const globals.
1025ParamsWithLogging::Video SvcVp9Video() {
1026 return ParamsWithLogging::Video{
1027 true, 1280,
1028 720, 30,
1029 800000, 2500000,
1030 2500000, false,
1031 "VP9", 3,
1032 2, 400000,
1033 false, false,
1034 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1035}
ilnik566c43b2017-03-07 04:42:54 -08001036
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001037ParamsWithLogging::Video SimulcastVp8VideoHigh() {
1038 return ParamsWithLogging::Video{
1039 true, 1280,
1040 720, 30,
1041 800000, 2500000,
1042 2500000, false,
1043 "VP8", 3,
1044 2, 400000,
1045 false, false,
1046 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1047}
ilnik566c43b2017-03-07 04:42:54 -08001048
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001049ParamsWithLogging::Video SimulcastVp8VideoMedium() {
1050 return ParamsWithLogging::Video{
1051 true, 640,
1052 360, 30,
1053 150000, 500000,
1054 700000, false,
1055 "VP8", 3,
1056 2, 400000,
1057 false, false,
1058 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1059}
ilnik566c43b2017-03-07 04:42:54 -08001060
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001061ParamsWithLogging::Video SimulcastVp8VideoLow() {
1062 return ParamsWithLogging::Video{
1063 true, 320,
1064 180, 30,
1065 30000, 150000,
1066 200000, false,
1067 "VP8", 3,
1068 2, 400000,
1069 false, false,
1070 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
1071}
ilnik566c43b2017-03-07 04:42:54 -08001072
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001073#if defined(RTC_ENABLE_VP9)
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001074
1075TEST(FullStackTest, ScreenshareSlidesVP9_3SL_High_Fps) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001076 auto fixture = CreateVideoQualityTestFixture();
1077 ParamsWithLogging screenshare;
minyue626bc952016-10-31 05:47:02 -07001078 screenshare.call.send_side_bwe = true;
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001079 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
1080 2000000, false, "VP9", 1, 0, 400000,
1081 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001082 screenshare.screenshare[0] = {true, false, 10};
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001083 screenshare.analyzer = {"screenshare_slides_vp9_3sl_high_fps", 0.0, 0.0,
minyue626bc952016-10-31 05:47:02 -07001084 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001085 screenshare.ss[0] = {
Ilya Nikolaevskiy61170682019-03-06 16:04:32 +01001086 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1087 std::vector<SpatialLayer>(), true};
1088 fixture->RunWithAnalyzer(screenshare);
1089}
1090
1091TEST(FullStackTest, ScreenshareSlidesVP9_3SL_Variable_Fps) {
1092 webrtc::test::ScopedFieldTrials override_trials(
1093 AppendFieldTrials("WebRTC-VP9VariableFramerateScreenshare/"
1094 "Enabled,min_qp:32,min_fps:5.0,undershoot:30,frames_"
1095 "before_steady_state:5/"));
1096 auto fixture = CreateVideoQualityTestFixture();
1097 ParamsWithLogging screenshare;
1098 screenshare.call.send_side_bwe = true;
1099 screenshare.video[0] = {true, 1850, 1110, 30, 50000, 200000,
1100 2000000, false, "VP9", 1, 0, 400000,
1101 false, false, false, ""};
1102 screenshare.screenshare[0] = {true, false, 10};
1103 screenshare.analyzer = {"screenshare_slides_vp9_3sl_variable_fps", 0.0, 0.0,
1104 kFullStackTestDurationSecs};
1105 screenshare.ss[0] = {
1106 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1107 std::vector<SpatialLayer>(), true};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001108 fixture->RunWithAnalyzer(screenshare);
sprang@webrtc.org131bea82015-02-18 12:46:06 +00001109}
ilnik2a8c2f52017-02-15 02:23:28 -08001110
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001111TEST(FullStackTest, VP9SVC_3SL_High) {
1112 auto fixture = CreateVideoQualityTestFixture();
1113 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001114 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001115 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001116 simulcast.analyzer = {"vp9svc_3sl_high", 0.0, 0.0,
1117 kFullStackTestDurationSecs};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001118
Sergey Silkin57027362018-05-15 09:12:05 +02001119 simulcast.ss[0] = {
1120 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOn,
1121 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001122 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001123}
1124
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001125TEST(FullStackTest, VP9SVC_3SL_Medium) {
1126 auto fixture = CreateVideoQualityTestFixture();
1127 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001128 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001129 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001130 simulcast.analyzer = {"vp9svc_3sl_medium", 0.0, 0.0,
1131 kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001132 simulcast.ss[0] = {
1133 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOn,
1134 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001135 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001136}
1137
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001138TEST(FullStackTest, VP9SVC_3SL_Low) {
1139 auto fixture = CreateVideoQualityTestFixture();
1140 ParamsWithLogging simulcast;
ilnik2a8c2f52017-02-15 02:23:28 -08001141 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001142 simulcast.video[0] = SvcVp9Video();
ilnik2a8c2f52017-02-15 02:23:28 -08001143 simulcast.analyzer = {"vp9svc_3sl_low", 0.0, 0.0, kFullStackTestDurationSecs};
Sergey Silkin57027362018-05-15 09:12:05 +02001144 simulcast.ss[0] = {
1145 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOn,
1146 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001147 fixture->RunWithAnalyzer(simulcast);
ilnik2a8c2f52017-02-15 02:23:28 -08001148}
Sergey Silkin0643fd62018-05-17 12:50:53 +02001149
Sergey Silkin7f978f12018-09-10 12:01:49 +00001150// bugs.webrtc.org/9506
1151#if !defined(WEBRTC_MAC)
1152
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001153TEST(FullStackTest, VP9KSVC_3SL_High) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001154 webrtc::test::ScopedFieldTrials override_trials(
1155 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001156 auto fixture = CreateVideoQualityTestFixture();
1157 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001158 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001159 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001160 simulcast.analyzer = {"vp9ksvc_3sl_high", 0.0, 0.0,
1161 kFullStackTestDurationSecs};
1162 simulcast.ss[0] = {
1163 std::vector<VideoStream>(), 0, 3, 2, InterLayerPredMode::kOnKeyPic,
1164 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001165 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001166}
1167
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001168TEST(FullStackTest, VP9KSVC_3SL_Medium) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001169 webrtc::test::ScopedFieldTrials override_trials(
1170 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001171 auto fixture = CreateVideoQualityTestFixture();
1172 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001173 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001174 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001175 simulcast.analyzer = {"vp9ksvc_3sl_medium", 0.0, 0.0,
1176 kFullStackTestDurationSecs};
1177 simulcast.ss[0] = {
1178 std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
1179 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001180 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001181}
1182
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001183TEST(FullStackTest, VP9KSVC_3SL_Low) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001184 webrtc::test::ScopedFieldTrials override_trials(
1185 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001186 auto fixture = CreateVideoQualityTestFixture();
1187 ParamsWithLogging simulcast;
Sergey Silkin0643fd62018-05-17 12:50:53 +02001188 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001189 simulcast.video[0] = SvcVp9Video();
Sergey Silkin0643fd62018-05-17 12:50:53 +02001190 simulcast.analyzer = {"vp9ksvc_3sl_low", 0.0, 0.0,
1191 kFullStackTestDurationSecs};
1192 simulcast.ss[0] = {
1193 std::vector<VideoStream>(), 0, 3, 0, InterLayerPredMode::kOnKeyPic,
1194 std::vector<SpatialLayer>(), false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001195 fixture->RunWithAnalyzer(simulcast);
Sergey Silkin0643fd62018-05-17 12:50:53 +02001196}
“Michael277a6562018-06-01 14:09:19 -05001197
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001198TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001199 webrtc::test::ScopedFieldTrials override_trials(
1200 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001201 auto fixture = CreateVideoQualityTestFixture();
Niels Möller0e909822018-08-21 17:34:35 +02001202 ParamsWithLogging simulcast;
“Michael277a6562018-06-01 14:09:19 -05001203 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001204 simulcast.video[0] = SvcVp9Video();
“Michael277a6562018-06-01 14:09:19 -05001205 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted", 0.0, 0.0,
1206 kFullStackTestDurationSecs};
1207 simulcast.ss[0] = {
Sergey Silkine7ce8882018-10-03 18:04:57 +02001208 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
“Michael277a6562018-06-01 14:09:19 -05001209 std::vector<SpatialLayer>(), false};
Artem Titovf18b3522018-08-28 16:54:24 +02001210 simulcast.config->link_capacity_kbps = 1000;
Sergey Silkine7ce8882018-10-03 18:04:57 +02001211 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001212 fixture->RunWithAnalyzer(simulcast);
“Michael277a6562018-06-01 14:09:19 -05001213}
Erik Språngd3438aa2018-11-08 16:56:43 +01001214
1215// TODO(webrtc:9722): Remove when experiment is cleaned up.
1216TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
1217 webrtc::test::ScopedFieldTrials override_trials(
1218 AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
1219 "WebRTC-LibvpxVp9TrustedRateController/Enabled/"));
1220 auto fixture = CreateVideoQualityTestFixture();
1221 ParamsWithLogging simulcast;
1222 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001223 simulcast.video[0] = SvcVp9Video();
Erik Språngd3438aa2018-11-08 16:56:43 +01001224 simulcast.analyzer = {"vp9ksvc_3sl_medium_network_restricted_trusted_rate",
1225 0.0, 0.0, kFullStackTestDurationSecs};
1226 simulcast.ss[0] = {
1227 std::vector<VideoStream>(), 0, 3, -1, InterLayerPredMode::kOnKeyPic,
1228 std::vector<SpatialLayer>(), false};
1229 simulcast.config->link_capacity_kbps = 1000;
1230 simulcast.config->queue_delay_ms = 100;
1231 fixture->RunWithAnalyzer(simulcast);
1232}
Sergey Silkin7f978f12018-09-10 12:01:49 +00001233#endif // !defined(WEBRTC_MAC)
1234
Mirko Bonadei8ef57932018-11-16 14:38:03 +01001235#endif // defined(RTC_ENABLE_VP9)
brandtr93c5d032016-11-30 07:50:07 -08001236
ilnik6b826ef2017-06-16 06:53:48 -07001237// Android bots can't handle FullHD, so disable the test.
Ilya Nikolaevskiy7e5203f2018-09-10 12:04:50 +00001238// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
1239#if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
ilnik6b826ef2017-06-16 06:53:48 -07001240#define MAYBE_SimulcastFullHdOveruse DISABLED_SimulcastFullHdOveruse
1241#else
1242#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
1243#endif
1244
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001245TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
1246 auto fixture = CreateVideoQualityTestFixture();
1247 ParamsWithLogging simulcast;
ilnik6b826ef2017-06-16 06:53:48 -07001248 simulcast.call.send_side_bwe = true;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001249 simulcast.video[0] = {true, 1920, 1080, 30, 800000,
1250 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001251 2, 400000, false, false, false, "Generator"};
ilnik6b826ef2017-06-16 06:53:48 -07001252 simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
1253 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001254 simulcast.config->loss_percent = 0;
1255 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001256 std::vector<VideoStream> streams = {
1257 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1258 VideoQualityTest::DefaultVideoStream(simulcast, 0),
1259 VideoQualityTest::DefaultVideoStream(simulcast, 0)
1260 };
Sergey Silkin57027362018-05-15 09:12:05 +02001261 simulcast.ss[0] = {
1262 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1263 true};
Erik Språngb6b1cac2018-08-09 16:12:54 +02001264 webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
1265 "WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001266 fixture->RunWithAnalyzer(simulcast);
ilnik6b826ef2017-06-16 06:53:48 -07001267}
1268
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001269TEST(FullStackTest, SimulcastVP8_3SL_High) {
1270 auto fixture = CreateVideoQualityTestFixture();
1271 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001272 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001273 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001274 simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001275 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001276 simulcast.config->loss_percent = 0;
1277 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001278 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001279 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001280 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001281 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001282 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001283 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001284
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001285 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001286 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1287 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1288 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001289 simulcast.ss[0] = {
1290 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1291 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001292 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001293}
1294
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001295TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
1296 auto fixture = CreateVideoQualityTestFixture();
1297 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001298 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001299 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001300 simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001301 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001302 simulcast.config->loss_percent = 0;
1303 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001304 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001305 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001306 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001307 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001308 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001309 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001310
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001311 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001312 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1313 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1314 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001315 simulcast.ss[0] = {
1316 streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1317 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001318 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001319}
1320
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001321TEST(FullStackTest, SimulcastVP8_3SL_Low) {
1322 auto fixture = CreateVideoQualityTestFixture();
1323 ParamsWithLogging simulcast;
ilnik3dd5ad92017-02-09 04:58:53 -08001324 simulcast.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001325 simulcast.video[0] = SimulcastVp8VideoHigh();
ilnik2a8c2f52017-02-15 02:23:28 -08001326 simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
ilnik3dd5ad92017-02-09 04:58:53 -08001327 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001328 simulcast.config->loss_percent = 0;
1329 simulcast.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001330 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001331 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001332 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001333 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001334 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001335 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnik3dd5ad92017-02-09 04:58:53 -08001336
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001337 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001338 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1339 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1340 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Sergey Silkin57027362018-05-15 09:12:05 +02001341 simulcast.ss[0] = {
1342 streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1343 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001344 fixture->RunWithAnalyzer(simulcast);
ilnik3dd5ad92017-02-09 04:58:53 -08001345}
1346
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001347// This test assumes ideal network conditions with target bandwidth being
1348// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
1349// Android32 bots can't handle this high bitrate, so disable test for those.
1350#if defined(WEBRTC_ANDROID)
Emircan Uysaler62f55322019-01-16 17:48:47 -05001351#define MAYBE_HighBitrateWithFakeCodec DISABLED_HighBitrateWithFakeCodec
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -05001352#else
1353#define MAYBE_HighBitrateWithFakeCodec HighBitrateWithFakeCodec
1354#endif // defined(WEBRTC_ANDROID)
1355TEST(FullStackTest, MAYBE_HighBitrateWithFakeCodec) {
1356 auto fixture = CreateVideoQualityTestFixture();
1357 const int target_bitrate = 100000000;
1358 ParamsWithLogging generator;
1359 generator.call.send_side_bwe = true;
1360 generator.call.call_bitrate_config.min_bitrate_bps = target_bitrate;
1361 generator.call.call_bitrate_config.start_bitrate_bps = target_bitrate;
1362 generator.call.call_bitrate_config.max_bitrate_bps = target_bitrate;
1363 generator.video[0] = {true,
1364 360,
1365 240,
1366 30,
1367 target_bitrate / 2,
1368 target_bitrate,
1369 target_bitrate * 2,
1370 false,
1371 "FakeCodec",
1372 1,
1373 0,
1374 0,
1375 false,
1376 false,
1377 false,
1378 "Generator"};
1379 generator.analyzer = {"high_bitrate_with_fake_codec", 0.0, 0.0,
1380 kFullStackTestDurationSecs};
1381 fixture->RunWithAnalyzer(generator);
1382}
1383
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001384TEST(FullStackTest, LargeRoomVP8_5thumb) {
1385 auto fixture = CreateVideoQualityTestFixture();
1386 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001387 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001388 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001389 large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
1390 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001391 large_room.config->loss_percent = 0;
1392 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001393 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001394 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001395 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001396 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001397 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001398 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001399
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001400 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001401 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1402 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1403 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001404 large_room.call.num_thumbnails = 5;
Sergey Silkin57027362018-05-15 09:12:05 +02001405 large_room.ss[0] = {
1406 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1407 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001408 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001409}
1410
oprypin743117f2017-09-15 05:24:24 -07001411#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1412// Fails on mobile devices:
ilnikf89a7382017-03-07 06:15:27 -08001413// https://bugs.chromium.org/p/webrtc/issues/detail?id=7301
1414#define MAYBE_LargeRoomVP8_50thumb DISABLED_LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001415#define MAYBE_LargeRoomVP8_15thumb DISABLED_LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001416#else
1417#define MAYBE_LargeRoomVP8_50thumb LargeRoomVP8_50thumb
ilnik3ae7c252017-03-08 01:17:35 -08001418#define MAYBE_LargeRoomVP8_15thumb LargeRoomVP8_15thumb
ilnikf89a7382017-03-07 06:15:27 -08001419#endif
1420
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001421TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
1422 auto fixture = CreateVideoQualityTestFixture();
1423 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001424 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001425 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001426 large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
1427 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001428 large_room.config->loss_percent = 0;
1429 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001430 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001431 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001432 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001433 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001434 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001435 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001436
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001437 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001438 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1439 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1440 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001441 large_room.call.num_thumbnails = 15;
Sergey Silkin57027362018-05-15 09:12:05 +02001442 large_room.ss[0] = {
1443 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1444 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001445 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001446}
1447
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001448TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
1449 auto fixture = CreateVideoQualityTestFixture();
1450 ParamsWithLogging large_room;
ilnika014cc52017-03-07 04:21:04 -08001451 large_room.call.send_side_bwe = true;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001452 large_room.video[0] = SimulcastVp8VideoHigh();
ilnika014cc52017-03-07 04:21:04 -08001453 large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
1454 kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001455 large_room.config->loss_percent = 0;
1456 large_room.config->queue_delay_ms = 100;
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001457 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001458 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001459 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001460 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001461 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001462 video_params_low.video[0] = SimulcastVp8VideoLow();
ilnika014cc52017-03-07 04:21:04 -08001463
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001464 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001465 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1466 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1467 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
ilnik98436952017-07-13 00:47:03 -07001468 large_room.call.num_thumbnails = 50;
Sergey Silkin57027362018-05-15 09:12:05 +02001469 large_room.ss[0] = {
1470 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1471 false};
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001472 fixture->RunWithAnalyzer(large_room);
ilnika014cc52017-03-07 04:21:04 -08001473}
1474
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001475INSTANTIATE_TEST_SUITE_P(
1476 FullStackTest,
1477 GenericDescriptorTest,
1478 ::testing::Values("WebRTC-GenericDescriptor/Disabled/",
1479 "WebRTC-GenericDescriptor/Enabled/"));
philipeldd8b0d82018-09-27 11:18:10 +02001480
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001481class DualStreamsTest : public ::testing::TestWithParam<int> {};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001482
1483// Disable dual video test on mobile device becuase it's too heavy.
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001484// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on MAC.
1485#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001486TEST_P(DualStreamsTest,
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001487 ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) {
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001488 test::ScopedFieldTrials field_trial(
Erik Språngb65aa012018-09-24 11:35:19 +02001489 AppendFieldTrials(std::string(kPacerPushBackExperiment) +
1490 std::string(kScreenshareSimulcastExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001491 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001492 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001493
1494 // Screenshare Settings.
1495 dual_streams.screenshare[first_stream] = {true, false, 10};
Ilya Nikolaevskiyaec663e2019-02-27 12:52:11 +01001496 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
1497 2500000, false, "VP8", 2, 1, 400000,
1498 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001499
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001500 ParamsWithLogging screenshare_params_high;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001501 screenshare_params_high.video[0] = {
1502 true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
1503 "VP8", 2, 0, 400000, false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001504 VideoQualityTest::Params screenshare_params_low;
Ilya Nikolaevskiydda5fdc2019-02-27 10:00:06 +01001505 screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
Erik Språng28bb3912018-07-11 16:06:55 +02001506 1000000, false, "VP8", 2, 0, 400000,
1507 false, false, false, ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001508 std::vector<VideoStream> screenhsare_streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001509 VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
1510 VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001511
Sergey Silkin57027362018-05-15 09:12:05 +02001512 dual_streams.ss[first_stream] = {
1513 screenhsare_streams, 1, 1, 0, InterLayerPredMode::kOn,
1514 std::vector<SpatialLayer>(), false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001515
1516 // Video settings.
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001517 dual_streams.video[1 - first_stream] = SimulcastVp8VideoHigh();
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001518
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001519 ParamsWithLogging video_params_high;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001520 video_params_high.video[0] = SimulcastVp8VideoHigh();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001521 ParamsWithLogging video_params_medium;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001522 video_params_medium.video[0] = SimulcastVp8VideoMedium();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001523 ParamsWithLogging video_params_low;
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001524 video_params_low.video[0] = SimulcastVp8VideoLow();
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001525 std::vector<VideoStream> streams = {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001526 VideoQualityTest::DefaultVideoStream(video_params_low, 0),
1527 VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
1528 VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001529
1530 dual_streams.ss[1 - first_stream] = {
Sergey Silkin57027362018-05-15 09:12:05 +02001531 streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
1532 false};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001533
1534 // Call settings.
1535 dual_streams.call.send_side_bwe = true;
1536 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001537 std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
1538 std::to_string(first_stream);
1539 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001540 dual_streams.config->loss_percent = 1;
1541 dual_streams.config->link_capacity_kbps = 7500;
1542 dual_streams.config->queue_length_packets = 30;
1543 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001544
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001545 auto fixture = CreateVideoQualityTestFixture();
1546 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001547}
Ilya Nikolaevskiyf08dd9d2018-10-09 17:22:15 +02001548#endif // !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) &&
1549 // !defined(WEBRTC_MAC)
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001550
1551TEST_P(DualStreamsTest, Conference_Restricted) {
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001552 test::ScopedFieldTrials field_trial(
Ilya Nikolaevskiycb960622018-09-04 09:07:31 +00001553 AppendFieldTrials(std::string(kPacerPushBackExperiment)));
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001554 const int first_stream = GetParam();
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001555 ParamsWithLogging dual_streams;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001556
1557 // Screenshare Settings.
1558 dual_streams.screenshare[first_stream] = {true, false, 10};
1559 dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
1560 2500000, 2500000, false, "VP8", 3,
Niels Möller6aa415e2018-06-07 11:14:13 +02001561 2, 400000, false, false, false,
1562 ""};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001563 // Video settings.
1564 dual_streams.video[1 - first_stream] = {
Rasmus Brandt3c589be2019-03-13 11:32:40 +01001565 true, 1280,
1566 720, 30,
1567 150000, 500000,
1568 700000, false,
1569 "VP8", 3,
1570 2, 400000,
1571 false, false,
1572 false, ClipNameToClipPath("ConferenceMotion_1280_720_50")};
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001573
1574 // Call settings.
1575 dual_streams.call.send_side_bwe = true;
1576 dual_streams.call.dual_video = true;
Edward Lemur35d2b7e2017-12-27 18:54:47 +01001577 std::string test_label = "dualstreams_conference_restricted_screenshare_" +
1578 std::to_string(first_stream);
1579 dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
Artem Titovf18b3522018-08-28 16:54:24 +02001580 dual_streams.config->loss_percent = 1;
1581 dual_streams.config->link_capacity_kbps = 5000;
1582 dual_streams.config->queue_length_packets = 30;
1583 dual_streams.config->queue_delay_ms = 100;
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001584
Patrik Höglundb6b29e02018-06-21 16:58:01 +02001585 auto fixture = CreateVideoQualityTestFixture();
1586 fixture->RunWithAnalyzer(dual_streams);
Ilya Nikolaevskiy255d1cd2017-12-21 18:02:59 +01001587}
1588
Mirko Bonadeic84f6612019-01-31 12:20:57 +01001589INSTANTIATE_TEST_SUITE_P(FullStackTest,
1590 DualStreamsTest,
1591 ::testing::Values(0, 1));
ilnika014cc52017-03-07 04:21:04 -08001592
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001593} // namespace webrtc