Remove deprecated ctors of DirectTransport and its subclasses and FakeNetworkPipe

Bug: webrtc:9630
Change-Id: I109fbcf247ff486579d79f74c33ffdd1af9acc00
Reviewed-on: https://webrtc-review.googlesource.com/95425
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24482}
This commit is contained in:
Artem Titov 2018-08-29 09:07:27 +02:00 committed by Commit Bot
parent f06eb57a2f
commit c7ea852189
8 changed files with 2 additions and 175 deletions

View File

@ -67,44 +67,6 @@ NetworkPacket& NetworkPacket::operator=(NetworkPacket&& o) {
return *this;
}
FakeNetworkPipe::FakeNetworkPipe(Clock* clock,
const FakeNetworkPipe::Config& config)
: FakeNetworkPipe(clock, config, nullptr, 1) {}
FakeNetworkPipe::FakeNetworkPipe(Clock* clock,
const FakeNetworkPipe::Config& config,
PacketReceiver* receiver)
: FakeNetworkPipe(clock, config, receiver, 1) {}
FakeNetworkPipe::FakeNetworkPipe(Clock* clock,
const FakeNetworkPipe::Config& config,
PacketReceiver* receiver,
uint64_t seed)
: clock_(clock),
network_simulation_(absl::make_unique<SimulatedNetwork>(config, seed)),
receiver_(receiver),
transport_(nullptr),
clock_offset_ms_(0),
dropped_packets_(0),
sent_packets_(0),
total_packet_delay_us_(0),
next_process_time_us_(clock_->TimeInMicroseconds()),
last_log_time_us_(clock_->TimeInMicroseconds()) {}
FakeNetworkPipe::FakeNetworkPipe(Clock* clock,
const FakeNetworkPipe::Config& config,
Transport* transport)
: clock_(clock),
network_simulation_(absl::make_unique<SimulatedNetwork>(config, 1)),
receiver_(nullptr),
transport_(transport),
clock_offset_ms_(0),
dropped_packets_(0),
sent_packets_(0),
total_packet_delay_us_(0),
next_process_time_us_(clock_->TimeInMicroseconds()),
last_log_time_us_(clock_->TimeInMicroseconds()) {}
FakeNetworkPipe::FakeNetworkPipe(
Clock* clock,
std::unique_ptr<NetworkSimulationInterface> network_simulation)

View File

