<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>My video encoder/server streams live video via multicast. It is being tested with multiple instances of VLC running under Windows.</p>
<p>At some point, at the moment a new VLC session connects to the multicast stream (via an RTSP url), the presentation time can jump forward or back by a huge amount and I can't find why. The consequence of this is that starting and connecting a second VLC session will cause the first live VLC session to freeze. Starting a 3rd VLC session will cause sessions 1 and 2 to freeze.</p>
<p>My code for presentation time is:-</p>
<p>void StreamSource::setPresentationTime()<br />{<br /> if (fPresentationTime.tv_sec == 0 && fPresentationTime.tv_usec == 0)<br /> {<br /> gettimeofday(&fPresentationTime, NULL);<br /> INFO("setPresentationTime: %ld.%06ld\n", fPresentationTime.tv_sec, fPresentationTime.tv_usec);<br /> }<br /> else<br /> {<br /> int iSkip;<br /> double fMaxFps;<br /> g_ViewDescriptors[0]->GetFrameSkip(iSkip);<br /> fMaxFps = CalcTrueFpsfromSkip(iSkip); //eg 25fps, 12.5fps etc, the frame rate<br /> // Increment by the sample time<br /> unsigned uSeconds = fPresentationTime.tv_usec + (unsigned)(1000000.0/fMaxFps);<br /> fPresentationTime.tv_sec += uSeconds/1000000;<br /> fPresentationTime.tv_usec = uSeconds%1000000;<br /> }<br />}</p>
<p>Via wireshark I can see a huge jump in Presentation time which I don't seem to have caused in the code above, ie here, where the time has jumped backwards</p>
<p><img src="cid:52d30e2bdfdeeb66ea7a49fbfa0a07b4@avalesta.com" width="1102" height="185" /></p>
<p>I need to be able to support multip[le VLC session connecting and disconnecting, so what could be causing these seemingly random jumps in the frame presentation time when a VLC session connects?</p>
<p>Best regards</p>
<p>David</p>
<div id="signature">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</div>
</body></html>