| Index: webrtc/test/fake_network_pipe.h
|
| diff --git a/webrtc/test/fake_network_pipe.h b/webrtc/test/fake_network_pipe.h
|
| index 74189a594c5758e6958a9e9dc38bcc8faa44907f..33661c759254d41a49c7996aac09e024fed83283 100644
|
| --- a/webrtc/test/fake_network_pipe.h
|
| +++ b/webrtc/test/fake_network_pipe.h
|
| @@ -21,6 +21,7 @@
|
|
|
| namespace webrtc {
|
|
|
| +class Clock;
|
| class CriticalSectionWrapper;
|
| class NetworkPacket;
|
| class PacketReceiver;
|
| @@ -33,26 +34,20 @@ class PacketReceiver;
|
| class FakeNetworkPipe {
|
| public:
|
| struct Config {
|
| - Config()
|
| - : queue_length_packets(0),
|
| - queue_delay_ms(0),
|
| - delay_standard_deviation_ms(0),
|
| - link_capacity_kbps(0),
|
| - loss_percent(0) {
|
| - }
|
| + Config() {}
|
| // Queue length in number of packets.
|
| - size_t queue_length_packets;
|
| + size_t queue_length_packets = 0;
|
| // Delay in addition to capacity induced delay.
|
| - int queue_delay_ms;
|
| + int queue_delay_ms = 0;
|
| // Standard deviation of the extra delay.
|
| - int delay_standard_deviation_ms;
|
| + int delay_standard_deviation_ms = 0;
|
| // Link capacity in kbps.
|
| - int link_capacity_kbps;
|
| + int link_capacity_kbps = 0;
|
| // Random packet loss.
|
| - int loss_percent;
|
| + int loss_percent = 0;
|
| };
|
|
|
| - explicit FakeNetworkPipe(const FakeNetworkPipe::Config& config);
|
| + FakeNetworkPipe(Clock* clock, const FakeNetworkPipe::Config& config);
|
| ~FakeNetworkPipe();
|
|
|
| // Must not be called in parallel with SendPacket or Process.
|
| @@ -76,6 +71,7 @@ class FakeNetworkPipe {
|
| size_t sent_packets() { return sent_packets_; }
|
|
|
| private:
|
| + Clock* const clock_;
|
| mutable rtc::CriticalSection lock_;
|
| PacketReceiver* packet_receiver_;
|
| std::queue<NetworkPacket*> capacity_link_;
|
|
|