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:
@ -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.
|
||||
|
@ -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<VideoStream> streams; // If empty, one stream is assumed.
|
||||
size_t selected_stream;
|
||||
|
Reference in New Issue
Block a user