diff --git a/call/fake_network_pipe.cc b/call/fake_network_pipe.cc index e702c1b6f5..df97046ad6 100644 --- a/call/fake_network_pipe.cc +++ b/call/fake_network_pipe.cc @@ -250,9 +250,11 @@ void FakeNetworkPipe::Process() { // arrived, due to NetworkProcess being called too late. For stats, use // the time it should have been on the link. total_packet_delay_us_ += added_delay_us; + ++sent_packets_; + } else { + ++dropped_packets_; } } - sent_packets_ += packets_to_deliver.size(); } rtc::CritScope crit(&config_lock_); @@ -316,21 +318,6 @@ void FakeNetworkPipe::ResetStats() { total_packet_delay_us_ = 0; } -void FakeNetworkPipe::AddToPacketDropCount() { - rtc::CritScope crit(&process_lock_); - ++dropped_packets_; -} - -void FakeNetworkPipe::AddToPacketSentCount(int count) { - rtc::CritScope crit(&process_lock_); - sent_packets_ += count; -} - -void FakeNetworkPipe::AddToTotalDelay(int delay_us) { - rtc::CritScope crit(&process_lock_); - total_packet_delay_us_ += delay_us; -} - int64_t FakeNetworkPipe::GetTimeInMicroseconds() const { return clock_->TimeInMicroseconds(); } diff --git a/call/fake_network_pipe.h b/call/fake_network_pipe.h index f85e82efc5..372c7c5ddf 100644 --- a/call/fake_network_pipe.h +++ b/call/fake_network_pipe.h @@ -150,9 +150,6 @@ class FakeNetworkPipe : public webrtc::SimulatedPacketReceiverInterface, protected: void DeliverPacketWithLock(NetworkPacket* packet); - void AddToPacketDropCount(); - void AddToPacketSentCount(int count); - void AddToTotalDelay(int delay_us); int64_t GetTimeInMicroseconds() const; bool ShouldProcess(int64_t time_now_us) const; void SetTimeToNextProcess(int64_t skip_us);