19 #ifndef AVUTIL_HWCONTEXT_INTERNAL_H 20 #define AVUTIL_HWCONTEXT_INTERNAL_H This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
int(* device_derive)(AVHWDeviceContext *dst_ctx, AVHWDeviceContext *src_ctx, AVDictionary *opts, int flags)
This structure describes decoded (raw) audio or video data.
void(* frames_uninit)(AVHWFramesContext *ctx)
int(* frames_derive_from)(AVHWFramesContext *dst_ctx, AVHWFramesContext *src_ctx, int flags)
const HWContextType ff_hwcontext_type_vdpau
const HWContextType ff_hwcontext_type_mediacodec
const HWContextType ff_hwcontext_type_dxva2
size_t device_priv_size
size of the private data, i.e.
const HWContextType * hw_type
int(* map_from)(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src, int flags)
int(* frames_get_buffer)(AVHWFramesContext *ctx, AVFrame *frame)
AVBufferPool * pool_internal
size_t frames_priv_size
size of the private data, i.e.
size_t device_hwctx_size
size of the public hardware-specific context, i.e.
void(* unmap)(AVHWFramesContext *ctx, struct HWMapDescriptor *hwmap)
Unmap function.
int(* transfer_data_from)(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src)
const HWContextType ff_hwcontext_type_qsv
size_t frames_hwctx_size
size of the public frame pool hardware-specific context, i.e.
int(* device_init)(AVHWDeviceContext *ctx)
void(* device_uninit)(AVHWDeviceContext *ctx)
AVBufferRef * source_frames
For a derived context, a reference to the original frames context it was derived from.
int ff_hwframe_map_replace(AVFrame *dst, const AVFrame *src)
Replace the current hwmap of dst with the one from src, used for indirect mappings like VAAPI->(DRM)-...
const HWContextType ff_hwcontext_type_videotoolbox
reference-counted frame API
AVFrame * source
A reference to the original source of the mapping.
enum AVPixelFormat * pix_fmts
An array of pixel formats supported by the AVHWFramesContext instances Terminated by AV_PIX_FMT_NONE...
int(* frames_derive_to)(AVHWFramesContext *dst_ctx, AVHWFramesContext *src_ctx, int flags)
int(* transfer_get_formats)(AVHWFramesContext *ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats)
size_t device_hwconfig_size
Size of the hardware-specific device configuration.
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
const HWContextType ff_hwcontext_type_vulkan
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
int(* transfer_data_to)(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src)
int ff_hwframe_map_create(AVBufferRef *hwframe_ref, AVFrame *dst, const AVFrame *src, void(*unmap)(AVHWFramesContext *ctx, HWMapDescriptor *hwmap), void *priv)
void * priv
Hardware-specific private data associated with the mapping.
This struct describes the constraints on hardware frames attached to a given device with a hardware-s...
int source_allocation_map_flags
Flags to apply to the mapping from the source to the derived frame context when trying to allocate in...
This struct describes a set or pool of "hardware" frames (i.e.
refcounted data buffer API
AVBufferRef * hw_frames_ctx
A reference to the hardware frames context in which this mapping was made.
int(* device_create)(AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags)
#define flags(name, subs,...)
const HWContextType ff_hwcontext_type_d3d11va
A reference to a data buffer.
const HWContextType * hw_type
const HWContextType ff_hwcontext_type_opencl
const HWContextType ff_hwcontext_type_drm
const HWContextType ff_hwcontext_type_cuda
AVHWFrameTransferDirection
int(* frames_get_constraints)(AVHWDeviceContext *ctx, const void *hwconfig, AVHWFramesConstraints *constraints)
int(* map_to)(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src, int flags)
AVBufferRef * source_device
For a derived device, a reference to the original device context it was derived from.
AVPixelFormat
Pixel format.
int(* frames_init)(AVHWFramesContext *ctx)
const HWContextType ff_hwcontext_type_vaapi