mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-02 10:41:16 +00:00
lavc: fix and extend AVCodecContext.hwaccel_context doxy
Mention: - that it is legacy and optional (every hwaccel that uses it can also work with hwcontext, though some optional information can only be signalled throught hwaccel_context) - that it can be used for encoders (only qsvenc currently) - ownership and lifetime
This commit is contained in:
parent
a89025f74d
commit
0a811f8f94
@ -1388,13 +1388,26 @@ typedef struct AVCodecContext {
|
||||
const struct AVHWAccel *hwaccel;
|
||||
|
||||
/**
|
||||
* Hardware accelerator context.
|
||||
* 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. Please refer to the
|
||||
* FFmpeg HW accelerator documentation to know how to fill this.
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user
|
||||
* Legacy hardware accelerator context.
|
||||
*
|
||||
* For some hardware acceleration methods, the caller may use this field to
|
||||
* signal hwaccel-specific data to the codec. The struct pointed to by this
|
||||
* pointer is hwaccel-dependent and defined in the respective header. Please
|
||||
* refer to the FFmpeg HW accelerator documentation to know how to fill
|
||||
* this.
|
||||
*
|
||||
* In most cases this field is optional - the necessary information may also
|
||||
* be provided to libavcodec through @ref hw_frames_ctx or @ref
|
||||
* hw_device_ctx (see avcodec_get_hw_config()). However, in some cases it
|
||||
* may be the only method of signalling some (optional) information.
|
||||
*
|
||||
* The struct and its contents are owned by the caller.
|
||||
*
|
||||
* - encoding: May be set by the caller before avcodec_open2(). Must remain
|
||||
* valid until avcodec_free_context().
|
||||
* - decoding: May be set by the caller in the get_format() callback.
|
||||
* Must remain valid until the next get_format() call,
|
||||
* or avcodec_free_context() (whichever comes first).
|
||||
*/
|
||||
void *hwaccel_context;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user