[Live-devel] Fwd: [vlc-devel] Problem in livedotcom.cpp

Marian Durkovic md at bts.sk
Wed Mar 15 09:58:23 PST 2006


Hi all,

> >I tried to analyse the problem, and it seems to me that it is  
> >caused by
> >the way used to update the reference clock in
> >modules/demux/livedotcom.cpp: if I understand well, the i_pcr value  
> >used
> >in
> >es_out_Control( p_demux->out, ES_OUT_SET_PCR, i_pcr )
> >(in the Demux() function) is computed based on the presentation  
> >time of
> >the last received frame. This is ok if the jitter in the frame arrival
> >time is small, but seems to completely screw the reference clock if
> >frames can arrive up to 3 seconds late as in my test.

  I've also investigated this some time ago...

  The main problem here arises when something goes wrong with the
presentation times between (separate) audio/video RTP streams. Obviously,
each of the RTP streams has its own presentation timestamps and
VLC could only use one as an argument to ES_OUT_SET_PCR. The current
code in livedotcom.cpp compares the presentation timestamps among all
the ESs and uses the highest one for ES_OUT_SET_PCR.

  You could easily reproduce this problem by any standard RTP+RTCP
separate audio/video multicast. When you start VLC, the live555 library
delivers presentation timestamps for all ES referenced to sysdate - thus
the stream plays fine. However, as soon as the first RTCP packet
is received for one of the ESs, the library changes the presentation 
timestamps just for this particular ES (leaving all the other ESs referenced
to sysdate). So until all ESs see their first RTCP packets, VLC sees PTSs
for different ESs based on different refclocks and just picks the
numerically highest timestamp for ES_OUT_SET_PCR. This means either
audio or video completely stops until all the ESs are synchronized.

  
    With kind regards,


		M.


--------------------------------------------------------------------------
----                                                                  ----
----   Marian Durkovic                       network  manager         ----
----                                                                  ----
----   Slovak Technical University           Tel: +421 2 524 51 301   ----
----   Computer Centre, Nam. Slobody 17      Fax: +421 2 524 94 351   ----
----   812 43 Bratislava, Slovak Republic    E-mail/sip: md at bts.sk    ----
----                                                                  ----
--------------------------------------------------------------------------


More information about the live-devel mailing list