@ -92,30 +92,15 @@ class FakeNetworkPipe : public webrtc::SimulatedPacketReceiverInterface,
public:
using Config = NetworkSimulationInterface::SimulatedNetworkConfig;
// Deprecated. DO NOT USE. To be removed. Use corresponding version with
// NetworkSimulationInterface instance instead.
// Use these constructors if you plan to insert packets using DeliverPacket().
FakeNetworkPipe(Clock* clock, const FakeNetworkPipe::Config& config);
// Will keep |network_simulation| alive while pipe is alive itself.
// Use these constructors if you plan to insert packets using DeliverPacket().
FakeNetworkPipe(
Clock* clock,
std::unique_ptr<NetworkSimulationInterface> network_simulation);
// Deprecated. DO NOT USE. To be removed. Use corresponding version with
// NetworkSimulationInterface instance instead.
FakeNetworkPipe(Clock* clock,
const FakeNetworkPipe::Config& config,
PacketReceiver* receiver);
FakeNetworkPipe(
Clock* clock,
std::unique_ptr<NetworkSimulationInterface> network_simulation,
PacketReceiver* receiver);
// Deprecated. DO NOT USE. To be removed. Use corresponding version with
// NetworkSimulationInterface instance instead.
FakeNetworkPipe(Clock* clock,
const FakeNetworkPipe::Config& config,
PacketReceiver* receiver,
uint64_t seed);
FakeNetworkPipe(
Clock* clock,
std::unique_ptr<NetworkSimulationInterface> network_simulation,

View File

@ -380,8 +380,8 @@ TEST_F(FakeNetworkPipeTest, BurstLoss) {
config.avg_burst_loss_length = kAvgBurstLength;
ReorderTestReceiver receiver;
auto simulated_network = absl::make_unique<SimulatedNetwork>(config);
std::unique_ptr<FakeNetworkPipe> pipe(
new FakeNetworkPipe(&fake_clock_, std::move(config), &receiver));
std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(
&fake_clock_, std::move(simulated_network), &receiver));
SendPackets(pipe.get(), kNumPackets, kPacketSize);
fake_clock_.AdvanceTimeMilliseconds(1000);

View File

@ -36,28 +36,6 @@ MediaType Demuxer::GetMediaType(const uint8_t* packet_data,
return MediaType::ANY;
}
DirectTransport::DirectTransport(
SingleThreadedTaskQueueForTesting* task_queue,
Call* send_call,
const std::map<uint8_t, MediaType>& payload_type_map)
: DirectTransport(task_queue,
DefaultNetworkSimulationConfig(),
send_call,
payload_type_map) {}
DirectTransport::DirectTransport(
SingleThreadedTaskQueueForTesting* task_queue,
const DefaultNetworkSimulationConfig& config,
Call* send_call,
const std::map<uint8_t, MediaType>& payload_type_map)
: send_call_(send_call),
clock_(Clock::GetRealTimeClock()),
task_queue_(task_queue),
demuxer_(payload_type_map),
fake_network_(absl::make_unique<FakeNetworkPipe>(clock_, config)) {
Start();
}
DirectTransport::DirectTransport(
SingleThreadedTaskQueueForTesting* task_queue,
std::unique_ptr<SimulatedPacketReceiverInterface> pipe,

View File

@ -42,23 +42,6 @@ class Demuxer {
// same task-queue - the one that's passed in via the constructor.
class DirectTransport : public Transport {
public:
// Deprecated. DO NOT USE. Use the constructor that takes an
// explicit pipe instead.Because there can be different ways to simulated
// underlying network passing implementation specific config to the transport
// constructor makes no sense.
DirectTransport(SingleThreadedTaskQueueForTesting* task_queue,
Call* send_call,
const std::map<uint8_t, MediaType>& payload_type_map);
// Deprecated. DO NOT USE. Use the constructor that takes an
// explicit pipe instead.Because there can be different ways to simulated
// underlying network passing implementation specific config to the transport
// constructor makes no sense.
DirectTransport(SingleThreadedTaskQueueForTesting* task_queue,
const DefaultNetworkSimulationConfig& config,
Call* send_call,
const std::map<uint8_t, MediaType>& payload_type_map);
DirectTransport(SingleThreadedTaskQueueForTesting* task_queue,
std::unique_ptr<SimulatedPacketReceiverInterface> pipe,
Call* send_call,

View File

@ -20,26 +20,6 @@
namespace webrtc {
namespace test {
LayerFilteringTransport::LayerFilteringTransport(
SingleThreadedTaskQueueForTesting* task_queue,
const DefaultNetworkSimulationConfig& config,
Call* send_call,
uint8_t vp8_video_payload_type,
uint8_t vp9_video_payload_type,
int selected_tl,
int selected_sl,
const std::map<uint8_t, MediaType>& payload_type_map,
uint32_t ssrc_to_filter_min,
uint32_t ssrc_to_filter_max)
: DirectTransport(task_queue, config, send_call, payload_type_map),
vp8_video_payload_type_(vp8_video_payload_type),
vp9_video_payload_type_(vp9_video_payload_type),
selected_tl_(selected_tl),
selected_sl_(selected_sl),
discarded_last_packet_(false),
ssrc_to_filter_min_(ssrc_to_filter_min),
ssrc_to_filter_max_(ssrc_to_filter_max) {}
LayerFilteringTransport::LayerFilteringTransport(
SingleThreadedTaskQueueForTesting* task_queue,
std::unique_ptr<SimulatedPacketReceiverInterface> pipe,
@ -60,24 +40,6 @@ LayerFilteringTransport::LayerFilteringTransport(
ssrc_to_filter_min_(ssrc_to_filter_min),
ssrc_to_filter_max_(ssrc_to_filter_max) {}
LayerFilteringTransport::LayerFilteringTransport(
SingleThreadedTaskQueueForTesting* task_queue,
const DefaultNetworkSimulationConfig& config,
Call* send_call,
uint8_t vp8_video_payload_type,
uint8_t vp9_video_payload_type,
int selected_tl,
int selected_sl,
const std::map<uint8_t, MediaType>& payload_type_map)
: DirectTransport(task_queue, config, send_call, payload_type_map),
vp8_video_payload_type_(vp8_video_payload_type),
vp9_video_payload_type_(vp9_video_payload_type),
selected_tl_(selected_tl),
selected_sl_(selected_sl),
discarded_last_packet_(false),
ssrc_to_filter_min_(0),
ssrc_to_filter_max_(0xFFFFFFFF) {}
LayerFilteringTransport::LayerFilteringTransport(
SingleThreadedTaskQueueForTesting* task_queue,
std::unique_ptr<SimulatedPacketReceiverInterface> pipe,

View File

@ -24,32 +24,6 @@ namespace test {
class LayerFilteringTransport : public test::DirectTransport {
public:
// Deprecated. DO NOT USE. Use the constructor that takes an
// explicit pipe instead.Because there can be different ways to simulated
// underlying network passing implementation specific config to the transport
// constructor makes no sense.
LayerFilteringTransport(SingleThreadedTaskQueueForTesting* task_queue,
const DefaultNetworkSimulationConfig& config,
Call* send_call,
uint8_t vp8_video_payload_type,
uint8_t vp9_video_payload_type,
int selected_tl,
int selected_sl,
const std::map<uint8_t, MediaType>& payload_type_map,
uint32_t ssrc_to_filter_min,
uint32_t ssrc_to_filter_max);
// Deprecated. DO NOT USE. Use the constructor that takes an
// explicit pipe instead.Because there can be different ways to simulated
// underlying network passing implementation specific config to the transport
// constructor makes no sense.
LayerFilteringTransport(SingleThreadedTaskQueueForTesting* task_queue,
const DefaultNetworkSimulationConfig& config,
Call* send_call,
uint8_t vp8_video_payload_type,
uint8_t vp9_video_payload_type,
int selected_tl,
int selected_sl,
const std::map<uint8_t, MediaType>& payload_type_map);
LayerFilteringTransport(
SingleThreadedTaskQueueForTesting* task_queue,
std::unique_ptr<SimulatedPacketReceiverInterface> pipe,

View File

@ -93,23 +93,6 @@ class PacketTransport : public test::DirectTransport {
public:
enum TransportType { kReceiver, kSender };
// Deprecated. DO NOT USE. Use the constructor that takes an
// explicit pipe instead.Because there can be different ways to simulated
// underlying network passing implementation specific config to the transport
// constructor makes no sense.
PacketTransport(SingleThreadedTaskQueueForTesting* task_queue,
Call* send_call,
RtpRtcpObserver* observer,
TransportType transport_type,
const std::map<uint8_t, MediaType>& payload_type_map,
const DefaultNetworkSimulationConfig& configuration)
: test::DirectTransport(task_queue,
configuration,
send_call,
payload_type_map),
observer_(observer),
transport_type_(transport_type) {}
PacketTransport(SingleThreadedTaskQueueForTesting* task_queue,
Call* send_call,
RtpRtcpObserver* observer,