[FFmpeg-devel] [PATCH][VAAPI][2/6] Add common data structures and helpers (take 13A -- alternate)
Gwenole Beauchesne
gbeauchesne
Fri Mar 20 17:48:39 CET 2009
On Fri, 20 Mar 2009, Michael Niedermayer wrote:
> [...]
>> +int ff_vaapi_common_end_frame(AVCodecContext *avctx)
>> +{
>
>> + MpegEncContext * const s = avctx->priv_data;
>
> that is not pretty, in common code
Do you mean passing an MpegEncContext instead of an AVCodecContext and
then use s->avctx instead if that context is needed?
Or what is not pretty in particular?
> [...]
>> +/**
>> + * This structure is used to share data between the FFmpeg library and
>> + * the client video application.
>
>> + * This is filled in by the client application prior to calling the
>> + * FFmpeg decode functions. The members are considered read-only from
>> + * an FFmpeg point of view. This struct shall be available as
>
> well
Hey, it was a quick test, I did not update the comments. ;-)
>> + * AVCodecContext.hwaccel_context.
>> + */
>> +struct vaapi_context {
>> + void *display; ///< Window system dependent data
>> + uint32_t config_id; ///< Configuration ID
>> + uint32_t context_id; ///< Context ID (video decode pipeline)
>> +
>
>> + /* All fields hereunder are private and temporary FFmpeg data used
>> + for decoding. */
>
> i think this should be written in each doxy for each var, i mean like
> its done for AVCodecContext. Up there it can be easily missed
e.g.?
/**
* Context ID (video decode pipeline)
*
* - encoding: Set by user
* - decoding: Set by user
*/
uint32_t context_id;
/**
* VAPictureParameterBuffer ID
*
* - encoding: Set by libavcodec
* - decoding: Set by libavcodec
*/
VABufferID pic_param_buf_id;
? (including de-alignment?... since comments are now "large enough")
More information about the ffmpeg-devel
mailing list