[FFmpeg-devel] [PATCH] Add hwaccel_context to AVCodecContext
Gwenole Beauchesne
gbeauchesne
Thu Mar 12 06:36:41 CET 2009
Le 12 mars 09 ? 01:09, Michael Niedermayer a ?crit :
> On Wed, Mar 11, 2009 at 11:15:06PM +0100, Gwenole Beauchesne wrote:
>> Hi,
>>
>> This adds an hwaccel_context variable to AVCodecContext. It's used
>> to hold
>> read-only data from an FFmpeg point-of-view. Typically, those are HW
>> accelerator data.
>>
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index 1042438..a98b247 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -2340,6 +2340,13 @@ typedef struct AVCodecContext {
>> * Set to time_base ticks per frame. Default 1, e.g., H.264/
>> MPEG-2 set it to 2.
>> */
>> int ticks_per_frame;
>> +
>> + /**
>> + * Hardware accelerator context. This variable holds read-only
>> data from an FFmpeg point of view.
>> + * - encoding: unused
>> + * - decoding: Set by user
>> + */
>> + const void *hwaccel_context;
>> } AVCodecContext;
>
> This is not acceptable, this is not specifiying anything at all
> not who sets it not when no details
parse error.
> just some void * set by the user but set to what? can he set it to
> "foobar" ?
> thats not a documentation of an API
then, what would you suggest since you know what it's used for (and
suggested the addition of that var actually)?
"For some hardware accelerators, a global context needs to be provided
by the user. In that case, this holds display-dependent data FFmpeg
cannot instantiate itself. Refer to the FFmpeg HW accelerator
documentation to know how to fill this is. e.g. for VA API, this is a
struct vaapi_context."
?
More information about the ffmpeg-devel
mailing list