[vlc-devel] Input MainLoop deadline
Rafaël Carré
funman at videolan.org
Tue Oct 15 13:00:04 CEST 2013
Hello,
Le 14/10/2013 20:03, Francois Cartegnie a écrit :
> Hi,
>
> Some time display bugs are related to missing updates calls from Input
> MainLoop.
>
> That loop waits until a GetWakeup time which is computed from the amount
> of data demuxed. (see below)
GetWakeup is related to clock drift between stream source and local
system (audio/video output), so it should be 0 for files and vary for
rtmp/http etc.
> In case of large amounts sent by demuxer, that delay can be quite high,
> and higher than intf or stats update time.
So I am not sure if it's related to amount of data demuxed but I can try
to reproduce.
> Can't have a way to always set i_deadline = to min of i_intf_update,
> i_statistic_update, or i_wakeup ?
Yes, it should be ok to use the minimum between the 3 values.
> Francois
>
>
> /* main demux/buffer loop */
> {
> ...
> do {
> mtime_t i_deadline = i_wakeup;
> if( b_paused || !b_demux_polled )
> i_deadline = __MIN( i_intf_update, i_statistic_update );
>
> /* Handle control */
> for( ;; )
> {
> ...
> /* loops until NOT TRUE */
> if( b_buffering && i_limit < i_deadline )
> ...
> }
>
> /* Update interface and statistics */
> i_current = mdate();
> if( i_intf_update < i_current || b_force_update )
> {
> /* UPDATES Interfaces time */
> MainLoopInterface( p_input );
> i_intf_update = i_current + INT64_C(250000);
> b_force_update = false;
> }
>
> /* Update the wakeup time */
> if( i_wakeup != 0 )
> i_wakeup = es_out_GetWakeup( p_input->p->p_es_out );
> } while( i_current < i_wakeup );
As long as you don't touch i_wakeup
> ...
> }
More information about the vlc-devel
mailing list