[vlc-devel] [PATCH v3 01/24] picture: add helpers for picture chaining

Steve Lhomme robux4 at ycbcr.xyz
Mon Sep 21 10:53:16 CEST 2020


On 2020-09-21 10:37, Thomas Guillem wrote:
> 
> 
> On Mon, Sep 21, 2020, at 08:29, Steve Lhomme wrote:
>> Picture chains are used either to keep a list of picture (in FIFO order) or to
>> attach a picture to another and return them all at once (filters).
>> ---
>>   include/vlc_picture.h | 94 +++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 94 insertions(+)
>>
>> diff --git a/include/vlc_picture.h b/include/vlc_picture.h
>> index 7bb9ee5083c..ded7f0df81d 100644
>> --- a/include/vlc_picture.h
>> +++ b/include/vlc_picture.h
>> @@ -167,6 +167,100 @@ static inline vlc_video_context*
>> picture_GetVideoContext(picture_t *pic)
>>       return pic->context ? pic->context->vctx : NULL;
>>   }
>>   
>> +/**
>> + * picture chaining helpers
>> + */
>> +
>> +/**
>> + * Pop the chain from a picture chain.
>> + *
>> + * The next picture in the chain becomes the front of the picture
>> chain.
>> + *
>> + * \return the front of the picture chain, with other pictures still
>> chained
>> + */
>> +static inline picture_t * vlc_picture_chain_PopChain(picture_t **chain)
> 
> Do we really need this PopChain ?
> You are returning the whole chain and yet you keep it in chain. This feels dangerous.

For now I'm just moving the existing code into proper API's without 
changing what they do.

As I said in the cover letter, this one should be removed after snapshot 
uses a proper FIFO.


More information about the vlc-devel mailing list