Reland: Rename VideoQualityTestFixtureInterface::Params.pipe into config.

Also make it optional and use default value, if optional is not
specified. It is done also for next refactoring, that will introduce
ability to override network simulation layer.

Bug: webrtc:9630
Change-Id: I2f9b84770e428a7738b47bcf2da1002697c0f313
Reviewed-on: https://webrtc-review.googlesource.com/96580
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24472}
This commit is contained in:
Artem Titov
2018-08-28 16:54:24 +02:00
committed by Commit Bot
parent 9427f48f59
commit f18b352842
6 changed files with 125 additions and 112 deletions

View File

@ -80,7 +80,13 @@ class VideoQualityTestFixtureInterface {
std::string graph_data_output_filename;
std::string graph_title;
} analyzer;
// Deprecated. DO NOT USE. Use config instead. This is not pipe actually,
// it is just configuration, that will be passed to default implementation
// of simulation layer.
DefaultNetworkSimulationConfig pipe;
// Config for default simulation implementation. May be nullopt in that
// case, a default config will be used.
absl::optional<DefaultNetworkSimulationConfig> config;
struct SS { // Spatial scalability.
std::vector<VideoStream> streams; // If empty, one stream is assumed.
size_t selected_stream;

View File

@ -59,6 +59,7 @@ struct ParamsWithLogging : public VideoQualityTest::Params {
// Use these logging flags by default, for everything.
logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
flags::EncodedFramePath()};
this->config = DefaultNetworkSimulationConfig();
}
};
@ -105,8 +106,8 @@ TEST(FullStackTest, ForemanCifPlr5Vp9) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 5;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -219,7 +220,7 @@ TEST(FullStackTest, ForemanCifLink150kbpsWithoutPacketLoss) {
foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.link_capacity_kbps = 150;
foreman_cif.config->link_capacity_kbps = 150;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -232,8 +233,8 @@ TEST(FullStackTest, ForemanCifPlr5) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 5;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -246,8 +247,8 @@ TEST(FullStackTest, ForemanCifPlr5Ulpfec) {
0, 0, true, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 5;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -260,8 +261,8 @@ TEST(FullStackTest, ForemanCifPlr5Flexfec) {
0, 0, false, true, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 5;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -274,9 +275,9 @@ TEST(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
0, 0, false, true, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
0.0, kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 3;
foreman_cif.pipe.link_capacity_kbps = 500;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 3;
foreman_cif.config->link_capacity_kbps = 500;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -289,9 +290,9 @@ TEST(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
0, 0, true, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
0.0, kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 3;
foreman_cif.pipe.link_capacity_kbps = 500;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 3;
foreman_cif.config->link_capacity_kbps = 500;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -330,8 +331,8 @@ TEST(FullStackTest, ForemanCifPlr5H264) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 5;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -347,8 +348,8 @@ TEST(FullStackTest, ForemanCifPlr5H264SpsPpsIdrIsKeyframe) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
0.0, kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 5;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -362,8 +363,8 @@ TEST(FullStackTest, ForemanCifPlr5H264Flexfec) {
0, 0, false, true, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 5;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -378,8 +379,8 @@ TEST(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
0, 0, true, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5;
foreman_cif.pipe.queue_delay_ms = 50;
foreman_cif.config->loss_percent = 5;
foreman_cif.config->queue_delay_ms = 50;
fixture->RunWithAnalyzer(foreman_cif);
}
#endif // defined(WEBRTC_USE_H264)
@ -393,9 +394,9 @@ TEST(FullStackTest, ForemanCif500kbps) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 0;
foreman_cif.pipe.queue_delay_ms = 0;
foreman_cif.pipe.link_capacity_kbps = 500;
foreman_cif.config->queue_length_packets = 0;
foreman_cif.config->queue_delay_ms = 0;
foreman_cif.config->link_capacity_kbps = 500;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -408,9 +409,9 @@ TEST(FullStackTest, ForemanCif500kbpsLimitedQueue) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 32;
foreman_cif.pipe.queue_delay_ms = 0;
foreman_cif.pipe.link_capacity_kbps = 500;
foreman_cif.config->queue_length_packets = 32;
foreman_cif.config->queue_delay_ms = 0;
foreman_cif.config->link_capacity_kbps = 500;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -423,9 +424,9 @@ TEST(FullStackTest, ForemanCif500kbps100ms) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 0;
foreman_cif.pipe.queue_delay_ms = 100;
foreman_cif.pipe.link_capacity_kbps = 500;
foreman_cif.config->queue_length_packets = 0;
foreman_cif.config->queue_delay_ms = 100;
foreman_cif.config->link_capacity_kbps = 500;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -438,9 +439,9 @@ TEST(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 32;
foreman_cif.pipe.queue_delay_ms = 100;
foreman_cif.pipe.link_capacity_kbps = 500;
foreman_cif.config->queue_length_packets = 32;
foreman_cif.config->queue_delay_ms = 100;
foreman_cif.config->link_capacity_kbps = 500;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -453,9 +454,9 @@ TEST(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
0.0, 0.0, kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 32;
foreman_cif.pipe.queue_delay_ms = 100;
foreman_cif.pipe.link_capacity_kbps = 500;
foreman_cif.config->queue_length_packets = 32;
foreman_cif.config->queue_delay_ms = 100;
foreman_cif.config->link_capacity_kbps = 500;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -468,9 +469,9 @@ TEST(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
0, 0, false, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 32;
foreman_cif.pipe.queue_delay_ms = 100;
foreman_cif.pipe.link_capacity_kbps = 1000;
foreman_cif.config->queue_length_packets = 32;
foreman_cif.config->queue_delay_ms = 100;
foreman_cif.config->link_capacity_kbps = 1000;
fixture->RunWithAnalyzer(foreman_cif);
}
@ -485,9 +486,9 @@ TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
0, 0, false, false, false, "ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
0.0, 0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 32;
conf_motion_hd.pipe.queue_delay_ms = 100;
conf_motion_hd.pipe.link_capacity_kbps = 2000;
conf_motion_hd.config->queue_length_packets = 32;
conf_motion_hd.config->queue_delay_ms = 100;
conf_motion_hd.config->link_capacity_kbps = 2000;
fixture->RunWithAnalyzer(conf_motion_hd);
}
@ -501,10 +502,10 @@ TEST(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
-1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50;
conf_motion_hd.pipe.loss_percent = 3;
conf_motion_hd.pipe.queue_delay_ms = 100;
conf_motion_hd.pipe.link_capacity_kbps = 2000;
conf_motion_hd.config->queue_length_packets = 50;
conf_motion_hd.config->loss_percent = 3;
conf_motion_hd.config->queue_delay_ms = 100;
conf_motion_hd.config->link_capacity_kbps = 2000;
fixture->RunWithAnalyzer(conf_motion_hd);
}
@ -518,10 +519,10 @@ TEST(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
-1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0,
0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50;
conf_motion_hd.pipe.loss_percent = 3;
conf_motion_hd.pipe.queue_delay_ms = 100;
conf_motion_hd.pipe.link_capacity_kbps = 2000;
conf_motion_hd.config->queue_length_packets = 50;
conf_motion_hd.config->loss_percent = 3;
conf_motion_hd.config->queue_delay_ms = 100;
conf_motion_hd.config->link_capacity_kbps = 2000;
fixture->RunWithAnalyzer(conf_motion_hd);
}
@ -535,10 +536,10 @@ TEST(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
-1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50;
conf_motion_hd.pipe.loss_percent = 3;
conf_motion_hd.pipe.queue_delay_ms = 100;
conf_motion_hd.pipe.link_capacity_kbps = 2000;
conf_motion_hd.config->queue_length_packets = 50;
conf_motion_hd.config->loss_percent = 3;
conf_motion_hd.config->queue_delay_ms = 100;
conf_motion_hd.config->link_capacity_kbps = 2000;
fixture->RunWithAnalyzer(conf_motion_hd);
}
@ -552,10 +553,10 @@ TEST(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
-1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50;
conf_motion_hd.pipe.loss_percent = 3;
conf_motion_hd.pipe.queue_delay_ms = 100;
conf_motion_hd.pipe.link_capacity_kbps = 2000;
conf_motion_hd.config->queue_length_packets = 50;
conf_motion_hd.config->loss_percent = 3;
conf_motion_hd.config->queue_delay_ms = 100;
conf_motion_hd.config->link_capacity_kbps = 2000;
fixture->RunWithAnalyzer(conf_motion_hd);
}
@ -571,10 +572,10 @@ TEST(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
-1, 0, false, false, false, "ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
0.0, 0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50;
conf_motion_hd.pipe.loss_percent = 3;
conf_motion_hd.pipe.queue_delay_ms = 100;
conf_motion_hd.pipe.link_capacity_kbps = 2000;
conf_motion_hd.config->queue_length_packets = 50;
conf_motion_hd.config->loss_percent = 3;
conf_motion_hd.config->queue_delay_ms = 100;
conf_motion_hd.config->link_capacity_kbps = 2000;
fixture->RunWithAnalyzer(conf_motion_hd);
}
@ -590,9 +591,9 @@ TEST(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
conf_motion_hd.analyzer = {
"conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 32;
conf_motion_hd.pipe.queue_delay_ms = 100;
conf_motion_hd.pipe.link_capacity_kbps = 2000;
conf_motion_hd.config->queue_length_packets = 32;
conf_motion_hd.config->queue_delay_ms = 100;
conf_motion_hd.config->link_capacity_kbps = 2000;
fixture->RunWithAnalyzer(conf_motion_hd);
}
#endif
@ -666,9 +667,9 @@ TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
screenshare.screenshare[0] = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
kFullStackTestDurationSecs};
screenshare.pipe.loss_percent = 5;
screenshare.pipe.queue_delay_ms = 200;
screenshare.pipe.link_capacity_kbps = 500;
screenshare.config->loss_percent = 5;
screenshare.config->queue_delay_ms = 200;
screenshare.config->link_capacity_kbps = 500;
fixture->RunWithAnalyzer(screenshare);
}
@ -684,9 +685,9 @@ TEST(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
screenshare.screenshare[0] = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
kFullStackTestDurationSecs};
screenshare.pipe.loss_percent = 10;
screenshare.pipe.queue_delay_ms = 200;
screenshare.pipe.link_capacity_kbps = 500;
screenshare.config->loss_percent = 10;
screenshare.config->queue_delay_ms = 200;
screenshare.config->link_capacity_kbps = 500;
fixture->RunWithAnalyzer(screenshare);
}
@ -702,9 +703,9 @@ TEST(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
screenshare.screenshare[0] = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
kFullStackTestDurationSecs};
screenshare.pipe.loss_percent = 5;
screenshare.pipe.link_capacity_kbps = 200;
screenshare.pipe.queue_length_packets = 30;
screenshare.config->loss_percent = 5;
screenshare.config->link_capacity_kbps = 200;
screenshare.config->queue_length_packets = 30;
fixture->RunWithAnalyzer(screenshare);
}
@ -721,9 +722,9 @@ TEST(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
screenshare.screenshare[0] = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
kFullStackTestDurationSecs};
screenshare.pipe.loss_percent = 1;
screenshare.pipe.link_capacity_kbps = 1200;
screenshare.pipe.queue_length_packets = 30;
screenshare.config->loss_percent = 1;
screenshare.config->link_capacity_kbps = 1200;
screenshare.config->queue_length_packets = 30;
fixture->RunWithAnalyzer(screenshare);
}
@ -856,7 +857,7 @@ TEST(FullStackTest, VP9KSVC_3SL_Medium_Network_Restricted) {
simulcast.ss[0] = {
std::vector<VideoStream>(), 0, 3, 1, InterLayerPredMode::kOnKeyPic,
std::vector<SpatialLayer>(), false};
simulcast.pipe.link_capacity_kbps = 1000;
simulcast.config->link_capacity_kbps = 1000;
fixture->RunWithAnalyzer(simulcast);
}
#endif // !defined(WEBRTC_MAC)
@ -880,8 +881,8 @@ TEST(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
2, 400000, false, false, false, "Generator"};
simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
kFullStackTestDurationSecs};
simulcast.pipe.loss_percent = 0;
simulcast.pipe.queue_delay_ms = 100;
simulcast.config->loss_percent = 0;
simulcast.config->queue_delay_ms = 100;
std::vector<VideoStream> streams = {
VideoQualityTest::DefaultVideoStream(simulcast, 0),
VideoQualityTest::DefaultVideoStream(simulcast, 0),
@ -902,8 +903,8 @@ TEST(FullStackTest, SimulcastVP8_3SL_High) {
simulcast.video[0] = kSimulcastVp8VideoHigh;
simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0,
kFullStackTestDurationSecs};
simulcast.pipe.loss_percent = 0;
simulcast.pipe.queue_delay_ms = 100;
simulcast.config->loss_percent = 0;
simulcast.config->queue_delay_ms = 100;
ParamsWithLogging video_params_high;
video_params_high.video[0] = kSimulcastVp8VideoHigh;
ParamsWithLogging video_params_medium;
@ -928,8 +929,8 @@ TEST(FullStackTest, SimulcastVP8_3SL_Medium) {
simulcast.video[0] = kSimulcastVp8VideoHigh;
simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0,
kFullStackTestDurationSecs};
simulcast.pipe.loss_percent = 0;
simulcast.pipe.queue_delay_ms = 100;
simulcast.config->loss_percent = 0;
simulcast.config->queue_delay_ms = 100;
ParamsWithLogging video_params_high;
video_params_high.video[0] = kSimulcastVp8VideoHigh;
ParamsWithLogging video_params_medium;
@ -954,8 +955,8 @@ TEST(FullStackTest, SimulcastVP8_3SL_Low) {
simulcast.video[0] = kSimulcastVp8VideoHigh;
simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0,
kFullStackTestDurationSecs};
simulcast.pipe.loss_percent = 0;
simulcast.pipe.queue_delay_ms = 100;
simulcast.config->loss_percent = 0;
simulcast.config->queue_delay_ms = 100;
ParamsWithLogging video_params_high;
video_params_high.video[0] = kSimulcastVp8VideoHigh;
ParamsWithLogging video_params_medium;
@ -980,8 +981,8 @@ TEST(FullStackTest, LargeRoomVP8_5thumb) {
large_room.video[0] = kSimulcastVp8VideoHigh;
large_room.analyzer = {"largeroom_5thumb", 0.0, 0.0,
kFullStackTestDurationSecs};
large_room.pipe.loss_percent = 0;
large_room.pipe.queue_delay_ms = 100;
large_room.config->loss_percent = 0;
large_room.config->queue_delay_ms = 100;
ParamsWithLogging video_params_high;
video_params_high.video[0] = kSimulcastVp8VideoHigh;
ParamsWithLogging video_params_medium;
@ -1017,8 +1018,8 @@ TEST(FullStackTest, MAYBE_LargeRoomVP8_15thumb) {
large_room.video[0] = kSimulcastVp8VideoHigh;
large_room.analyzer = {"largeroom_15thumb", 0.0, 0.0,
kFullStackTestDurationSecs};
large_room.pipe.loss_percent = 0;
large_room.pipe.queue_delay_ms = 100;
large_room.config->loss_percent = 0;
large_room.config->queue_delay_ms = 100;
ParamsWithLogging video_params_high;
video_params_high.video[0] = kSimulcastVp8VideoHigh;
ParamsWithLogging video_params_medium;
@ -1044,8 +1045,8 @@ TEST(FullStackTest, MAYBE_LargeRoomVP8_50thumb) {
large_room.video[0] = kSimulcastVp8VideoHigh;
large_room.analyzer = {"largeroom_50thumb", 0.0, 0.0,
kFullStackTestDurationSecs};
large_room.pipe.loss_percent = 0;
large_room.pipe.queue_delay_ms = 100;
large_room.config->loss_percent = 0;
large_room.config->queue_delay_ms = 100;
ParamsWithLogging video_params_high;
video_params_high.video[0] = kSimulcastVp8VideoHigh;
ParamsWithLogging video_params_medium;
@ -1123,10 +1124,10 @@ TEST_P(DualStreamsTest,
std::string test_label = "dualstreams_moderately_restricted_screenshare_" +
std::to_string(first_stream);
dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
dual_streams.pipe.loss_percent = 1;
dual_streams.pipe.link_capacity_kbps = 7500;
dual_streams.pipe.queue_length_packets = 30;
dual_streams.pipe.queue_delay_ms = 100;
dual_streams.config->loss_percent = 1;
dual_streams.config->link_capacity_kbps = 7500;
dual_streams.config->queue_length_packets = 30;
dual_streams.config->queue_delay_ms = 100;
auto fixture = CreateVideoQualityTestFixture();
fixture->RunWithAnalyzer(dual_streams);
@ -1158,10 +1159,10 @@ TEST_P(DualStreamsTest, Conference_Restricted) {
std::string test_label = "dualstreams_conference_restricted_screenshare_" +
std::to_string(first_stream);
dual_streams.analyzer = {test_label, 0.0, 0.0, kFullStackTestDurationSecs};
dual_streams.pipe.loss_percent = 1;
dual_streams.pipe.link_capacity_kbps = 5000;
dual_streams.pipe.queue_length_packets = 30;
dual_streams.pipe.queue_delay_ms = 100;
dual_streams.config->loss_percent = 1;
dual_streams.config->link_capacity_kbps = 5000;
dual_streams.config->queue_length_packets = 30;
dual_streams.config->queue_delay_ms = 100;
auto fixture = CreateVideoQualityTestFixture();
fixture->RunWithAnalyzer(dual_streams);

View File

@ -274,7 +274,7 @@ DEFINE_bool(help, false, "prints this message");
} // namespace flags
void Loopback() {
FakeNetworkPipe::Config pipe_config;
DefaultNetworkSimulationConfig pipe_config;
pipe_config.loss_percent = flags::LossPercent();
pipe_config.link_capacity_kbps = flags::LinkCapacityKbps();
pipe_config.queue_length_packets = flags::QueueSize();
@ -314,7 +314,7 @@ void Loopback() {
flags::DurationSecs(),
flags::OutputFilename(),
flags::GraphTitle()};
params.pipe = pipe_config;
params.config = pipe_config;
params.logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
flags::EncodedFramePath()};

View File

@ -473,7 +473,7 @@ void Loopback() {
screenshare_idx = 0;
}
FakeNetworkPipe::Config pipe_config;
DefaultNetworkSimulationConfig pipe_config;
pipe_config.loss_percent = flags::LossPercent();
pipe_config.avg_burst_loss_length = flags::AvgBurstLossLength();
pipe_config.link_capacity_kbps = flags::LinkCapacityKbps();
@ -538,7 +538,7 @@ void Loopback() {
flags::DurationSecs(),
flags::OutputFilename(),
flags::GraphTitle()};
params.pipe = pipe_config;
params.config = pipe_config;
params.screenshare[camera_idx].enabled = false;
params.screenshare[screenshare_idx] = {

View File

@ -277,7 +277,7 @@ DEFINE_bool(help, false, "prints this message");
} // namespace flags
void Loopback() {
FakeNetworkPipe::Config pipe_config;
DefaultNetworkSimulationConfig pipe_config;
pipe_config.loss_percent = flags::LossPercent();
pipe_config.avg_burst_loss_length = flags::AvgBurstLossLength();
pipe_config.link_capacity_kbps = flags::LinkCapacityKbps();
@ -321,7 +321,7 @@ void Loopback() {
flags::DurationSecs(),
flags::OutputFilename(),
flags::GraphTitle()};
params.pipe = pipe_config;
params.config = pipe_config;
if (flags::NumStreams() > 1 && flags::Stream0().empty() &&
flags::Stream1().empty()) {

View File

@ -118,6 +118,7 @@ VideoQualityTest::Params::Params()
screenshare{{false, false, 10, 0}, {false, false, 10, 0}},
analyzer({"", 0.0, 0.0, 0, "", ""}),
pipe(),
config(absl::nullopt),
ss{{std::vector<VideoStream>(), 0, 0, -1, InterLayerPredMode::kOn,
std::vector<SpatialLayer>()},
{std::vector<VideoStream>(), 0, 0, -1, InterLayerPredMode::kOn,
@ -144,6 +145,11 @@ std::string VideoQualityTest::GenerateGraphTitle() const {
}
void VideoQualityTest::CheckParams() {
if (!params_.config) {
// TODO(titovartem) replace with default config creation when removing
// pipe.
params_.config = params_.pipe;
}
for (size_t video_idx = 0; video_idx < num_video_streams_; ++video_idx) {
// Iterate over primary and secondary video streams.
if (!params_.video[video_idx].enabled)
@ -155,8 +161,8 @@ void VideoQualityTest::CheckParams() {
if (params_.ss[video_idx].num_spatial_layers == 0)
params_.ss[video_idx].num_spatial_layers = 1;
if (params_.pipe.loss_percent != 0 ||
params_.pipe.queue_length_packets != 0) {
if (params_.config->loss_percent != 0 ||
params_.config->queue_length_packets != 0) {
// Since LayerFilteringTransport changes the sequence numbers, we can't
// use that feature with pack loss, since the NACK request would end up
// retransmitting the wrong packets.
@ -802,7 +808,7 @@ VideoQualityTest::CreateSendTransport() {
&task_queue_,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(params_.pipe)),
absl::make_unique<SimulatedNetwork>(*params_.config)),
sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9,
params_.video[0].selected_tl, params_.ss[0].selected_sl,
payload_type_map_, kVideoSendSsrcs[0],
@ -816,7 +822,7 @@ VideoQualityTest::CreateReceiveTransport() {
&task_queue_,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(params_.pipe)),
absl::make_unique<SimulatedNetwork>(*params_.config)),
receiver_call_.get(), payload_type_map_);
}