Skip to content
Snippets Groups Projects
Commit 7043f9d3 authored by Pierre Lespagnol's avatar Pierre Lespagnol
Browse files

rtcp: fix jitter convertion

Change-Id: I42b390cccfe5a849be4bffccb014534d0e75d723
parent 9740a79c
No related branches found
No related tags found
No related merge requests found
......@@ -350,7 +350,9 @@ VideoRtpSession::checkMediumRCTPInfo(RTCPInfo& rtcpi)
totalJitter += ntohl(it.jitter);
}
rtcpi.packetLoss = nbDropNotNull ? (float)( 100 * totalLost) / (256.0 * nbDropNotNull) : 0;
rtcpi.jitter = totalJitter / vectSize / 16; // millisecond
// Jitter is expressed in timestamp unit -> convert to milliseconds
// https://stackoverflow.com/questions/51956520/convert-jitter-from-rtp-timestamp-unit-to-millisseconds
rtcpi.jitter = (totalJitter / vectSize / 90000.0f) * 1000;
rtcpi.nb_sample = vectSize;
rtcpi.latency = socketPair_->getLastLatency();
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment