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
Родитель 4b9059bd5a
Коммит 48405f6b0c
1 изменённых файлов: 15 добавлений и 10 удалений

Просмотреть файл

@ -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