[FFmpeg-devel] [PATCH] Add hwaccel_context to AVCodecContext

Gwenole Beauchesne gbeauchesne
Thu Mar 12 10:29:29 CET 2009


On Thu, 12 Mar 2009, Gwenole Beauchesne wrote:

>>> 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."
> ?

New patch attached with this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.context.2.patch
Type: text/x-diff
Size: 849 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090312/7fc770f0/attachment.patch>



More information about the ffmpeg-devel mailing list