[vlc-devel] Input MainLoop deadline

Francois Cartegnie fcvlcdev at free.fr
Mon Oct 14 20:03:50 CEST 2013


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)

In case of large amounts sent by demuxer, that delay can be quite high,
and higher than intf or stats update time.

Can't have a way to always set i_deadline = to min of i_intf_update,
i_statistic_update, or i_wakeup ?

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 );
...
}



More information about the vlc-devel mailing list