[vlc-devel] [PATCH 01/24] [mux/ogg] Enable dirac support

David Flynn davidf+nntp at woaf.net
Tue Nov 4 19:46:30 CET 2008


On 2008-11-01, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> On Thu, Oct 30, 2008, davidf+nntp at woaf.net wrote:
>> +        else if( p_stream->i_fourcc == VLC_FOURCC( 'd', 'r', 'a', 'c' ) )
>> +        {
>> +            mtime_t dt = (p_data->i_dts - p_sys->i_start_dts + 1)
>> +                       * p_input->p_fmt->video.i_frame_rate *2
>> +                       / p_input->p_fmt->video.i_frame_rate_base
>> +                       / INT64_C(1000000);
>> +            mtime_t delay = (p_data->i_pts - p_data->i_dts + 1)
>> +                          * p_input->p_fmt->video.i_frame_rate *2
>> +                          / p_input->p_fmt->video.i_frame_rate_base
>> +                          / INT64_C(1000000);
>> +            if( p_data->i_flags & BLOCK_FLAG_TYPE_I )
>> +                p_stream->i_last_keyframe = dt;
>> +            mtime_t dist = dt - p_stream->i_last_keyframe;
>> +            op.granulepos = dt << 31 | (dist&0xff00) << 14
>> +                          | (delay&0x1fff) << 9 | (dist&0xff);
>> +        }
>  You MUST check for video.i_frame_rate_base != 0 as it may not always be
> be set (probably in the Add function, and refuse it if not valid).

Ok.

>  Is it mandatory to suppose CFR ? (VLC will create a non CFR video if the
> space of the input cannot be controlled in order to accomodate clock drift).

How does vlc signal when it is non CFR?

Due to shortcomings in ogg, the only way to represent noncfr video,
would be to multiply up the 'granulerate' so that the varience in pts
can be taken into account, and that would require oggskeleton support,
and a lot of hope.

..david




More information about the vlc-devel mailing list