All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
AVHWDeviceContext Struct Reference

This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e. More...

#include <hwcontext.h>

Data Fields

const AVClassav_class
 A class for logging. More...
 Private data used internally by libavutil. More...
enum AVHWDeviceType type
 This field identifies the underlying API used for hardware access. More...
 The format-specific data, allocated and freed by libavutil along with this context. More...
void(* free )(struct AVHWDeviceContext *ctx)
 This field may be set by the caller before calling av_hwdevice_ctx_init(). More...
 Arbitrary user data, to be used e.g. More...

Detailed Description

This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.

state that is not tied to a concrete processing configuration. E.g., in an API that supports hardware-accelerated encoding and decoding, this struct will (if possible) wrap the state that is common to both encoding and decoding and from which specific instances of encoders or decoders can be derived.

This struct is reference-counted with the AVBuffer mechanism. The av_hwdevice_ctx_alloc() constructor yields a reference, whose data field points to the actual AVHWDeviceContext. Further objects derived from AVHWDeviceContext (such as AVHWFramesContext, describing a frame pool with specific properties) will hold an internal reference to it. After all the references are released, the AVHWDeviceContext itself will be freed, optionally invoking a user-specified callback for uninitializing the hardware state.

Definition at line 58 of file hwcontext.h.

Field Documentation

const AVClass* AVHWDeviceContext::av_class

A class for logging.

Set by av_hwdevice_ctx_alloc().

Definition at line 62 of file hwcontext.h.

Referenced by av_hwdevice_ctx_alloc().

AVHWDeviceInternal* AVHWDeviceContext::internal
enum AVHWDeviceType AVHWDeviceContext::type

This field identifies the underlying API used for hardware access.

This field is set when this struct is allocated and never changed afterwards.

Definition at line 76 of file hwcontext.h.

Referenced by av_hwdevice_ctx_alloc(), av_hwdevice_ctx_create_derived(), ff_vaapi_decode_init(), qsv_device_derive_from_child(), qsv_frames_derive_from(), qsv_frames_derive_to(), qsv_init_child_ctx(), and vaapi_device_derive().

void* AVHWDeviceContext::hwctx

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

Should be cast by the user to the format-specific context defined in the corresponding header (hwcontext_*.h) and filled as described in the documentation before calling av_hwdevice_ctx_init().

After calling av_hwdevice_ctx_init() this struct should not be modified by the caller.

Definition at line 89 of file hwcontext.h.

Referenced by av_hwdevice_ctx_alloc(), config_props(), cuda_buffer_free(), cuda_device_create(), cuda_device_init(), cuda_device_uninit(), cuda_pool_alloc(), cuda_transfer_data_from(), cuda_transfer_data_to(), cudascale_config_props(), cudascale_filter_frame(), cuvid_decode_init(), cuvid_decode_packet(), cuvid_flush(), cuvid_output_frame(), d3d11va_alloc_single(), d3d11va_create_staging_texture(), d3d11va_device_create(), d3d11va_device_init(), d3d11va_device_uninit(), d3d11va_frames_init(), d3d11va_transfer_data(), drm_device_create(), drm_device_free(), dxva2_device_create(), dxva2_device_free(), dxva2_frames_uninit(), dxva2_init_pool(), ff_dxva2_decode_init(), ff_dxva2_lock(), ff_dxva2_unlock(), ff_qsv_init_session_device(), ff_vaapi_decode_init(), ff_vaapi_encode_init(), ff_vdpau_common_init(), filter_frame(), hwdevice_ctx_free(), init_out_session(), kmsgrab_read_header(), nppscale_filter_frame(), nvenc_setup_device(), qsv_device_derive_from_child(), qsv_device_free(), qsv_device_init(), qsv_init_child_ctx(), vaapi_buffer_free(), vaapi_device_connect(), vaapi_device_derive(), vaapi_device_free(), vaapi_device_init(), vaapi_frames_get_constraints(), vaapi_frames_init(), vaapi_map_frame(), vaapi_pool_alloc(), vaapi_unmap_frame(), vdpau_device_init(), vdpau_init_pixmfts(), and vdpau_pool_alloc().

void(* AVHWDeviceContext::free)(struct AVHWDeviceContext *ctx)

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

If non-NULL, this callback will be called when the last reference to this context is unreferenced, immediately before it is freed.

when other objects (e.g an AVHWFramesContext) are derived from this struct, this callback will be invoked after all such child objects are fully uninitialized and their respective destructors invoked.

Definition at line 101 of file hwcontext.h.

Referenced by drm_device_create(), dxva2_device_create(), hwdevice_ctx_free(), qsv_device_create(), vaapi_device_create(), and vaapi_device_derive().

void* AVHWDeviceContext::user_opaque

The documentation for this struct was generated from the following file: