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;
|
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 {
|
class NetworkSimulationInterface {
|
||||||
public:
|
public:
|
||||||
// TODO(phoglund): this one shouldn't really be here; make fake network pipes
|
// DO NOT USE. Use DefaultNetworkSimulationConfig directly. This reference
|
||||||
// injectable instead in the video quality test fixture.
|
// should be removed when all users will be switched on direct usage.
|
||||||
struct SimulatedNetworkConfig {
|
using SimulatedNetworkConfig = DefaultNetworkSimulationConfig;
|
||||||
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. 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.
|
||||||
|
@ -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;
|
||||||
|
Reference in New Issue
Block a user