mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Delete unused constructor of FakeNetworkPipe
Bug: None Change-Id: I960f9d3988e10fa22f3379d071818ad44e36d456 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316861 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40569}
This commit is contained in:
parent
44e54a75a7
commit
0250b69fd4
2 changed files with 0 additions and 50 deletions
|
@ -106,34 +106,13 @@ FakeNetworkPipe::FakeNetworkPipe(
|
|||
: clock_(clock),
|
||||
network_behavior_(std::move(network_behavior)),
|
||||
receiver_(receiver),
|
||||
global_transport_(nullptr),
|
||||
clock_offset_ms_(0),
|
||||
dropped_packets_(0),
|
||||
sent_packets_(0),
|
||||
total_packet_delay_us_(0),
|
||||
last_log_time_us_(clock_->TimeInMicroseconds()) {}
|
||||
|
||||
FakeNetworkPipe::FakeNetworkPipe(
|
||||
Clock* clock,
|
||||
std::unique_ptr<NetworkBehaviorInterface> network_behavior,
|
||||
Transport* transport)
|
||||
: clock_(clock),
|
||||
network_behavior_(std::move(network_behavior)),
|
||||
receiver_(nullptr),
|
||||
global_transport_(transport),
|
||||
clock_offset_ms_(0),
|
||||
dropped_packets_(0),
|
||||
sent_packets_(0),
|
||||
total_packet_delay_us_(0),
|
||||
last_log_time_us_(clock_->TimeInMicroseconds()) {
|
||||
RTC_DCHECK(global_transport_);
|
||||
AddActiveTransport(global_transport_);
|
||||
}
|
||||
|
||||
FakeNetworkPipe::~FakeNetworkPipe() {
|
||||
if (global_transport_) {
|
||||
RemoveActiveTransport(global_transport_);
|
||||
}
|
||||
RTC_DCHECK(active_transports_.empty());
|
||||
}
|
||||
|
||||
|
@ -156,21 +135,6 @@ void FakeNetworkPipe::RemoveActiveTransport(Transport* transport) {
|
|||
}
|
||||
}
|
||||
|
||||
bool FakeNetworkPipe::SendRtp(rtc::ArrayView<const uint8_t> packet,
|
||||
const PacketOptions& options) {
|
||||
RTC_DCHECK(global_transport_);
|
||||
EnqueuePacket(rtc::CopyOnWriteBuffer(packet.data(), packet.size()), options,
|
||||
false, global_transport_);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FakeNetworkPipe::SendRtcp(rtc::ArrayView<const uint8_t> packet) {
|
||||
RTC_DCHECK(global_transport_);
|
||||
EnqueuePacket(rtc::CopyOnWriteBuffer(packet), absl::nullopt, true,
|
||||
global_transport_);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FakeNetworkPipe::SendRtp(rtc::ArrayView<const uint8_t> packet,
|
||||
const PacketOptions& options,
|
||||
Transport* transport) {
|
||||
|
|
|
@ -113,11 +113,6 @@ class FakeNetworkPipe : public SimulatedPacketReceiverInterface {
|
|||
PacketReceiver* receiver,
|
||||
uint64_t seed);
|
||||
|
||||
// Use this constructor if you plan to insert packets using SendRt[c?]p().
|
||||
FakeNetworkPipe(Clock* clock,
|
||||
std::unique_ptr<NetworkBehaviorInterface> network_behavior,
|
||||
Transport* transport);
|
||||
|
||||
~FakeNetworkPipe() override;
|
||||
|
||||
FakeNetworkPipe(const FakeNetworkPipe&) = delete;
|
||||
|
@ -134,14 +129,6 @@ class FakeNetworkPipe : public SimulatedPacketReceiverInterface {
|
|||
void AddActiveTransport(Transport* transport);
|
||||
void RemoveActiveTransport(Transport* transport);
|
||||
|
||||
// Implements Transport interface. When/if packets are delivered, they will
|
||||
// be passed to the transport instance given in SetReceiverTransport(). These
|
||||
// methods should only be called if a Transport instance was provided in the
|
||||
// constructor.
|
||||
bool SendRtp(rtc::ArrayView<const uint8_t> packet,
|
||||
const PacketOptions& options);
|
||||
bool SendRtcp(rtc::ArrayView<const uint8_t> packet);
|
||||
|
||||
// Methods for use with Transport interface. When/if packets are delivered,
|
||||
// they will be passed to the instance specified by the `transport` parameter.
|
||||
// Note that that instance must be in the map of active transports.
|
||||
|
@ -216,7 +203,6 @@ class FakeNetworkPipe : public SimulatedPacketReceiverInterface {
|
|||
mutable Mutex config_lock_;
|
||||
const std::unique_ptr<NetworkBehaviorInterface> network_behavior_;
|
||||
PacketReceiver* receiver_ RTC_GUARDED_BY(config_lock_);
|
||||
Transport* const global_transport_;
|
||||
|
||||
// `process_lock` guards the data structures involved in delay and loss
|
||||
// processes, such as the packet queues.
|
||||
|
|
Loading…
Reference in a new issue