mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 947665 - jitter stat. r=abr
This commit is contained in:
parent
df1ddddb3a
commit
1cbc8cb5b9
@ -145,6 +145,13 @@ bool WebrtcAudioConduit::GetRemoteSSRC(unsigned int* ssrc) {
|
|||||||
return !mPtrRTP->GetRemoteSSRC(mChannel, *ssrc);
|
return !mPtrRTP->GetRemoteSSRC(mChannel, *ssrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WebrtcAudioConduit::GetReceivedJitter(unsigned int* jitterMs) {
|
||||||
|
unsigned int maxJitterMs;
|
||||||
|
unsigned int discardedPackets;
|
||||||
|
return !mPtrRTP->GetRTPStatistics(mChannel, *jitterMs, maxJitterMs,
|
||||||
|
discardedPackets);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* WebRTCAudioConduit Implementation
|
* WebRTCAudioConduit Implementation
|
||||||
*/
|
*/
|
||||||
|
@ -172,6 +172,7 @@ public:
|
|||||||
webrtc::VoiceEngine* GetVoiceEngine() { return mVoiceEngine; }
|
webrtc::VoiceEngine* GetVoiceEngine() { return mVoiceEngine; }
|
||||||
bool GetLocalSSRC(unsigned int* ssrc);
|
bool GetLocalSSRC(unsigned int* ssrc);
|
||||||
bool GetRemoteSSRC(unsigned int* ssrc);
|
bool GetRemoteSSRC(unsigned int* ssrc);
|
||||||
|
bool GetReceivedJitter(unsigned int* jitterMs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WebrtcAudioConduit(const WebrtcAudioConduit& other) MOZ_DELETE;
|
WebrtcAudioConduit(const WebrtcAudioConduit& other) MOZ_DELETE;
|
||||||
|
@ -138,6 +138,7 @@ public:
|
|||||||
|
|
||||||
virtual bool GetLocalSSRC(unsigned int* ssrc) = 0;
|
virtual bool GetLocalSSRC(unsigned int* ssrc) = 0;
|
||||||
virtual bool GetRemoteSSRC(unsigned int* ssrc) = 0;
|
virtual bool GetRemoteSSRC(unsigned int* ssrc) = 0;
|
||||||
|
virtual bool GetReceivedJitter(unsigned int* jitterMs) = 0;
|
||||||
|
|
||||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaSessionConduit)
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaSessionConduit)
|
||||||
|
|
||||||
|
@ -145,6 +145,19 @@ bool WebrtcVideoConduit::GetRemoteSSRC(unsigned int* ssrc) {
|
|||||||
return !mPtrRTP->GetRemoteSSRC(mChannel, *ssrc);
|
return !mPtrRTP->GetRemoteSSRC(mChannel, *ssrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WebrtcVideoConduit::GetReceivedJitter(unsigned int* jitterMs) {
|
||||||
|
unsigned short fractionLost;
|
||||||
|
unsigned int cumulativeLost;
|
||||||
|
unsigned extendedMax;
|
||||||
|
int rttMs;
|
||||||
|
return !mPtrRTP->GetReceivedRTCPStatistics(mChannel,
|
||||||
|
fractionLost,
|
||||||
|
cumulativeLost,
|
||||||
|
extendedMax,
|
||||||
|
*jitterMs,
|
||||||
|
rttMs);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Peforms intialization of the MANDATORY components of the Video Engine
|
* Peforms intialization of the MANDATORY components of the Video Engine
|
||||||
*/
|
*/
|
||||||
|
@ -210,6 +210,7 @@ public:
|
|||||||
webrtc::VideoEngine* GetVideoEngine() { return mVideoEngine; }
|
webrtc::VideoEngine* GetVideoEngine() { return mVideoEngine; }
|
||||||
bool GetLocalSSRC(unsigned int* ssrc);
|
bool GetLocalSSRC(unsigned int* ssrc);
|
||||||
bool GetRemoteSSRC(unsigned int* ssrc);
|
bool GetRemoteSSRC(unsigned int* ssrc);
|
||||||
|
bool GetReceivedJitter(unsigned int* jitterMs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -2004,6 +2004,10 @@ PeerConnectionImpl::GetStatsImpl_s(
|
|||||||
str.AppendInt(ssrc);
|
str.AppendInt(ssrc);
|
||||||
s.mSsrc.Construct(str);
|
s.mSsrc.Construct(str);
|
||||||
}
|
}
|
||||||
|
unsigned int jitterMs;
|
||||||
|
if (mp.Conduit()->GetReceivedJitter(&jitterMs)) {
|
||||||
|
s.mJitter.Construct(double(jitterMs)/1000);
|
||||||
|
}
|
||||||
s.mPacketsReceived.Construct(mp.rtp_packets_received());
|
s.mPacketsReceived.Construct(mp.rtp_packets_received());
|
||||||
s.mBytesReceived.Construct(mp.rtp_bytes_received());
|
s.mBytesReceived.Construct(mp.rtp_bytes_received());
|
||||||
report->mInboundRTPStreamStats.Value().AppendElement(s);
|
report->mInboundRTPStreamStats.Value().AppendElement(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user