Bug 1241321 - No RTCP stats for audio streams. r=rjesup

AudioConduit was calling a deprecated and unimplemented to get SenderInfo RTCP stats.
This commit is contained in:
[:ng] 2016-01-29 14:45:21 -08:00
parent bcbb24f258
commit 2bc7dd5f70

View File

@ -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,13 +205,17 @@ 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);
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.NTP_timestamp_high,
senderInfo.NTP_timestamp_low);
*packetsSent = senderInfo.sender_packet_count;
*bytesSent = senderInfo.sender_octet_count;
*timestamp = NTPtoDOMHighResTimeStamp(senderInfo.NTPseconds,
senderInfo.NTPfraction);
*packetsSent = senderInfo.sendPacketCount;
*bytesSent = senderInfo.sendOctetCount;
}
return result;
}