Switch usages of DefaultNetworkSimulationConfig to BuiltInNetworkBehaviorConfig
Bug: webrtc:9630
Change-Id: Ia0e0b5b4e1e3a8e687d1e7fe3bb600dbdda09efa
Reviewed-on: https://webrtc-review.googlesource.com/c/104561
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25045}
diff --git a/api/test/video_quality_test_fixture.h b/api/test/video_quality_test_fixture.h
index ff1472e..bf7fed6 100644
--- a/api/test/video_quality_test_fixture.h
+++ b/api/test/video_quality_test_fixture.h
@@ -85,12 +85,12 @@
// Deprecated. DO NOT USE. Use config instead. This is not pipe actually,
// it is just configuration, that will be passed to default implementation
// of simulation layer.
- DefaultNetworkSimulationConfig pipe;
+ BuiltInNetworkBehaviorConfig pipe;
// Config for default simulation implementation. Must be nullopt if
// `sender_network` and `receiver_network` in InjectionComponents are
// non-null. May be nullopt even if `sender_network` and `receiver_network`
// are null; in that case, a default config will be used.
- absl::optional<DefaultNetworkSimulationConfig> config;
+ absl::optional<BuiltInNetworkBehaviorConfig> config;
struct SS { // Spatial scalability.
std::vector<VideoStream> streams; // If empty, one stream is assumed.
size_t selected_stream;
diff --git a/audio/test/audio_bwe_integration_test.cc b/audio/test/audio_bwe_integration_test.cc
index 8ec2a7c..9fa95b1 100644
--- a/audio/test/audio_bwe_integration_test.cc
+++ b/audio/test/audio_bwe_integration_test.cc
@@ -123,8 +123,8 @@
return test::ResourcePath("voice_engine/audio_dtx16", "wav");
}
- DefaultNetworkSimulationConfig GetNetworkPipeConfig() override {
- DefaultNetworkSimulationConfig pipe_config;
+ BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() override {
+ BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.link_capacity_kbps = 50;
pipe_config.queue_length_packets = 1500;
pipe_config.queue_delay_ms = 300;
diff --git a/audio/test/audio_bwe_integration_test.h b/audio/test/audio_bwe_integration_test.h
index c70ad1c..4de2cab 100644
--- a/audio/test/audio_bwe_integration_test.h
+++ b/audio/test/audio_bwe_integration_test.h
@@ -27,7 +27,7 @@
protected:
virtual std::string AudioInputFile() = 0;
- virtual DefaultNetworkSimulationConfig GetNetworkPipeConfig() = 0;
+ virtual BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() = 0;
size_t GetNumVideoStreams() const override;
size_t GetNumAudioStreams() const override;
diff --git a/audio/test/audio_end_to_end_test.cc b/audio/test/audio_end_to_end_test.cc
index 02abe73..5e187ad 100644
--- a/audio/test/audio_end_to_end_test.cc
+++ b/audio/test/audio_end_to_end_test.cc
@@ -28,8 +28,8 @@
AudioEndToEndTest::AudioEndToEndTest()
: EndToEndTest(CallTest::kDefaultTimeoutMs) {}
-DefaultNetworkSimulationConfig AudioEndToEndTest::GetNetworkPipeConfig() const {
- return DefaultNetworkSimulationConfig();
+BuiltInNetworkBehaviorConfig AudioEndToEndTest::GetNetworkPipeConfig() const {
+ return BuiltInNetworkBehaviorConfig();
}
size_t AudioEndToEndTest::GetNumVideoStreams() const {
diff --git a/audio/test/audio_end_to_end_test.h b/audio/test/audio_end_to_end_test.h
index 9dda834..ba1e0c7 100644
--- a/audio/test/audio_end_to_end_test.h
+++ b/audio/test/audio_end_to_end_test.h
@@ -29,7 +29,7 @@
const AudioSendStream* send_stream() const { return send_stream_; }
const AudioReceiveStream* receive_stream() const { return receive_stream_; }
- virtual DefaultNetworkSimulationConfig GetNetworkPipeConfig() const;
+ virtual BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() const;
size_t GetNumVideoStreams() const override;
size_t GetNumAudioStreams() const override;
diff --git a/audio/test/audio_stats_test.cc b/audio/test/audio_stats_test.cc
index 019679e..556a16d 100644
--- a/audio/test/audio_stats_test.cc
+++ b/audio/test/audio_stats_test.cc
@@ -32,8 +32,8 @@
NoLossTest() = default;
- DefaultNetworkSimulationConfig GetNetworkPipeConfig() const override {
- DefaultNetworkSimulationConfig pipe_config;
+ BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() const override {
+ BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.queue_delay_ms = kRttMs / 2;
return pipe_config;
}
diff --git a/audio/test/low_bandwidth_audio_test.cc b/audio/test/low_bandwidth_audio_test.cc
index 16a3b91..1009a5e 100644
--- a/audio/test/low_bandwidth_audio_test.cc
+++ b/audio/test/low_bandwidth_audio_test.cc
@@ -89,8 +89,8 @@
{{"maxaveragebitrate", "6000"}, {"ptime", "60"}, {"stereo", "1"}}});
}
- DefaultNetworkSimulationConfig GetNetworkPipeConfig() const override {
- DefaultNetworkSimulationConfig pipe_config;
+ BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() const override {
+ BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.link_capacity_kbps = 12;
pipe_config.queue_length_packets = 1500;
pipe_config.queue_delay_ms = 400;
diff --git a/call/bitrate_estimator_tests.cc b/call/bitrate_estimator_tests.cc
index 766e38c..bab73e4 100644
--- a/call/bitrate_estimator_tests.cc
+++ b/call/bitrate_estimator_tests.cc
@@ -111,14 +111,14 @@
&task_queue_,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ BuiltInNetworkBehaviorConfig())),
sender_call_.get(), payload_type_map_));
send_transport_->SetReceiver(receiver_call_->Receiver());
receive_transport_.reset(new test::DirectTransport(
&task_queue_,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ BuiltInNetworkBehaviorConfig())),
receiver_call_.get(), payload_type_map_));
receive_transport_->SetReceiver(sender_call_->Receiver());
diff --git a/call/call_perf_tests.cc b/call/call_perf_tests.cc
index 8fcd566..082e22f 100644
--- a/call/call_perf_tests.cc
+++ b/call/call_perf_tests.cc
@@ -64,7 +64,7 @@
void TestMinTransmitBitrate(bool pad_to_min_bitrate);
- void TestCaptureNtpTime(const DefaultNetworkSimulationConfig& net_config,
+ void TestCaptureNtpTime(const BuiltInNetworkBehaviorConfig& net_config,
int threshold_ms,
int start_time_ms,
int run_time_ms);
@@ -152,7 +152,7 @@
const uint32_t kAudioSendSsrc = 1234;
const uint32_t kAudioRecvSsrc = 5678;
- DefaultNetworkSimulationConfig audio_net_config;
+ BuiltInNetworkBehaviorConfig audio_net_config;
audio_net_config.queue_delay_ms = 500;
audio_net_config.loss_percent = 5;
@@ -217,7 +217,7 @@
test::PacketTransport::kSender, video_pt_map,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())));
+ BuiltInNetworkBehaviorConfig())));
video_send_transport->SetReceiver(receiver_call_->Receiver());
receive_transport = absl::make_unique<test::PacketTransport>(
@@ -225,7 +225,7 @@
test::PacketTransport::kReceiver, payload_type_map_,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())));
+ BuiltInNetworkBehaviorConfig())));
receive_transport->SetReceiver(sender_call_->Receiver());
CreateSendConfig(1, 0, 0, video_send_transport.get());
@@ -337,14 +337,14 @@
}
void CallPerfTest::TestCaptureNtpTime(
- const DefaultNetworkSimulationConfig& net_config,
+ const BuiltInNetworkBehaviorConfig& net_config,
int threshold_ms,
int start_time_ms,
int run_time_ms) {
class CaptureNtpTimeObserver : public test::EndToEndTest,
public rtc::VideoSinkInterface<VideoFrame> {
public:
- CaptureNtpTimeObserver(const DefaultNetworkSimulationConfig& net_config,
+ CaptureNtpTimeObserver(const BuiltInNetworkBehaviorConfig& net_config,
int threshold_ms,
int start_time_ms,
int run_time_ms)
@@ -461,7 +461,7 @@
}
rtc::CriticalSection crit_;
- const DefaultNetworkSimulationConfig net_config_;
+ const BuiltInNetworkBehaviorConfig net_config_;
Clock* const clock_;
int threshold_ms_;
int start_time_ms_;
@@ -481,7 +481,7 @@
// Flaky tests, disabled on Mac due to webrtc:8291.
#if !(defined(WEBRTC_MAC))
TEST_F(CallPerfTest, CaptureNtpTimeWithNetworkDelay) {
- DefaultNetworkSimulationConfig net_config;
+ BuiltInNetworkBehaviorConfig net_config;
net_config.queue_delay_ms = 100;
// TODO(wu): lower the threshold as the calculation/estimatation becomes more
// accurate.
@@ -492,7 +492,7 @@
}
TEST_F(CallPerfTest, CaptureNtpTimeWithNetworkJitter) {
- DefaultNetworkSimulationConfig net_config;
+ BuiltInNetworkBehaviorConfig net_config;
net_config.queue_delay_ms = 100;
net_config.delay_standard_deviation_ms = 10;
// TODO(wu): lower the threshold as the calculation/estimatation becomes more
@@ -865,8 +865,8 @@
max_bwe_(max_bwe) {}
protected:
- DefaultNetworkSimulationConfig GetFakeNetworkPipeConfig() {
- DefaultNetworkSimulationConfig pipe_config;
+ BuiltInNetworkBehaviorConfig GetFakeNetworkPipeConfig() {
+ BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.link_capacity_kbps = test_bitrate_from_;
return pipe_config;
}
@@ -903,7 +903,7 @@
? test_bitrate <= test_bitrate_to_
: test_bitrate >= test_bitrate_to_;
test_bitrate += test_bitrate_step_) {
- DefaultNetworkSimulationConfig pipe_config;
+ BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.link_capacity_kbps = test_bitrate;
send_simulated_network_->SetConfig(pipe_config);
receive_simulated_network_->SetConfig(pipe_config);
diff --git a/call/callfactory.cc b/call/callfactory.cc
index fa7d0fa..ab057be 100644
--- a/call/callfactory.cc
+++ b/call/callfactory.cc
@@ -30,7 +30,7 @@
return (sscanf(group.c_str(), "%d", field) == 1);
}
-absl::optional<webrtc::DefaultNetworkSimulationConfig> ParseDegradationConfig(
+absl::optional<webrtc::BuiltInNetworkBehaviorConfig> ParseDegradationConfig(
bool send) {
std::string exp_prefix = "WebRTCFakeNetwork";
if (send) {
@@ -39,7 +39,7 @@
exp_prefix += "Receive";
}
- webrtc::DefaultNetworkSimulationConfig config;
+ webrtc::BuiltInNetworkBehaviorConfig config;
bool configured = false;
configured |=
ParseConfigParam(exp_prefix + "DelayMs", &config.queue_delay_ms);
@@ -63,15 +63,15 @@
configured |= ParseConfigParam(exp_prefix + "AvgBurstLossLength",
&config.avg_burst_loss_length);
return configured
- ? absl::optional<webrtc::DefaultNetworkSimulationConfig>(config)
+ ? absl::optional<webrtc::BuiltInNetworkBehaviorConfig>(config)
: absl::nullopt;
}
} // namespace
Call* CallFactory::CreateCall(const Call::Config& config) {
- absl::optional<webrtc::DefaultNetworkSimulationConfig>
- send_degradation_config = ParseDegradationConfig(true);
- absl::optional<webrtc::DefaultNetworkSimulationConfig>
+ absl::optional<webrtc::BuiltInNetworkBehaviorConfig> send_degradation_config =
+ ParseDegradationConfig(true);
+ absl::optional<webrtc::BuiltInNetworkBehaviorConfig>
receive_degradation_config = ParseDegradationConfig(false);
if (send_degradation_config || receive_degradation_config) {
diff --git a/call/degraded_call.cc b/call/degraded_call.cc
index 8181310..353fe4c 100644
--- a/call/degraded_call.cc
+++ b/call/degraded_call.cc
@@ -17,8 +17,8 @@
namespace webrtc {
DegradedCall::DegradedCall(
std::unique_ptr<Call> call,
- absl::optional<DefaultNetworkSimulationConfig> send_config,
- absl::optional<DefaultNetworkSimulationConfig> receive_config)
+ absl::optional<BuiltInNetworkBehaviorConfig> send_config,
+ absl::optional<BuiltInNetworkBehaviorConfig> receive_config)
: clock_(Clock::GetRealTimeClock()),
call_(std::move(call)),
send_config_(send_config),
diff --git a/call/degraded_call.h b/call/degraded_call.h
index 3c0b80d..ab88a51 100644
--- a/call/degraded_call.h
+++ b/call/degraded_call.h
@@ -28,8 +28,8 @@
public:
explicit DegradedCall(
std::unique_ptr<Call> call,
- absl::optional<DefaultNetworkSimulationConfig> send_config,
- absl::optional<DefaultNetworkSimulationConfig> receive_config);
+ absl::optional<BuiltInNetworkBehaviorConfig> send_config,
+ absl::optional<BuiltInNetworkBehaviorConfig> receive_config);
~DegradedCall() override;
// Implements Call.
@@ -91,13 +91,13 @@
Clock* const clock_;
const std::unique_ptr<Call> call_;
- const absl::optional<DefaultNetworkSimulationConfig> send_config_;
+ const absl::optional<BuiltInNetworkBehaviorConfig> send_config_;
const std::unique_ptr<ProcessThread> send_process_thread_;
SimulatedNetwork* send_simulated_network_;
std::unique_ptr<FakeNetworkPipe> send_pipe_;
size_t num_send_streams_;
- const absl::optional<DefaultNetworkSimulationConfig> receive_config_;
+ const absl::optional<BuiltInNetworkBehaviorConfig> receive_config_;
SimulatedNetwork* receive_simulated_network_;
std::unique_ptr<FakeNetworkPipe> receive_pipe_;
};
diff --git a/call/rampup_tests.h b/call/rampup_tests.h
index 6cc65ce..3b07528 100644
--- a/call/rampup_tests.h
+++ b/call/rampup_tests.h
@@ -67,7 +67,7 @@
rtc::Event stop_event_;
Clock* const clock_;
- DefaultNetworkSimulationConfig forward_transport_config_;
+ BuiltInNetworkBehaviorConfig forward_transport_config_;
const size_t num_video_streams_;
const size_t num_audio_streams_;
const size_t num_flexfec_streams_;
diff --git a/call/simulated_network.h b/call/simulated_network.h
index 0f84532..7593464 100644
--- a/call/simulated_network.h
+++ b/call/simulated_network.h
@@ -28,7 +28,7 @@
// capacity introduced delay.
class SimulatedNetwork : public NetworkBehaviorInterface {
public:
- using Config = DefaultNetworkSimulationConfig;
+ using Config = BuiltInNetworkBehaviorConfig;
explicit SimulatedNetwork(Config config, uint64_t random_seed = 1);
~SimulatedNetwork() override;
diff --git a/call/test/fake_network_pipe_unittest.cc b/call/test/fake_network_pipe_unittest.cc
index 09e5852..de5aec7 100644
--- a/call/test/fake_network_pipe_unittest.cc
+++ b/call/test/fake_network_pipe_unittest.cc
@@ -73,7 +73,7 @@
// Test the capacity link and verify we get as many packets as we expect.
TEST_F(FakeNetworkPipeTest, CapacityTest) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_length_packets = 20;
config.link_capacity_kbps = 80;
MockReceiver receiver;
@@ -113,7 +113,7 @@
// Test the extra network delay.
TEST_F(FakeNetworkPipeTest, ExtraDelayTest) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_length_packets = 20;
config.queue_delay_ms = 100;
config.link_capacity_kbps = 80;
@@ -149,7 +149,7 @@
// Test the number of buffers and packets are dropped when sending too many
// packets too quickly.
TEST_F(FakeNetworkPipeTest, QueueLengthTest) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_length_packets = 2;
config.link_capacity_kbps = 80;
MockReceiver receiver;
@@ -173,7 +173,7 @@
// Test we get statistics as expected.
TEST_F(FakeNetworkPipeTest, StatisticsTest) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_length_packets = 2;
config.queue_delay_ms = 20;
config.link_capacity_kbps = 80;
@@ -205,7 +205,7 @@
// Change the link capacity half-way through the test and verify that the
// delivery times change accordingly.
TEST_F(FakeNetworkPipeTest, ChangingCapacityWithEmptyPipeTest) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_length_packets = 20;
config.link_capacity_kbps = 80;
MockReceiver receiver;
@@ -266,7 +266,7 @@
// Change the link capacity half-way through the test and verify that the
// delivery times change accordingly.
TEST_F(FakeNetworkPipeTest, ChangingCapacityWithPacketsInPipeTest) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_length_packets = 20;
config.link_capacity_kbps = 80;
MockReceiver receiver;
@@ -321,7 +321,7 @@
// At first disallow reordering and then allow reordering.
TEST_F(FakeNetworkPipeTest, DisallowReorderingThenAllowReordering) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_length_packets = 1000;
config.link_capacity_kbps = 800;
config.queue_delay_ms = 100;
@@ -374,7 +374,7 @@
const int kNumPackets = 10000;
const int kPacketSize = 10;
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_length_packets = kNumPackets;
config.loss_percent = kLossPercent;
config.avg_burst_loss_length = kAvgBurstLength;
@@ -409,7 +409,7 @@
}
TEST_F(FakeNetworkPipeTest, SetReceiver) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.link_capacity_kbps = 800;
MockReceiver receiver;
auto simulated_network = absl::make_unique<SimulatedNetwork>(config);
diff --git a/test/call_test.cc b/test/call_test.cc
index f4fbf22..c96f197 100644
--- a/test/call_test.cc
+++ b/test/call_test.cc
@@ -742,8 +742,8 @@
task_queue, sender_call, this, test::PacketTransport::kSender,
CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())));
+ Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig())));
}
test::PacketTransport* BaseTest::CreateReceiveTransport(
@@ -752,8 +752,8 @@
task_queue, nullptr, this, test::PacketTransport::kReceiver,
CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())));
+ Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig())));
}
size_t BaseTest::GetNumVideoStreams() const {
diff --git a/video/end_to_end_tests/bandwidth_tests.cc b/video/end_to_end_tests/bandwidth_tests.cc
index ab5e568..4c8f12c 100644
--- a/video/end_to_end_tests/bandwidth_tests.cc
+++ b/video/end_to_end_tests/bandwidth_tests.cc
@@ -160,9 +160,8 @@
task_queue, nullptr, this, test::PacketTransport::kReceiver,
payload_type_map_,
absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())));
+ Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())));
return receive_transport_;
}
diff --git a/video/end_to_end_tests/call_operation_tests.cc b/video/end_to_end_tests/call_operation_tests.cc
index 2acd1b9..2821451 100644
--- a/video/end_to_end_tests/call_operation_tests.cc
+++ b/video/end_to_end_tests/call_operation_tests.cc
@@ -114,15 +114,15 @@
sender_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
sender_call_.get(), payload_type_map_);
receiver_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
receiver_call_.get(), payload_type_map_);
sender_transport->SetReceiver(receiver_call_->Receiver());
receiver_transport->SetReceiver(sender_call_->Receiver());
@@ -182,15 +182,15 @@
sender_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
sender_call_.get(), payload_type_map_);
receiver_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
receiver_call_.get(), payload_type_map_);
sender_transport->SetReceiver(receiver_call_->Receiver());
receiver_transport->SetReceiver(sender_call_->Receiver());
@@ -257,15 +257,15 @@
sender_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
sender_call_.get(), payload_type_map_);
receiver_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
receiver_call_.get(), payload_type_map_);
sender_transport->SetReceiver(receiver_call_->Receiver());
receiver_transport->SetReceiver(sender_call_->Receiver());
diff --git a/video/end_to_end_tests/extended_reports_tests.cc b/video/end_to_end_tests/extended_reports_tests.cc
index ba5ca69..0073370 100644
--- a/video/end_to_end_tests/extended_reports_tests.cc
+++ b/video/end_to_end_tests/extended_reports_tests.cc
@@ -170,7 +170,7 @@
bool sent_rtcp_target_bitrate_ RTC_GUARDED_BY(&crit_);
bool sent_zero_rtcp_target_bitrate_ RTC_GUARDED_BY(&crit_);
int sent_rtcp_dlrr_;
- DefaultNetworkSimulationConfig forward_transport_config_;
+ BuiltInNetworkBehaviorConfig forward_transport_config_;
SimulatedNetwork* send_simulated_network_;
};
diff --git a/video/end_to_end_tests/fec_tests.cc b/video/end_to_end_tests/fec_tests.cc
index 0300d12..ab50386 100644
--- a/video/end_to_end_tests/fec_tests.cc
+++ b/video/end_to_end_tests/fec_tests.cc
@@ -234,7 +234,7 @@
Call* sender_call) override {
// At low RTT (< kLowRttNackMs) -> NACK only, no FEC.
const int kNetworkDelayMs = 100;
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_delay_ms = kNetworkDelayMs;
return new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender,
@@ -421,7 +421,7 @@
// At low RTT (< kLowRttNackMs) -> NACK only, no FEC.
// Configure some network delay.
const int kNetworkDelayMs = 50;
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_delay_ms = kNetworkDelayMs;
return new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender,
diff --git a/video/end_to_end_tests/multi_codec_receive_tests.cc b/video/end_to_end_tests/multi_codec_receive_tests.cc
index e13bc35..dbde472 100644
--- a/video/end_to_end_tests/multi_codec_receive_tests.cc
+++ b/video/end_to_end_tests/multi_codec_receive_tests.cc
@@ -153,18 +153,16 @@
&task_queue_, sender_call_.get(), &observer_,
test::PacketTransport::kSender, kPayloadTypeMap,
absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig()))));
+ Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig()))));
send_transport_->SetReceiver(receiver_call_->Receiver());
receive_transport_.reset(new test::PacketTransport(
&task_queue_, receiver_call_.get(), &observer_,
test::PacketTransport::kReceiver, kPayloadTypeMap,
absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig()))));
+ Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig()))));
receive_transport_->SetReceiver(sender_call_->Receiver());
});
}
diff --git a/video/end_to_end_tests/multi_stream_tester.cc b/video/end_to_end_tests/multi_stream_tester.cc
index 7d66976..363597a 100644
--- a/video/end_to_end_tests/multi_stream_tester.cc
+++ b/video/end_to_end_tests/multi_stream_tester.cc
@@ -143,9 +143,9 @@
Call* sender_call) {
return new test::DirectTransport(
task_queue,
- absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(
+ Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig())),
sender_call, payload_type_map_);
}
@@ -154,9 +154,9 @@
Call* receiver_call) {
return new test::DirectTransport(
task_queue,
- absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(
+ Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig())),
receiver_call, payload_type_map_);
}
} // namespace webrtc
diff --git a/video/end_to_end_tests/network_state_tests.cc b/video/end_to_end_tests/network_state_tests.cc
index 937777f..2f1100e 100644
--- a/video/end_to_end_tests/network_state_tests.cc
+++ b/video/end_to_end_tests/network_state_tests.cc
@@ -118,9 +118,9 @@
receiver_call_->SignalChannelNetworkState(network_to_bring_up, kNetworkUp);
sender_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
sender_call_.get(), payload_type_map_);
sender_transport->SetReceiver(receiver_call_->Receiver());
CreateSendConfig(1, 0, 0, sender_transport.get());
diff --git a/video/end_to_end_tests/probing_tests.cc b/video/end_to_end_tests/probing_tests.cc
index 7dff657..bcb2af3 100644
--- a/video/end_to_end_tests/probing_tests.cc
+++ b/video/end_to_end_tests/probing_tests.cc
@@ -221,7 +221,7 @@
test::SingleThreadedTaskQueueForTesting* task_queue,
Call* sender_call) override {
auto network =
- absl::make_unique<SimulatedNetwork>(DefaultNetworkSimulationConfig());
+ absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig());
send_simulated_network_ = network.get();
return new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender,
@@ -245,7 +245,7 @@
// bitrate).
if (stats.send_bandwidth_bps >= 250000 &&
stats.send_bandwidth_bps <= 350000) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.link_capacity_kbps = 200;
send_simulated_network_->SetConfig(config);
@@ -260,7 +260,7 @@
break;
case 1:
if (stats.send_bandwidth_bps <= 210000) {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.link_capacity_kbps = 5000;
send_simulated_network_->SetConfig(config);
diff --git a/video/end_to_end_tests/receive_time_tests.cc b/video/end_to_end_tests/receive_time_tests.cc
index 3ca66f1..10602b0 100644
--- a/video/end_to_end_tests/receive_time_tests.cc
+++ b/video/end_to_end_tests/receive_time_tests.cc
@@ -96,7 +96,7 @@
Call* sender_call) override {
auto pipe = absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(DefaultNetworkSimulationConfig()));
+ absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
send_pipe_ = pipe.get();
return send_transport_ = new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender,
diff --git a/video/end_to_end_tests/retransmission_tests.cc b/video/end_to_end_tests/retransmission_tests.cc
index 73a5585..11d84a3 100644
--- a/video/end_to_end_tests/retransmission_tests.cc
+++ b/video/end_to_end_tests/retransmission_tests.cc
@@ -131,9 +131,8 @@
task_queue, nullptr, this, test::PacketTransport::kReceiver,
payload_type_map_,
absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())));
+ Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())));
receive_transport_ = receive_transport;
return receive_transport;
}
diff --git a/video/end_to_end_tests/rtp_rtcp_tests.cc b/video/end_to_end_tests/rtp_rtcp_tests.cc
index 7d96dcc..f19c6ad 100644
--- a/video/end_to_end_tests/rtp_rtcp_tests.cc
+++ b/video/end_to_end_tests/rtp_rtcp_tests.cc
@@ -282,13 +282,13 @@
test::PacketTransport::kSender, payload_type_map_,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())));
+ BuiltInNetworkBehaviorConfig())));
receive_transport = absl::make_unique<test::PacketTransport>(
&task_queue_, nullptr, &observer, test::PacketTransport::kReceiver,
payload_type_map_,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())));
+ BuiltInNetworkBehaviorConfig())));
send_transport->SetReceiver(receiver_call_->Receiver());
receive_transport->SetReceiver(sender_call_->Receiver());
@@ -474,7 +474,7 @@
task_queue_.SendTask([&]() {
CreateCalls();
- DefaultNetworkSimulationConfig lossy_delayed_link;
+ BuiltInNetworkBehaviorConfig lossy_delayed_link;
lossy_delayed_link.loss_percent = 2;
lossy_delayed_link.queue_delay_ms = 50;
@@ -486,7 +486,7 @@
absl::make_unique<SimulatedNetwork>(lossy_delayed_link)));
send_transport->SetReceiver(receiver_call_->Receiver());
- DefaultNetworkSimulationConfig flawless_link;
+ BuiltInNetworkBehaviorConfig flawless_link;
receive_transport = absl::make_unique<test::PacketTransport>(
&task_queue_, nullptr, &observer, test::PacketTransport::kReceiver,
payload_type_map_,
diff --git a/video/end_to_end_tests/ssrc_tests.cc b/video/end_to_end_tests/ssrc_tests.cc
index c03b494..17f9c42 100644
--- a/video/end_to_end_tests/ssrc_tests.cc
+++ b/video/end_to_end_tests/ssrc_tests.cc
@@ -82,15 +82,15 @@
send_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
sender_call_.get(), payload_type_map_);
receive_transport = absl::make_unique<test::DirectTransport>(
&task_queue_,
- absl::make_unique<FakeNetworkPipe>(
- Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
+ absl::make_unique<SimulatedNetwork>(
+ BuiltInNetworkBehaviorConfig())),
receiver_call_.get(), payload_type_map_);
input_observer =
absl::make_unique<PacketInputObserver>(receiver_call_->Receiver());
diff --git a/video/end_to_end_tests/stats_tests.cc b/video/end_to_end_tests/stats_tests.cc
index af6bbda..4c44d17 100644
--- a/video/end_to_end_tests/stats_tests.cc
+++ b/video/end_to_end_tests/stats_tests.cc
@@ -231,7 +231,7 @@
test::PacketTransport* CreateSendTransport(
test::SingleThreadedTaskQueueForTesting* task_queue,
Call* sender_call) override {
- DefaultNetworkSimulationConfig network_config;
+ BuiltInNetworkBehaviorConfig network_config;
network_config.loss_percent = 5;
return new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender,
@@ -713,7 +713,7 @@
std::unique_ptr<test::DirectTransport> receiver_transport;
task_queue_.SendTask([this, &sender_transport, &receiver_transport]() {
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.queue_delay_ms = kSendDelayMs;
CreateCalls();
sender_transport = absl::make_unique<test::DirectTransport>(
diff --git a/video/end_to_end_tests/transport_feedback_tests.cc b/video/end_to_end_tests/transport_feedback_tests.cc
index 1437cd4..9de7e71 100644
--- a/video/end_to_end_tests/transport_feedback_tests.cc
+++ b/video/end_to_end_tests/transport_feedback_tests.cc
@@ -55,7 +55,7 @@
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig())),
+ BuiltInNetworkBehaviorConfig())),
sender_call,
payload_type_map),
done_(false, false),
diff --git a/video/full_stack_tests.cc b/video/full_stack_tests.cc
index 77da253..e4a7a67 100644
--- a/video/full_stack_tests.cc
+++ b/video/full_stack_tests.cc
@@ -58,7 +58,7 @@
// Use these logging flags by default, for everything.
logging = {flags::RtcEventLogName(), flags::RtpDumpName(),
flags::EncodedFramePath()};
- this->config = DefaultNetworkSimulationConfig();
+ this->config = BuiltInNetworkBehaviorConfig();
}
};
diff --git a/video/picture_id_tests.cc b/video/picture_id_tests.cc
index 155da13..449e076 100644
--- a/video/picture_id_tests.cc
+++ b/video/picture_id_tests.cc
@@ -299,7 +299,7 @@
test::PacketTransport::kSender, payload_type_map_,
absl::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
- DefaultNetworkSimulationConfig()))));
+ BuiltInNetworkBehaviorConfig()))));
CreateSendConfig(kNumSimulcastStreams, 0, 0, send_transport_.get());
GetVideoSendConfig()->encoder_settings.encoder_factory = encoder_factory;
diff --git a/video/screenshare_loopback.cc b/video/screenshare_loopback.cc
index 1d6e87e..f5dac78 100644
--- a/video/screenshare_loopback.cc
+++ b/video/screenshare_loopback.cc
@@ -276,7 +276,7 @@
} // namespace flags
void Loopback() {
- DefaultNetworkSimulationConfig pipe_config;
+ BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.loss_percent = flags::LossPercent();
pipe_config.link_capacity_kbps = flags::LinkCapacityKbps();
pipe_config.queue_length_packets = flags::QueueSize();
diff --git a/video/sv_loopback.cc b/video/sv_loopback.cc
index fd72c99..b143241 100644
--- a/video/sv_loopback.cc
+++ b/video/sv_loopback.cc
@@ -475,7 +475,7 @@
screenshare_idx = 0;
}
- DefaultNetworkSimulationConfig pipe_config;
+ BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.loss_percent = flags::LossPercent();
pipe_config.avg_burst_loss_length = flags::AvgBurstLossLength();
pipe_config.link_capacity_kbps = flags::LinkCapacityKbps();
diff --git a/video/video_loopback.cc b/video/video_loopback.cc
index 57590ed..e626b3f 100644
--- a/video/video_loopback.cc
+++ b/video/video_loopback.cc
@@ -279,7 +279,7 @@
} // namespace flags
void Loopback() {
- DefaultNetworkSimulationConfig pipe_config;
+ BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.loss_percent = flags::LossPercent();
pipe_config.avg_burst_loss_length = flags::AvgBurstLossLength();
pipe_config.link_capacity_kbps = flags::LinkCapacityKbps();
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index e98ad31..0e3ca72 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -541,7 +541,7 @@
// At low RTT (< kLowRttNackMs) -> NACK only, no FEC.
// Configure some network delay.
const int kNetworkDelayMs = 100;
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.loss_percent = 5;
config.queue_delay_ms = kNetworkDelayMs;
return new test::PacketTransport(
@@ -731,7 +731,7 @@
// At low RTT (< kLowRttNackMs) -> NACK only, no FEC.
// Therefore we need some network delay.
const int kNetworkDelayMs = 100;
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.loss_percent = 5;
config.queue_delay_ms = kNetworkDelayMs;
return new test::PacketTransport(
@@ -1481,7 +1481,7 @@
test::SingleThreadedTaskQueueForTesting* task_queue,
Call* sender_call) override {
const int kNetworkDelayMs = 50;
- DefaultNetworkSimulationConfig config;
+ BuiltInNetworkBehaviorConfig config;
config.loss_percent = 10;
config.link_capacity_kbps = kCapacityKbps;
config.queue_delay_ms = kNetworkDelayMs;