зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1615191 - P0 - implement remoteTimestamp for RTCRemoteOutboundRtpStreamStats in libwebrtc;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D78004
This commit is contained in:
Родитель
a360110c6e
Коммит
41e48cb684
|
@ -101,6 +101,7 @@ class VideoReceiveStream {
|
|||
|
||||
uint32_t rtcp_sender_packets_sent;
|
||||
uint32_t rtcp_sender_octets_sent;
|
||||
NtpTime rtcp_sender_ntp_timestamp;
|
||||
|
||||
// Timing frame info: all important timestamps for a full lifetime of a
|
||||
// single 'timing frame'.
|
||||
|
|
|
@ -326,9 +326,10 @@ class RtpRtcp : public Module {
|
|||
uint32_t ssrc,
|
||||
struct RtpPacketLossStats* loss_stats) const = 0;
|
||||
|
||||
// Returns packet count and octet count from RTCP sender report.
|
||||
// Returns packet count, octet count, and timestamp from RTCP sender report.
|
||||
virtual void RemoteRTCPSenderInfo(uint32_t* packet_count,
|
||||
uint32_t* octet_count) const = 0;
|
||||
uint32_t* octet_count,
|
||||
NtpTime* ntp_timestamp) const = 0;
|
||||
|
||||
// Returns received RTCP report block.
|
||||
// Returns -1 on failure else 0.
|
||||
|
|
|
@ -149,8 +149,9 @@ class MockRtpRtcp : public RtpRtcp {
|
|||
void(StreamDataCounters*, StreamDataCounters*));
|
||||
MOCK_CONST_METHOD3(GetRtpPacketLossStats,
|
||||
void(bool, uint32_t, struct RtpPacketLossStats*));
|
||||
MOCK_CONST_METHOD2(RemoteRTCPSenderInfo,
|
||||
void(uint32_t* packet_count, uint32_t* octet_count));
|
||||
MOCK_CONST_METHOD3(RemoteRTCPSenderInfo,
|
||||
void(uint32_t* packet_count, uint32_t* octet_count,
|
||||
NtpTime* ntp_timestamp));
|
||||
MOCK_CONST_METHOD1(RemoteRTCPStat,
|
||||
int32_t(std::vector<RTCPReportBlock>* receive_blocks));
|
||||
MOCK_METHOD4(SetRTCPApplicationSpecificData,
|
||||
|
|
|
@ -257,9 +257,11 @@ bool RTCPReceiver::NTP(uint32_t* received_ntp_secs,
|
|||
}
|
||||
|
||||
void RTCPReceiver::RemoteRTCPSenderInfo(uint32_t* packet_count,
|
||||
uint32_t* octet_count) const {
|
||||
uint32_t* octet_count,
|
||||
NtpTime* ntp_timestamp) const {
|
||||
*packet_count = remote_sender_packet_count_;
|
||||
*octet_count = remote_sender_octet_count_;
|
||||
*ntp_timestamp = remote_sender_ntp_time_;
|
||||
}
|
||||
|
||||
bool RTCPReceiver::LastReceivedXrReferenceTimeInfo(
|
||||
|
|
|
@ -85,7 +85,8 @@ class RTCPReceiver {
|
|||
|
||||
// Get received sender packet and octet counts
|
||||
void RemoteRTCPSenderInfo(uint32_t* packet_count,
|
||||
uint32_t* octet_count) const;
|
||||
uint32_t* octet_count,
|
||||
NtpTime* ntp_timestamp) const;
|
||||
|
||||
bool LastReceivedXrReferenceTimeInfo(rtcp::ReceiveTimeInfo* info) const;
|
||||
|
||||
|
|
|
@ -643,8 +643,10 @@ void ModuleRtpRtcpImpl::GetRtpPacketLossStats(
|
|||
|
||||
// Received RTCP report.
|
||||
void ModuleRtpRtcpImpl::RemoteRTCPSenderInfo(uint32_t* packet_count,
|
||||
uint32_t* octet_count) const {
|
||||
return rtcp_receiver_.RemoteRTCPSenderInfo(packet_count, octet_count);
|
||||
uint32_t* octet_count,
|
||||
NtpTime* ntp_timestamp) const {
|
||||
return rtcp_receiver_.RemoteRTCPSenderInfo(packet_count, octet_count,
|
||||
ntp_timestamp);
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl::RemoteRTCPStat(
|
||||
|
|
|
@ -191,7 +191,8 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
|
|||
struct RtpPacketLossStats* loss_stats) const override;
|
||||
|
||||
void RemoteRTCPSenderInfo(uint32_t* packet_count,
|
||||
uint32_t* octet_count) const override;
|
||||
uint32_t* octet_count,
|
||||
NtpTime* ntp_timestamp) const override;
|
||||
|
||||
// Get received RTCP report, report block.
|
||||
int32_t RemoteRTCPStat(
|
||||
|
|
|
@ -258,7 +258,8 @@ VideoReceiveStream::Stats VideoReceiveStream::GetStats() const {
|
|||
RtpRtcp* rtp_rtcp = rtp_video_stream_receiver_.rtp_rtcp();
|
||||
if (rtp_rtcp) {
|
||||
rtp_rtcp->RemoteRTCPSenderInfo(&stats.rtcp_sender_packets_sent,
|
||||
&stats.rtcp_sender_octets_sent);
|
||||
&stats.rtcp_sender_octets_sent,
|
||||
&stats.rtcp_sender_ntp_timestamp);
|
||||
}
|
||||
|
||||
return stats;
|
||||
|
|
|
@ -1677,7 +1677,8 @@ int Channel::GetRTPStatistics(CallStatistics& stats) {
|
|||
stats.packetsReceived = packetsReceived;
|
||||
|
||||
_rtpRtcpModule->RemoteRTCPSenderInfo(&stats.rtcp_sender_packets_sent,
|
||||
&stats.rtcp_sender_octets_sent);
|
||||
&stats.rtcp_sender_octets_sent,
|
||||
&stats.rtcp_sender_ntp_timestamp);
|
||||
|
||||
// --- Timestamps
|
||||
{
|
||||
|
|
|
@ -72,6 +72,7 @@ struct CallStatistics {
|
|||
|
||||
uint32_t rtcp_sender_packets_sent;
|
||||
uint32_t rtcp_sender_octets_sent;
|
||||
NtpTime rtcp_sender_ntp_timestamp;
|
||||
};
|
||||
|
||||
// See section 6.4.2 in http://www.ietf.org/rfc/rfc3550.txt for details.
|
||||
|
|
Загрузка…
Ссылка в новой задаче