diff --git a/api/test/video_quality_test_fixture.h b/api/test/video_quality_test_fixture.h index 1d8fc34650..deeb848978 100644 --- a/api/test/video_quality_test_fixture.h +++ b/api/test/video_quality_test_fixture.h @@ -79,7 +79,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 config; struct SS { // Spatial scalability. std::vector streams; // If empty, one stream is assumed. size_t selected_stream; diff --git a/video/full_stack_tests.cc b/video/full_stack_tests.cc index 9c320d795f..bed77f4161 100644 --- a/video/full_stack_tests.cc +++ b/video/full_stack_tests.cc @@ -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(), 0, 3, 1, InterLayerPredMode::kOnKeyPic, std::vector(), 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 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); diff --git a/video/screenshare_loopback.cc b/video/screenshare_loopback.cc index ddc190d7ea..804fbccf25 100644 --- a/video/screenshare_loopback.cc +++ b/video/screenshare_loopback.cc @@ -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()}; diff --git a/video/sv_loopback.cc b/video/sv_loopback.cc index b2a1e2e260..0555fb3552 100644 --- a/video/sv_loopback.cc +++ b/video/sv_loopback.cc @@ -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] = { diff --git a/video/video_loopback.cc b/video/video_loopback.cc index a4d4547dfc..6f45cf3538 100644 --- a/video/video_loopback.cc +++ b/video/video_loopback.cc @@ -273,7 +273,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(); @@ -317,7 +317,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()) { diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc index c61d772408..a2437d5360 100644 --- a/video/video_quality_test.cc +++ b/video/video_quality_test.cc @@ -113,6 +113,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(), 0, 0, -1, InterLayerPredMode::kOn, std::vector()}, {std::vector(), 0, 0, -1, InterLayerPredMode::kOn, @@ -139,6 +140,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) @@ -150,8 +156,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.