[vlc-devel] [PATCH 12/24] [demux/dirac] Trying to make dirac demuxing work with --input-slave

David Flynn davidf+nntp at woaf.net
Fri Nov 7 09:59:13 CET 2008


On 2008-10-30, davidf+nntp at woaf.net <davidf+nntp at woaf.net> wrote:
> diff --git a/modules/demux/dirac.c b/modules/demux/dirac.c
> index 43634f9..9e7214f 100644
> --- a/modules/demux/dirac.c
> +++ b/modules/demux/dirac.c
[snip]
> @@ -146,6 +149,9 @@ static int Demux( demux_t *p_demux)
> +            p_block_out->i_dts += p_sys->i_offset;
> +            p_block_out->i_pts += p_sys->i_offset;
> +            p_sys->i_dts = p_block_out->i_dts;
>              es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block_out->i_dts );
>              es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
>  
> @@ -160,13 +166,33 @@ static int Demux( demux_t *p_demux)
>   *****************************************************************************/
>  static int Control( demux_t *p_demux, int i_query, va_list args )
>  {
> -    /* demux_sys_t *p_sys  = p_demux->p_sys; */
> -    /* FIXME calculate the bitrate */
> -    if( i_query == DEMUX_SET_TIME )
> -        return VLC_EGENERIC;
> +    demux_sys_t *p_sys  = p_demux->p_sys;
> +    if( DEMUX_SET_TIME == i_query )
> +    {
> +        int64_t i64 = (int64_t)va_arg( args, int64_t );
> +        p_sys->i_offset = i64;
> +        return VLC_SUCCESS;
> +    }
> +    else if( DEMUX_GET_TIME == i_query )
> +    {
> +        int64_t *pi64 = (int64_t*)va_arg( args, int64_t * );
> +        *pi64 = p_sys->i_dts;
> +        return VLC_SUCCESS;
> +    }
[snip]

Is this all completely bogus?  I think i'm slightly confused as to what
DEMUX_SET_TIME is for.

Also, should GET_TIME be returning (reordered) pts or dts?

..david




More information about the vlc-devel mailing list