Add statistics gathering for packet loss.
Adds a class used to classify whether packet loss events are a single packet or multiple packets as well as how many packets have been lost. Also exposes a new function in the RtpRtcp interface to retrieve these statistics. BUG= Review URL: https://codereview.webrtc.org/1198853004 Cr-Commit-Position: refs/heads/master@{#9568}
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
|
||||
#include "webrtc/modules/rtp_rtcp/source/packet_loss_stats.h"
|
||||
#include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
|
||||
#include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h"
|
||||
#include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
|
||||
@ -170,6 +171,11 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
|
||||
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, sender info.
|
||||
int32_t RemoteRTCPStat(RTCPSenderInfo* sender_info) override;
|
||||
|
||||
@ -374,6 +380,9 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
|
||||
|
||||
RtcpRttStats* rtt_stats_;
|
||||
|
||||
PacketLossStats send_loss_stats_;
|
||||
PacketLossStats receive_loss_stats_;
|
||||
|
||||
// The processed RTT from RtcpRttStats.
|
||||
rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtt_;
|
||||
int64_t rtt_ms_;
|
||||
|
||||
Reference in New Issue
Block a user