diff --git a/modules/rtp_rtcp/include/rtp_rtcp.h b/modules/rtp_rtcp/include/rtp_rtcp.h index e6cec61fbd..94c8250aba 100644 --- a/modules/rtp_rtcp/include/rtp_rtcp.h +++ b/modules/rtp_rtcp/include/rtp_rtcp.h @@ -337,12 +337,6 @@ class RtpRtcp : public Module, public RtcpFeedbackSenderInterface { StreamDataCounters* rtp_counters, StreamDataCounters* rtx_counters) const = 0; - // Returns packet loss statistics for the RTP stream. - virtual void GetRtpPacketLossStats( - bool outgoing, - uint32_t ssrc, - struct RtpPacketLossStats* loss_stats) const = 0; - // Returns received RTCP report block. // Returns -1 on failure else 0. // TODO(https://crbug.com/webrtc/10678): Remove this in favor of diff --git a/modules/rtp_rtcp/include/rtp_rtcp_defines.h b/modules/rtp_rtcp/include/rtp_rtcp_defines.h index b5ba5a6a46..cc2a782b1c 100644 --- a/modules/rtp_rtcp/include/rtp_rtcp_defines.h +++ b/modules/rtp_rtcp/include/rtp_rtcp_defines.h @@ -346,19 +346,6 @@ class RtcpRttStats { virtual ~RtcpRttStats() {} }; -// Statistics about packet loss for a single directional connection. All values -// are totals since the connection initiated. -struct RtpPacketLossStats { - // The number of packets lost in events where no adjacent packets were also - // lost. - uint64_t single_packet_loss_count; - // The number of events in which more than one adjacent packet was lost. - uint64_t multiple_packet_loss_event_count; - // The number of packets lost in events where more than one adjacent packet - // was lost. - uint64_t multiple_packet_loss_packet_count; -}; - class RtpPacketSender { public: RtpPacketSender() {} diff --git a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h index f82b1d6c90..e11632508e 100644 --- a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h +++ b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h @@ -122,8 +122,6 @@ class MockRtpRtcp : public RtpRtcp { int32_t(size_t* bytes_sent, uint32_t* packets_sent)); MOCK_CONST_METHOD2(GetSendStreamDataCounters, void(StreamDataCounters*, StreamDataCounters*)); - MOCK_CONST_METHOD3(GetRtpPacketLossStats, - void(bool, uint32_t, struct RtpPacketLossStats*)); MOCK_CONST_METHOD1(RemoteRTCPStat, int32_t(std::vector* receive_blocks)); MOCK_CONST_METHOD0(GetLatestReportBlockData, std::vector()); diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index ad83c9e0a5..d575ba6b68 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -558,31 +558,6 @@ void ModuleRtpRtcpImpl::GetSendStreamDataCounters( rtp_sender_->GetDataCounters(rtp_counters, rtx_counters); } -void ModuleRtpRtcpImpl::GetRtpPacketLossStats( - bool outgoing, - uint32_t ssrc, - struct RtpPacketLossStats* loss_stats) const { - if (!loss_stats) - return; - const PacketLossStats* stats_source = NULL; - if (outgoing) { - if (SSRC() == ssrc) { - stats_source = &send_loss_stats_; - } - } else { - if (rtcp_receiver_.RemoteSSRC() == ssrc) { - stats_source = &receive_loss_stats_; - } - } - if (stats_source) { - loss_stats->single_packet_loss_count = stats_source->GetSingleLossCount(); - loss_stats->multiple_packet_loss_event_count = - stats_source->GetMultipleLossEventCount(); - loss_stats->multiple_packet_loss_packet_count = - stats_source->GetMultipleLossPacketCount(); - } -} - // Received RTCP report. int32_t ModuleRtpRtcpImpl::RemoteRTCPStat( std::vector* receive_blocks) const { @@ -649,9 +624,6 @@ void ModuleRtpRtcpImpl::SetTmmbn(std::vector bounding_set) { // Send a Negative acknowledgment packet. int32_t ModuleRtpRtcpImpl::SendNACK(const uint16_t* nack_list, const uint16_t size) { - for (int i = 0; i < size; ++i) { - receive_loss_stats_.AddLostPacket(nack_list[i]); - } uint16_t nack_length = size; uint16_t start_id = 0; int64_t now_ms = clock_->TimeInMilliseconds(); @@ -789,9 +761,6 @@ void ModuleRtpRtcpImpl::OnReceivedNack( if (!rtp_sender_) return; - for (uint16_t nack_sequence_number : nack_sequence_numbers) { - send_loss_stats_.AddLostPacket(nack_sequence_number); - } if (!rtp_sender_->StorePackets() || nack_sequence_numbers.size() == 0) { return; } diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h index 15bedc73b9..09ca17fa25 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h @@ -26,7 +26,6 @@ #include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" #include "modules/rtp_rtcp/include/rtp_rtcp.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" // RTCPPacketType -#include "modules/rtp_rtcp/source/packet_loss_stats.h" #include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h" #include "modules/rtp_rtcp/source/rtcp_receiver.h" #include "modules/rtp_rtcp/source/rtcp_sender.h" @@ -192,11 +191,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp { StreamDataCounters* rtp_counters, StreamDataCounters* rtx_counters) const override; - void GetRtpPacketLossStats( - bool outgoing, - uint32_t ssrc, - struct RtpPacketLossStats* loss_stats) const override; - // Get received RTCP report, report block. int32_t RemoteRTCPStat( std::vector* receive_blocks) const override; @@ -341,9 +335,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp { RtcpRttStats* const rtt_stats_; - PacketLossStats send_loss_stats_; - PacketLossStats receive_loss_stats_; - // The processed RTT from RtcpRttStats. rtc::CriticalSection critical_section_rtt_; int64_t rtt_ms_;