code: private void estimateJitter(RtpPacket newPacket) {
          long arrival = rtpClock.getLocalRtpTime();
          long newPacketTimestamp = newPacket.getTimestamp();
          long transit = arrival - newPacketTimestamp;
          long d = transit - currentTransit;
          if (d < 0) {
              d = -d;
          }
          // logger.info(String.format("recalculating jitter: arrival=%d, newPacketTimestamp=%d, transit=%d, transit delta=%d",
          // arrival, newPacketTimestamp, transit, d ));
          currentTransit = transit;
          currentJitter += d - ((currentJitter + 8) >> 4);
      }
docs: Calculates the current network jitter, which is an estimate of the statistical variance of the RTP data packet
  interarrival time: http://tools.ietf.org/html/rfc3550#appendix-A.8