[Live-devel] Live555 presentation times jump when joining multicast streams
DJM-Avalesta
david.myers at avalesta.com
Mon Dec 20 08:07:20 PST 2021
Hi,
My video encoder/server streams live video via multicast. It is being
tested with multiple instances of VLC running under Windows.
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.
My code for presentation time is:-
void StreamSource::setPresentationTime()
{
if (fPresentationTime.tv_sec == 0 && fPresentationTime.tv_usec == 0)
{
gettimeofday(&fPresentationTime, NULL);
INFO("setPresentationTime: %ld.%06ld\n",
fPresentationTime.tv_sec, fPresentationTime.tv_usec);
}
else
{
int iSkip;
double fMaxFps;
g_ViewDescriptors[0]->GetFrameSkip(iSkip);
fMaxFps = CalcTrueFpsfromSkip(iSkip); //eg 25fps, 12.5fps etc,
the frame rate
// Increment by the sample time
unsigned uSeconds = fPresentationTime.tv_usec +
(unsigned)(1000000.0/fMaxFps);
fPresentationTime.tv_sec += uSeconds/1000000;
fPresentationTime.tv_usec = uSeconds%1000000;
}
}
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
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?
Best regards
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20211220/bdd90317/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 52d30e2b.png
Type: image/png
Size: 402996 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20211220/bdd90317/attachment-0001.png>
More information about the live-devel
mailing list