Commit 7043f9d3 authored by Pierre Lespagnol's avatar Pierre Lespagnol

rtcp: fix jitter convertion

Change-Id: I42b390cccfe5a849be4bffccb014534d0e75d723
parent 9740a79c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment