Remove temporary SetConfig method from NetworkSimulatioInterface.
Remove temporary SetConfig method from NetworkSimulatioInterface and
makes minor cleanup.
Bug: webrtc:9630
Change-Id: If472da7c21ffc9c83fe8b80e6665c3d5fb94382b
Reviewed-on: https://webrtc-review.googlesource.com/95644
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24400}
diff --git a/api/test/simulated_network.h b/api/test/simulated_network.h
index fcb83cd..132ebef 100644
--- a/api/test/simulated_network.h
+++ b/api/test/simulated_network.h
@@ -69,11 +69,6 @@
// 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.
- // Sets a new configuration. This won't affect packets already in the pipe.
- virtual void SetConfig(const SimulatedNetworkConfig& config) = 0;
-
virtual bool EnqueuePacket(PacketInFlightInfo packet_info) = 0;
// Retrieves all packets that should be delivered by the given receive time.
virtual std::vector<PacketDeliveryInfo> DequeueDeliverablePackets(
diff --git a/call/callfactory.cc b/call/callfactory.cc
index b5c28d2..fa7d0fa 100644
--- a/call/callfactory.cc
+++ b/call/callfactory.cc
@@ -30,7 +30,7 @@
return (sscanf(group.c_str(), "%d", field) == 1);
}
-absl::optional<webrtc::FakeNetworkPipe::Config> ParseDegradationConfig(
+absl::optional<webrtc::DefaultNetworkSimulationConfig> ParseDegradationConfig(
bool send) {
std::string exp_prefix = "WebRTCFakeNetwork";
if (send) {
@@ -39,7 +39,7 @@
exp_prefix += "Receive";
}
- webrtc::FakeNetworkPipe::Config config;
+ webrtc::DefaultNetworkSimulationConfig config;
bool configured = false;
configured |=
ParseConfigParam(exp_prefix + "DelayMs", &config.queue_delay_ms);
@@ -62,16 +62,17 @@
}
configured |= ParseConfigParam(exp_prefix + "AvgBurstLossLength",
&config.avg_burst_loss_length);
- return configured ? absl::optional<webrtc::FakeNetworkPipe::Config>(config)
- : absl::nullopt;
+ return configured
+ ? absl::optional<webrtc::DefaultNetworkSimulationConfig>(config)
+ : absl::nullopt;
}
} // namespace
Call* CallFactory::CreateCall(const Call::Config& config) {
- absl::optional<webrtc::FakeNetworkPipe::Config> send_degradation_config =
- ParseDegradationConfig(true);
- absl::optional<webrtc::FakeNetworkPipe::Config> receive_degradation_config =
- ParseDegradationConfig(false);
+ absl::optional<webrtc::DefaultNetworkSimulationConfig>
+ send_degradation_config = ParseDegradationConfig(true);
+ absl::optional<webrtc::DefaultNetworkSimulationConfig>
+ receive_degradation_config = ParseDegradationConfig(false);
if (send_degradation_config || receive_degradation_config) {
return new DegradedCall(std::unique_ptr<Call>(Call::Create(config)),
diff --git a/call/simulated_network.h b/call/simulated_network.h
index 2758843..9646a89 100644
--- a/call/simulated_network.h
+++ b/call/simulated_network.h
@@ -33,7 +33,7 @@
~SimulatedNetwork() override;
// Sets a new configuration. This won't affect packets already in the pipe.
- void SetConfig(const Config& config) override;
+ void SetConfig(const Config& config);
void PauseTransmissionUntil(int64_t until_us);
// NetworkSimulationInterface