Introduce SimulatedNetworkReceiverInterface.
Introduce SimulatedNetworkReceiverInterface and switch DirectTransport
on this interface. Also switch part of related users on
DefaultNetworkSimulationConfig.
This two changes united into single CL to prevent work duplication.
Most changes were done because of stop including fake_network_pipe.h
into direct_transport.h, so splitting this into 2 CLs will require
first fix all imports of fake_network_pipe.h and then replace them
on new API imports again.
Bug: webrtc:9630
Change-Id: I87d4a6ff1bab72d04a9871a40441f4fbe028f4e6
Reviewed-on: https://webrtc-review.googlesource.com/94762
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24336}
diff --git a/test/direct_transport.h b/test/direct_transport.h
index 2d47307..c5c2d94 100644
--- a/test/direct_transport.h
+++ b/test/direct_transport.h
@@ -15,8 +15,9 @@
#include <memory>
#include "api/call/transport.h"
+#include "api/test/simulated_network.h"
#include "call/call.h"
-#include "call/fake_network_pipe.h"
+#include "call/simulated_packet_receiver.h"
#include "rtc_base/sequenced_task_checker.h"
#include "rtc_base/thread_annotations.h"
#include "test/single_threaded_task_queue.h"
@@ -46,12 +47,12 @@
const std::map<uint8_t, MediaType>& payload_type_map);
DirectTransport(SingleThreadedTaskQueueForTesting* task_queue,
- const FakeNetworkPipe::Config& config,
+ const DefaultNetworkSimulationConfig& config,
Call* send_call,
const std::map<uint8_t, MediaType>& payload_type_map);
DirectTransport(SingleThreadedTaskQueueForTesting* task_queue,
- std::unique_ptr<FakeNetworkPipe> pipe,
+ std::unique_ptr<SimulatedPacketReceiverInterface> pipe,
Call* send_call,
const std::map<uint8_t, MediaType>& payload_type_map);
@@ -59,7 +60,7 @@
void SetClockOffset(int64_t offset_ms);
- void SetConfig(const FakeNetworkPipe::Config& config);
+ void SetConfig(const DefaultNetworkSimulationConfig& config);
RTC_DEPRECATED void StopSending();
@@ -86,7 +87,7 @@
RTC_GUARDED_BY(&sequence_checker_);
const Demuxer demuxer_;
- const std::unique_ptr<FakeNetworkPipe> fake_network_;
+ const std::unique_ptr<SimulatedPacketReceiverInterface> fake_network_;
rtc::SequencedTaskChecker sequence_checker_;
};