Move SimulatedNetworkConfig on top level.

Make SimulatedNetwrokConfig configuration of default implementation of
NetworkSimulationInterface, that will be used by WebRTC in case of
network simulation.

Bug: webrtc:9630
Change-Id: Ib7c3d0c69fc09627f3d8694e61ac8409101e8392
Reviewed-on: https://webrtc-review.googlesource.com/94154
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24311}
This commit is contained in:
Artem Titov
2018-08-16 11:41:44 +02:00
committed by Commit Bot
parent 3daabad0b5
commit e9721f2f08
2 changed files with 25 additions and 20 deletions

View File

@ -42,12 +42,11 @@ struct PacketDeliveryInfo {
uint64_t packet_id; uint64_t packet_id;
}; };
class NetworkSimulationInterface { // DefaultNetworkSimulationConfig is a default network simulation configuration
public: // for default network simulation that will be used by WebRTC if no custom
// TODO(phoglund): this one shouldn't really be here; make fake network pipes // NetworkSimulationInterface is provided.
// injectable instead in the video quality test fixture. struct DefaultNetworkSimulationConfig {
struct SimulatedNetworkConfig { DefaultNetworkSimulationConfig() {}
SimulatedNetworkConfig() {}
// Queue length in number of packets. // Queue length in number of packets.
size_t queue_length_packets = 0; size_t queue_length_packets = 0;
// Delay in addition to capacity induced delay. // Delay in addition to capacity induced delay.
@ -62,7 +61,13 @@ class NetworkSimulationInterface {
bool allow_reordering = false; bool allow_reordering = false;
// The average length of a burst of lost packets. // The average length of a burst of lost packets.
int avg_burst_loss_length = -1; int avg_burst_loss_length = -1;
}; };
class NetworkSimulationInterface {
public:
// 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 // DO NOT USE. Method added temporary for further refactoring and will be
// removed soon. // removed soon.

View File

@ -79,7 +79,7 @@ class VideoQualityTestFixtureInterface {
std::string graph_data_output_filename; std::string graph_data_output_filename;
std::string graph_title; std::string graph_title;
} analyzer; } analyzer;
NetworkSimulationInterface::SimulatedNetworkConfig pipe; DefaultNetworkSimulationConfig pipe;
struct SS { // Spatial scalability. struct SS { // Spatial scalability.
std::vector<VideoStream> streams; // If empty, one stream is assumed. std::vector<VideoStream> streams; // If empty, one stream is assumed.
size_t selected_stream; size_t selected_stream;