[vlc-devel] [PATCH] demux: ogg: seek to keyframes

Francois Cartegnie fcvlcdev at free.fr
Thu Oct 10 13:15:52 CEST 2013


Le 10/10/2013 10:58, Denis Charmet a écrit :
> To me, you shouldn't do that. Call ES_OUT_SET_NEXT_DISPLAY_TIME in your
> seek function and always call ES_OUT_SET_PCR. Let the core actually
> handle the preroll.

Do you mean setting ES_OUT_SET_NEXT_DISPLAY_TIME will auto preroll blocks ?

>> +        if ( p_candidate->fmt.i_cat == VIDEO_ES )
>> +        {
>> +            p_stream = p_candidate;
>> +            break;
>> +        }
>> +    }
> BEWARE! the core allow you to spawn several vout if you have several
> video tracks. It's even its basic behaviour so what about that? Not to
> mention that Opus also needs preroll.

Unsure. I need to check at least if one video track is selected. (which
means keyframe seek requirements).

>> +    while ( idx != NULL )
>> +    {
>> +        if ( idx->i_pagepos > i_pagepos ) break;
>> +        last_idx = idx;
>> +        idx = idx->p_next;
> I don't really like the id of going through all the indexes each time,
> why not keep a pointer to the last one? or use a "revert" list that just
> appends a new index at the beginning (this will change some comparison
> operator).

That's assuming you're planning to insert sequentially, but you can't
guess where the user will seek, and then which point will be inserted.
No linear or circular structure suits, but the number of elements is
should be small.


Francois



More information about the vlc-devel mailing list