diff --git a/api/test/network_emulation_manager.cc b/api/test/network_emulation_manager.cc index 6956094aa4..236e2f0e17 100644 --- a/api/test/network_emulation_manager.cc +++ b/api/test/network_emulation_manager.cc @@ -101,4 +101,22 @@ NetworkEmulationManager::SimulatedNetworkNode::Builder::Build( res.node = net->CreateEmulatedNode(std::move(behavior)); return res; } + +std::pair +NetworkEmulationManager::CreateEndpointPairWithTwoWayRoutes( + const BuiltInNetworkBehaviorConfig& config) { + auto* alice_node = CreateEmulatedNode(config); + auto* bob_node = CreateEmulatedNode(config); + + auto* alice_endpoint = CreateEndpoint(EmulatedEndpointConfig()); + auto* bob_endpoint = CreateEndpoint(EmulatedEndpointConfig()); + + CreateRoute(alice_endpoint, {alice_node}, bob_endpoint); + CreateRoute(bob_endpoint, {bob_node}, alice_endpoint); + + return { + CreateEmulatedNetworkManagerInterface({alice_endpoint}), + CreateEmulatedNetworkManagerInterface({bob_endpoint}), + }; +} } // namespace webrtc diff --git a/api/test/network_emulation_manager.h b/api/test/network_emulation_manager.h index 85dd39cfe8..427ad6d4d4 100644 --- a/api/test/network_emulation_manager.h +++ b/api/test/network_emulation_manager.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "api/array_view.h" @@ -337,6 +338,11 @@ class NetworkEmulationManager { // - GetPeerEndpoint() - the endpoint that is "connected to the internet". virtual EmulatedTURNServerInterface* CreateTURNServer( EmulatedTURNServerConfig config) = 0; + + // Create a pair of EmulatedNetworkManagerInterfaces connected to each other. + std::pair + CreateEndpointPairWithTwoWayRoutes( + const BuiltInNetworkBehaviorConfig& config); }; } // namespace webrtc diff --git a/audio/test/pc_low_bandwidth_audio_test.cc b/audio/test/pc_low_bandwidth_audio_test.cc index e05116ea67..8ce383612e 100644 --- a/audio/test/pc_low_bandwidth_audio_test.cc +++ b/audio/test/pc_low_bandwidth_audio_test.cc @@ -54,24 +54,6 @@ std::string GetMetricTestCaseName() { return test_case_prefix + "_" + test_info->name(); } -std::pair -CreateTwoNetworkLinks(NetworkEmulationManager* emulation, - const BuiltInNetworkBehaviorConfig& config) { - auto* alice_node = emulation->CreateEmulatedNode(config); - auto* bob_node = emulation->CreateEmulatedNode(config); - - auto* alice_endpoint = emulation->CreateEndpoint(EmulatedEndpointConfig()); - auto* bob_endpoint = emulation->CreateEndpoint(EmulatedEndpointConfig()); - - emulation->CreateRoute(alice_endpoint, {alice_node}, bob_endpoint); - emulation->CreateRoute(bob_endpoint, {bob_node}, alice_endpoint); - - return { - emulation->CreateEmulatedNetworkManagerInterface({alice_endpoint}), - emulation->CreateEmulatedNetworkManagerInterface({bob_endpoint}), - }; -} - std::unique_ptr CreateTestFixture(absl::string_view test_case_name, TimeController& time_controller, @@ -135,8 +117,8 @@ TEST(PCLowBandwidthAudioTest, PCGoodNetworkHighBitrate) { CreateNetworkEmulationManager(); auto fixture = CreateTestFixture( GetMetricTestCaseName(), *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { AudioConfig audio; audio.stream_label = "alice-audio"; @@ -162,7 +144,7 @@ TEST(PCLowBandwidthAudioTest, PC40kbpsNetwork) { config.loss_percent = 1; auto fixture = CreateTestFixture( GetMetricTestCaseName(), *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { AudioConfig audio; audio.stream_label = "alice-audio"; diff --git a/pc/test/svc_e2e_tests.cc b/pc/test/svc_e2e_tests.cc index 615e3c39a9..264b990e1b 100644 --- a/pc/test/svc_e2e_tests.cc +++ b/pc/test/svc_e2e_tests.cc @@ -59,30 +59,6 @@ using ::testing::UnitTest; using ::testing::Values; using ::testing::ValuesIn; -EmulatedNetworkNode* CreateEmulatedNodeWithConfig( - NetworkEmulationManager* emulation, - const BuiltInNetworkBehaviorConfig& config) { - return emulation->CreateEmulatedNode(config); -} - -std::pair -CreateTwoNetworkLinks(NetworkEmulationManager* emulation, - const BuiltInNetworkBehaviorConfig& config) { - auto* alice_node = CreateEmulatedNodeWithConfig(emulation, config); - auto* bob_node = CreateEmulatedNodeWithConfig(emulation, config); - - auto* alice_endpoint = emulation->CreateEndpoint(EmulatedEndpointConfig()); - auto* bob_endpoint = emulation->CreateEndpoint(EmulatedEndpointConfig()); - - emulation->CreateRoute(alice_endpoint, {alice_node}, bob_endpoint); - emulation->CreateRoute(bob_endpoint, {bob_node}, alice_endpoint); - - return { - emulation->CreateEmulatedNetworkManagerInterface({alice_endpoint}), - emulation->CreateEmulatedNetworkManagerInterface({bob_endpoint}), - }; -} - std::unique_ptr CreateTestFixture(absl::string_view test_case_name, TimeController& time_controller, @@ -329,8 +305,8 @@ TEST_P(SvcTest, ScalabilityModeSupported) { auto fixture = CreateTestFixture( UnitTest::GetInstance()->current_test_info()->name(), *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [this](PeerConfigurer* alice) { VideoConfig video(/*stream_label=*/"alice-video", /*width=*/1850, /*height=*/1110, /*fps=*/30); diff --git a/video/pc_full_stack_tests.cc b/video/pc_full_stack_tests.cc index 3eab854d75..90617c8f75 100644 --- a/video/pc_full_stack_tests.cc +++ b/video/pc_full_stack_tests.cc @@ -53,31 +53,6 @@ namespace { constexpr int kTestDurationSec = 45; -EmulatedNetworkNode* CreateEmulatedNodeWithConfig( - NetworkEmulationManager* emulation, - const BuiltInNetworkBehaviorConfig& config) { - return emulation->CreateEmulatedNode( - std::make_unique(config)); -} - -std::pair -CreateTwoNetworkLinks(NetworkEmulationManager* emulation, - const BuiltInNetworkBehaviorConfig& config) { - auto* alice_node = CreateEmulatedNodeWithConfig(emulation, config); - auto* bob_node = CreateEmulatedNodeWithConfig(emulation, config); - - auto* alice_endpoint = emulation->CreateEndpoint(EmulatedEndpointConfig()); - auto* bob_endpoint = emulation->CreateEndpoint(EmulatedEndpointConfig()); - - emulation->CreateRoute(alice_endpoint, {alice_node}, bob_endpoint); - emulation->CreateRoute(bob_endpoint, {bob_node}, alice_endpoint); - - return { - emulation->CreateEmulatedNetworkManagerInterface({alice_endpoint}), - emulation->CreateEmulatedNetworkManagerInterface({bob_endpoint}), - }; -} - std::unique_ptr CreateTestFixture(const std::string& test_case_name, TimeController& time_controller, @@ -117,8 +92,8 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Net_Delay_0_0_Plr_0_VP9) { auto fixture = CreateTestFixture( "pc_foreman_cif_net_delay_0_0_plr_0_VP9", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -149,7 +124,7 @@ TEST(PCGenericDescriptorTest, auto fixture = CreateTestFixture( "pc_foreman_cif_delay_50_0_plr_5_VP9_generic_descriptor", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -186,8 +161,8 @@ TEST(PCFullStackTest, MAYBE_Pc_Generator_Net_Delay_0_0_Plr_0_VP9Profile2) { auto fixture = CreateTestFixture( "pc_generator_net_delay_0_0_plr_0_VP9Profile2", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -245,8 +220,8 @@ TEST(PCFullStackTest, Pc_Net_Delay_0_0_Plr_0) { CreateNetworkEmulationManager(); auto fixture = CreateTestFixture( "pc_net_delay_0_0_plr_0", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(176, 144, 30); video.stream_label = "alice-video"; @@ -265,8 +240,8 @@ TEST(PCGenericDescriptorTest, auto fixture = CreateTestFixture( "pc_foreman_cif_net_delay_0_0_plr_0_generic_descriptor", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -286,7 +261,7 @@ TEST(PCGenericDescriptorTest, auto fixture = CreateTestFixture( "pc_foreman_cif_30kbps_net_delay_0_0_plr_0_generic_descriptor", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 10); video.stream_label = "alice-video"; @@ -314,7 +289,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Link_150kbps_Net_Delay_0_0_Plr_0) { auto fixture = CreateTestFixture( "pc_foreman_cif_link_150kbps_net_delay_0_0_plr_0", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -336,7 +311,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Link_130kbps_Delay100ms_Loss1_Ulpfec) { auto fixture = CreateTestFixture( "pc_foreman_cif_link_130kbps_delay100ms_loss1_ulpfec", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -359,7 +334,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Link_50kbps_Delay100ms_Loss1_Ulpfec) { auto fixture = CreateTestFixture( "pc_foreman_cif_link_50kbps_delay100ms_loss1_ulpfec", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -384,7 +359,7 @@ TEST(PCFullStackTest, auto fixture = CreateTestFixture( "pc_foreman_cif_link_150kbps_delay100ms_30pkts_queue_overshoot30", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -412,7 +387,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Link_250kbps_Delay100ms_10pkts_Loss1) { auto fixture = CreateTestFixture( "pc_foreman_cif_link_250kbps_delay100ms_10pkts_loss1", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -435,7 +410,7 @@ TEST(PCGenericDescriptorTest, auto fixture = CreateTestFixture( "pc_foreman_cif_delay_50_0_plr_5_generic_descriptor", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -457,7 +432,7 @@ TEST(PCGenericDescriptorTest, auto fixture = CreateTestFixture( "pc_foreman_cif_delay_50_0_plr_5_ulpfec_generic_descriptor", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -479,7 +454,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Delay_50_0_Plr_5_Flexfec) { auto fixture = CreateTestFixture( "pc_foreman_cif_delay_50_0_plr_5_flexfec", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -504,7 +479,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_500kbps_Delay_50_0_Plr_3_Flexfec) { auto fixture = CreateTestFixture( "pc_foreman_cif_500kbps_delay_50_0_plr_3_flexfec", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -529,7 +504,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_500kbps_Delay_50_0_Plr_3_Ulpfec) { auto fixture = CreateTestFixture( "pc_foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -549,8 +524,8 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Net_Delay_0_0_Plr_0_H264) { auto fixture = CreateTestFixture( "pc_foreman_cif_net_delay_0_0_plr_0_H264", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -572,7 +547,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_30kbps_Net_Delay_0_0_Plr_0_H264) { auto fixture = CreateTestFixture( "pc_foreman_cif_30kbps_net_delay_0_0_plr_0_H264", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 10); video.stream_label = "alice-video"; @@ -603,7 +578,7 @@ TEST(PCGenericDescriptorTest, auto fixture = CreateTestFixture( "pc_foreman_cif_delay_50_0_plr_5_H264_generic_descriptor", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -630,7 +605,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Delay_50_0_Plr_5_H264_Sps_Pps_Idr) { auto fixture = CreateTestFixture( "pc_foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -654,7 +629,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_Delay_50_0_Plr_5_H264_Flexfec) { auto fixture = CreateTestFixture( "pc_foreman_cif_delay_50_0_plr_5_H264_flexfec", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -684,7 +659,7 @@ TEST(PCFullStackTest, DISABLED_Pc_Foreman_Cif_Delay_50_0_Plr_5_H264_Ulpfec) { auto fixture = CreateTestFixture( "pc_foreman_cif_delay_50_0_plr_5_H264_ulpfec", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -711,7 +686,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_500kbps) { config.link_capacity_kbps = 500; auto fixture = CreateTestFixture( "pc_foreman_cif_500kbps", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -733,7 +708,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_500kbps_32pkts_Queue) { auto fixture = CreateTestFixture( "pc_foreman_cif_500kbps_32pkts_queue", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -755,7 +730,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_500kbps_100ms) { auto fixture = CreateTestFixture( "pc_foreman_cif_500kbps_100ms", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -778,7 +753,7 @@ TEST(PCGenericDescriptorTest, auto fixture = CreateTestFixture( "pc_foreman_cif_500kbps_100ms_32pkts_queue_generic_descriptor", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -821,7 +796,7 @@ TEST(PCFullStackTest, Pc_Foreman_Cif_1000kbps_100ms_32pkts_Queue) { auto fixture = CreateTestFixture( "pc_foreman_cif_1000kbps_100ms_32pkts_queue", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(352, 288, 30); video.stream_label = "alice-video"; @@ -844,7 +819,7 @@ TEST(PCFullStackTest, Pc_Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue) { auto fixture = CreateTestFixture( "pc_conference_motion_hd_2000kbps_100ms_32pkts_queue", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(1280, 720, 50); video.stream_label = "alice-video"; @@ -993,7 +968,7 @@ TEST(PCFullStackTest, Pc_Conference_Motion_Hd_2000kbps_100ms_32pkts_Queue_Vp9) { auto fixture = CreateTestFixture( "pc_conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(1280, 720, 50); video.stream_label = "alice-video"; @@ -1021,8 +996,8 @@ TEST(PCFullStackTest, Pc_Screenshare_Slides_No_Conference_Mode) { auto fixture = CreateTestFixture( "pc_screenshare_slides_no_conference_mode", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(1850, 1110, 5); video.stream_label = "alice-video"; @@ -1040,8 +1015,8 @@ TEST(PCFullStackTest, Pc_Screenshare_Slides) { CreateNetworkEmulationManager(); auto fixture = CreateTestFixture( "pc_screenshare_slides", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(1850, 1110, 5); video.stream_label = "alice-video"; @@ -1064,8 +1039,8 @@ TEST(PCFullStackTest, Pc_Screenshare_Slides_Simulcast_No_Conference_Mode) { auto fixture = CreateTestFixture( "pc_screenshare_slides_simulcast_no_conference_mode", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(1850, 1110, 30); video.simulcast_config = VideoSimulcastConfig(2); @@ -1087,8 +1062,8 @@ TEST(PCFullStackTest, Pc_Screenshare_Slides_Simulcast) { auto fixture = CreateTestFixture( "pc_screenshare_slides_simulcast", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(1850, 1110, 30); video.simulcast_config = VideoSimulcastConfig(2); @@ -1293,8 +1268,8 @@ TEST(PCFullStackTest, Pc_Screenshare_Slides_Vp9_3sl_High_Fps) { auto fixture = CreateTestFixture( "pc_screenshare_slides_vp9_3sl_high_fps", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(1850, 1110, 30); video.stream_label = "alice-video"; @@ -1326,8 +1301,8 @@ TEST(PCFullStackTest, Pc_Vp9svc_3sl_High) { CreateNetworkEmulationManager(); auto fixture = CreateTestFixture( "pc_vp9svc_3sl_high", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(1280, 720, 30); video.stream_label = "alice-video"; @@ -1359,8 +1334,8 @@ TEST(PCFullStackTest, Pc_Vp9svc_3sl_Low) { CreateNetworkEmulationManager(); auto fixture = CreateTestFixture( "pc_vp9svc_3sl_low", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), - BuiltInNetworkBehaviorConfig()), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes( + BuiltInNetworkBehaviorConfig()), [](PeerConfigurer* alice) { VideoConfig video(1280, 720, 30); video.stream_label = "alice-video"; @@ -1493,7 +1468,7 @@ TEST(PCFullStackTest, MAYBE_Pc_Simulcast_HD_High) { config.queue_delay_ms = 100; auto fixture = CreateTestFixture( "pc_simulcast_HD_high", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(1920, 1080, 30); video.simulcast_config = VideoSimulcastConfig(3); @@ -1515,7 +1490,7 @@ TEST(PCFullStackTest, Pc_Simulcast_Vp8_3sl_High) { auto fixture = CreateTestFixture( "pc_simulcast_vp8_3sl_high", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(1280, 720, 30); video.simulcast_config = VideoSimulcastConfig(3); @@ -1537,7 +1512,7 @@ TEST(PCFullStackTest, Pc_Simulcast_Vp8_3sl_Low) { config.queue_delay_ms = 100; auto fixture = CreateTestFixture( "pc_simulcast_vp8_3sl_low", *network_emulation_manager->time_controller(), - CreateTwoNetworkLinks(network_emulation_manager.get(), config), + network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config), [](PeerConfigurer* alice) { VideoConfig video(1280, 720, 30); video.simulcast_config = VideoSimulcastConfig(3);