19 #ifndef AVUTIL_HWCONTEXT_H 20 #define AVUTIL_HWCONTEXT_H 28 AV_HWDEVICE_TYPE_NONE,
29 AV_HWDEVICE_TYPE_VDPAU,
30 AV_HWDEVICE_TYPE_CUDA,
31 AV_HWDEVICE_TYPE_VAAPI,
32 AV_HWDEVICE_TYPE_DXVA2,
34 AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
35 AV_HWDEVICE_TYPE_D3D11VA,
37 AV_HWDEVICE_TYPE_OPENCL,
38 AV_HWDEVICE_TYPE_MEDIACODEC,
238 enum AVHWDeviceType av_hwdevice_find_type_by_name(
const char *name);
246 const char *av_hwdevice_get_type_name(
enum AVHWDeviceType
type);
256 enum AVHWDeviceType av_hwdevice_iterate_types(
enum AVHWDeviceType prev);
326 int av_hwdevice_ctx_create_derived(
AVBufferRef **dst_ctx,
327 enum AVHWDeviceType
type,
392 int av_hwframe_transfer_data(
AVFrame *dst,
const AVFrame *src,
int flags);
394 enum AVHWFrameTransferDirection {
398 AV_HWFRAME_TRANSFER_DIRECTION_FROM,
403 AV_HWFRAME_TRANSFER_DIRECTION_TO,
421 int av_hwframe_transfer_get_formats(
AVBufferRef *hwframe_ctx,
422 enum AVHWFrameTransferDirection dir,
471 void *av_hwdevice_hwconfig_alloc(
AVBufferRef *device_ctx);
486 const void *hwconfig);
503 AV_HWFRAME_MAP_READ = 1 << 0,
507 AV_HWFRAME_MAP_WRITE = 1 << 1,
513 AV_HWFRAME_MAP_OVERWRITE = 1 << 2,
519 AV_HWFRAME_MAP_DIRECT = 1 << 3,
578 int av_hwframe_ctx_create_derived(
AVBufferRef **derived_frame_ctx,
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
Definition: hwcontext.h:60
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
int width
The allocated dimensions of the frames in this pool.
Definition: hwcontext.h:228
enum AVPixelFormat format
The pixel format identifying the underlying HW surface type.
Definition: hwcontext.h:208
void * user_opaque
Arbitrary user data, to be used e.g.
Definition: hwcontext.h:174
int max_width
The maximum size of frames in this hw_frames_ctx.
Definition: hwcontext.h:457
void * hwctx
The format-specific data, allocated and freed by libavutil along with this context.
Definition: hwcontext.h:91
Definition: buffer_internal.h:76
const AVClass * av_class
A class for logging.
Definition: hwcontext.h:127
enum AVHWDeviceType type
This field identifies the underlying API used for hardware access.
Definition: hwcontext.h:78
reference-counted frame API
int initial_pool_size
Initial size of the frame pool.
Definition: hwcontext.h:198
AVHWDeviceContext * device_ctx
The parent AVHWDeviceContext.
Definition: hwcontext.h:148
Definition: hwcontext_internal.h:102
int min_width
The minimum size of frames in this hw_frames_ctx.
Definition: hwcontext.h:450
This struct describes the constraints on hardware frames attached to a given device with a hardware-s...
Definition: hwcontext.h:432
void * hwctx
The format-specific data, allocated and freed automatically along with this context.
Definition: hwcontext.h:161
const AVClass * av_class
A class for logging.
Definition: hwcontext.h:64
Describe the class of an AVClass context structure.
Definition: log.h:67
This struct describes a set or pool of "hardware" frames (i.e.
Definition: hwcontext.h:123
Definition: hwcontext_internal.h:113
refcounted data buffer API
enum AVPixelFormat * valid_hw_formats
A list of possible values for format in the hw_frames_ctx, terminated by AV_PIX_FMT_NONE.
Definition: hwcontext.h:437
void * user_opaque
Arbitrary user data, to be used e.g.
Definition: hwcontext.h:108
AVBufferRef * device_ref
A reference to the parent AVHWDeviceContext.
Definition: hwcontext.h:140
A reference to a data buffer.
Definition: buffer.h:81
AVBufferPool * pool
A pool from which the frames are allocated by av_hwframe_get_buffer().
Definition: hwcontext.h:189
enum AVPixelFormat * valid_sw_formats
A list of possible values for sw_format in the hw_frames_ctx, terminated by AV_PIX_FMT_NONE.
Definition: hwcontext.h:444
void(* free)(struct AVHWDeviceContext *ctx)
This field may be set by the caller before calling av_hwdevice_ctx_init().
Definition: hwcontext.h:103
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
Definition: hwcontext.h:221
AVPixelFormat
Pixel format.
Definition: pixfmt.h:60