From 48405f6b0c23369c4c3d7f39c384b9f07b48db3a Mon Sep 17 00:00:00 2001 From: "[:ng]" Date: Fri, 29 Jan 2016 14:45:21 -0800 Subject: [PATCH] Bug 1241321 - No RTCP stats for audio streams. r=rjesup AudioConduit was calling a deprecated and unimplemented to get SenderInfo RTCP stats. --- .../src/media-conduit/AudioConduit.cpp | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp index bcf8dc9e7593..4547248c2b2c 100755 --- a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp +++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp @@ -25,6 +25,7 @@ #include "webrtc/common.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" +#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h" #include "webrtc/voice_engine/include/voe_errors.h" #include "webrtc/system_wrappers/interface/clock.h" @@ -204,16 +205,20 @@ bool WebrtcAudioConduit::GetRTCPReceiverReport(DOMHighResTimeStamp* timestamp, bool WebrtcAudioConduit::GetRTCPSenderReport(DOMHighResTimeStamp* timestamp, unsigned int* packetsSent, uint64_t* bytesSent) { - struct webrtc::SenderInfo senderInfo; - bool result = !mPtrRTP->GetRemoteRTCPSenderInfo(mChannel, &senderInfo); - if (result) { - *timestamp = NTPtoDOMHighResTimeStamp(senderInfo.NTP_timestamp_high, - senderInfo.NTP_timestamp_low); - *packetsSent = senderInfo.sender_packet_count; - *bytesSent = senderInfo.sender_octet_count; - } - return result; -} + webrtc::RTCPSenderInfo senderInfo; + webrtc::RtpRtcp * rtpRtcpModule; + webrtc::RtpReceiver * rtp_receiver; + bool result = + !mPtrVoEVideoSync->GetRtpRtcp(mChannel,&rtpRtcpModule,&rtp_receiver) && + !rtpRtcpModule->RemoteRTCPStat(&senderInfo); + if (result){ + *timestamp = NTPtoDOMHighResTimeStamp(senderInfo.NTPseconds, + senderInfo.NTPfraction); + *packetsSent = senderInfo.sendPacketCount; + *bytesSent = senderInfo.sendOctetCount; + } + return result; + } /* * WebRTCAudioConduit Implementation