Go to the documentation of this file.
23 #ifndef AVCODEC_HWACCEL_INTERNAL_H
24 #define AVCODEC_HWACCEL_INTERNAL_H
31 #define HWACCEL_CAP_ASYNC_SAFE (1 << 0)
32 #define HWACCEL_CAP_THREAD_SAFE (1 << 1)
171 #define FF_HW_CALL(avctx, function, ...) \
172 (ffhwaccel((avctx)->hwaccel)->function((avctx), __VA_ARGS__))
174 #define FF_HW_SIMPLE_CALL(avctx, function) \
175 (ffhwaccel((avctx)->hwaccel)->function(avctx))
177 #define FF_HW_HAS_CB(avctx, function) \
178 ((avctx)->hwaccel && ffhwaccel((avctx)->hwaccel)->function)
AVHWAccel p
The public AVHWAccel.
This structure describes decoded (raw) audio or video data.
int(* frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Fill the given hw_frames context with current codec parameters.
void(* flush)(AVCodecContext *avctx)
Callback to flush the hwaccel state.
RefStruct is an API for creating reference-counted objects with minimal overhead.
int(* alloc_frame)(AVCodecContext *avctx, AVFrame *frame)
Allocate a custom buffer.
int(* end_frame)(AVCodecContext *avctx)
Called at the end of each frame or field picture.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
int(* start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
Called at the beginning of each frame or field picture.
int frame_priv_data_size
Size of per-frame hardware accelerator private data.
int priv_data_size
Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.
int(* decode_params)(AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size)
Callback for parameter data (SPS/PPS/VPS etc).
int(* init)(AVCodecContext *avctx)
Initialize the hwaccel private data.
int(* uninit)(AVCodecContext *avctx)
Uninitialize the hwaccel private data.
void(* free_frame_priv)(FFRefStructOpaque hwctx, void *data)
Callback to free the hwaccel-specific frame data.
main external API structure.
static const FFHWAccel * ffhwaccel(const AVHWAccel *codec)
int(* decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
Callback for each slice.
A reference to a data buffer.
int caps_internal
Internal hwaccel capabilities.
int(* update_thread_context)(AVCodecContext *dst, const AVCodecContext *src)
Copy necessary context variables from a previous thread context to the current one.