[vlc-devel] [PATCH 15/48] picture: pointer for decoder-specified hardware context
Rémi Denis-Courmont
remi at remlab.net
Wed Jul 3 17:23:29 CEST 2013
On Tue, 02 Jul 2013 22:57:37 +0200, Rafaël Carré <funman at videolan.org>
wrote:
> Hello,
>
> Le 02/07/2013 19:51, Rémi Denis-Courmont a écrit :
>> ---
>> include/vlc_picture.h | 1 +
>> src/misc/picture.c | 20 ++++++++++++++++++--
>> 2 files changed, 19 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/vlc_picture.h b/include/vlc_picture.h
>> index c99f54d..126229f 100644
>> --- a/include/vlc_picture.h
>> +++ b/include/vlc_picture.h
>> @@ -91,6 +91,7 @@ struct picture_t
>> bool b_progressive; /**< is it a progressive
>> frame ? */
>> bool b_top_field_first; /**< which field is
>> first */
>> unsigned int i_nb_fields; /**< # of displayed
>> fields */
>> + void * context; /**< video
format-specific
>> data,
>
> What about this?
>
> * the first member of
> * this struct must be a
> * (**context)( void * )
> * and takes this context
> * as an argument */
I agree it should be documented better but the first member must actually
be a '(void (*)(void *))'.
I made it that way so that only one extra pointer was required in
picture_t. It would have been cleaner to add a separate cleanup callback,
but then two pointers are required - for *all* pictures.
--
Rémi Denis-Courmont
Sent from my collocated server
More information about the vlc-devel
mailing list