AVHWFramesContext

This struct describes a set or pool of "hardware" frames (i.e. those with data not located in normal system memory). All the frames in the pool are assumed to be allocated in the same way and interchangeable.

This struct is reference-counted with the AVBuffer mechanism and tied to a given AVHWDeviceContext instance. The av_hwframe_ctx_alloc() constructor yields a reference, whose data field points to the actual AVHWFramesContext struct.

Members

Variables

av_class
const(AVClass)* av_class;

A class for logging.

device_ctx
AVHWDeviceContext* device_ctx;

The parent AVHWDeviceContext. This is simply a pointer to device_ref->data provided for convenience.

device_ref
AVBufferRef* device_ref;

A reference to the parent AVHWDeviceContext. This reference is owned and managed by the enclosing AVHWFramesContext, but the caller may derive additional references from it.

format
AVPixelFormat format;

The pixel format identifying the underlying HW surface type.

free
void function(AVHWFramesContext* ctx) free;

This field may be set by the caller before calling av_hwframe_ctx_init().

height
int height;
Undocumented in source.
hwctx
void* hwctx;

The format-specific data, allocated and freed automatically along with this context.

initial_pool_size
int initial_pool_size;

Initial size of the frame pool. If a device type does not support dynamically resizing the pool, then this is also the maximum pool size.

internal
AVHWFramesInternal* internal;

Private data used internally by libavutil. Must not be accessed in any way by the caller.

pool
AVBufferPool* pool;

A pool from which the frames are allocated by av_hwframe_get_buffer(). This field may be set by the caller before calling av_hwframe_ctx_init(). The buffers returned by calling av_buffer_pool_get() on this pool must have the properties described in the documentation in the corresponding hw type's header (hwcontext_*.h). The pool will be freed strictly before this struct's free() callback is invoked.

sw_format
AVPixelFormat sw_format;

The pixel format identifying the actual data layout of the hardware frames.

user_opaque
void* user_opaque;

Arbitrary user data, to be used e.g. by the free() callback.

width
int width;

The allocated dimensions of the frames in this pool.

Meta