diff --git a/api/test/simulated_network.h b/api/test/simulated_network.h index 89345f539a..fcb83cd8a8 100644 --- a/api/test/simulated_network.h +++ b/api/test/simulated_network.h @@ -42,27 +42,32 @@ struct PacketDeliveryInfo { uint64_t packet_id; }; +// DefaultNetworkSimulationConfig is a default network simulation configuration +// for default network simulation that will be used by WebRTC if no custom +// NetworkSimulationInterface is provided. +struct DefaultNetworkSimulationConfig { + DefaultNetworkSimulationConfig() {} + // Queue length in number of packets. + size_t queue_length_packets = 0; + // Delay in addition to capacity induced delay. + int queue_delay_ms = 0; + // Standard deviation of the extra delay. + int delay_standard_deviation_ms = 0; + // Link capacity in kbps. + int link_capacity_kbps = 0; + // Random packet loss. + int loss_percent = 0; + // If packets are allowed to be reordered. + bool allow_reordering = false; + // The average length of a burst of lost packets. + int avg_burst_loss_length = -1; +}; + class NetworkSimulationInterface { public: - // TODO(phoglund): this one shouldn't really be here; make fake network pipes - // injectable instead in the video quality test fixture. - struct SimulatedNetworkConfig { - SimulatedNetworkConfig() {} - // Queue length in number of packets. - size_t queue_length_packets = 0; - // Delay in addition to capacity induced delay. - int queue_delay_ms = 0; - // Standard deviation of the extra delay. - int delay_standard_deviation_ms = 0; - // Link capacity in kbps. - int link_capacity_kbps = 0; - // Random packet loss. - int loss_percent = 0; - // If packets are allowed to be reordered. - bool allow_reordering = false; - // The average length of a burst of lost packets. - int avg_burst_loss_length = -1; - }; + // DO NOT USE. Use DefaultNetworkSimulationConfig directly. This reference + // should be removed when all users will be switched on direct usage. + using SimulatedNetworkConfig = DefaultNetworkSimulationConfig; // DO NOT USE. Method added temporary for further refactoring and will be // removed soon. diff --git a/api/test/video_quality_test_fixture.h b/api/test/video_quality_test_fixture.h index c8734ca8a6..1d8fc34650 100644 --- a/api/test/video_quality_test_fixture.h +++ b/api/test/video_quality_test_fixture.h @@ -79,7 +79,7 @@ class VideoQualityTestFixtureInterface { std::string graph_data_output_filename; std::string graph_title; } analyzer; - NetworkSimulationInterface::SimulatedNetworkConfig pipe; + DefaultNetworkSimulationConfig pipe; struct SS { // Spatial scalability. std::vector streams; // If empty, one stream is assumed. size_t selected_stream;