FFmpeg
|
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e. More...
#include <hwcontext.h>
Data Fields | |
const AVClass * | av_class |
A class for logging. More... | |
enum AVHWDeviceType | type |
This field identifies the underlying API used for hardware access. More... | |
void * | hwctx |
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... | |
void * | user_opaque |
Arbitrary user data, to be used e.g. More... | |
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 60 of file hwcontext.h.
const AVClass* AVHWDeviceContext::av_class |
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 72 of file hwcontext.h.
Referenced by amf_init_context(), av_hwdevice_ctx_create_derived_opts(), avcodec_default_get_format(), cuda_device_derive(), ddagrab_config_props(), ff_decode_get_hw_frames_ctx(), ff_get_format(), libplacebo_query_format(), mediacodec_dec_get_video_codec(), mediacodec_init(), nvenc_setup_device(), opencl_device_derive(), opencl_frames_derive_to(), qsv_device_derive(), qsv_device_derive_from_child(), qsv_dynamic_frames_derive_to(), qsv_dynamic_pool_alloc(), qsv_fixed_frames_derive_to(), qsv_frames_derive_from(), qsv_init_child_ctx(), test_derivation(), test_device(), vaapi_device_derive(), and vulkan_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 85 of file hwcontext.h.
Referenced by amf_init_context(), config_props(), copy_buffer_data(), create_mapped_buffer(), cuda_bilateral_config_props(), cuda_buffer_free(), cuda_context_init(), cuda_device_create(), cuda_device_derive(), cuda_device_uninit(), cuda_frames_init(), cuda_pool_alloc(), cuda_transfer_data(), cudachromakey_config_props(), cudacolorspace_config_props(), cudascale_config_props(), cuvid_decode_end(), cuvid_decode_init(), cuvid_decode_packet(), cuvid_flush(), cuvid_output_frame(), d3d11va_device_init(), d3d11va_device_uninit(), d3d12va_device_create(), d3d12va_device_free(), d3d12va_device_init(), d3d12va_device_uninit(), d3d12va_load_functions(), ddagrab_config_props(), drm_device_create(), drm_device_free(), ff_d3d12va_decode_init(), ff_d3d12va_encode_init(), ff_dxva2_decode_init(), ff_dxva2_lock(), ff_dxva2_unlock(), ff_qsv_init_session_device(), ff_vaapi_encode_init(), ff_vdpau_common_init(), ff_vk_decode_free_frame(), ff_vk_filter_init_context(), get_mfx_version(), get_plane_buf(), host_map_frame(), init_vpp_session(), libplacebo_query_format(), mediacodec_dec_get_video_codec(), mediacodec_init(), nppscale_filter_frame(), nppsharpen_filter_frame(), npptranspose_filter_frame(), nvenc_setup_device(), opencl_check_extension(), opencl_device_create_internal(), opencl_device_derive(), opencl_device_free(), opencl_device_init(), opencl_device_uninit(), opencl_frames_derive_to(), opencl_frames_get_constraints(), opencl_frames_init_command_queue(), opencl_map_to(), opencl_pool_alloc(), prepare_frame(), qsv_device_derive_from_child(), qsv_init_child_ctx(), try_export_flags(), vaapi_buffer_free(), vaapi_decode_find_best_format(), vaapi_decode_make_config(), vaapi_device_derive(), vaapi_device_init(), vaapi_device_uninit(), vaapi_frames_get_constraints(), vaapi_frames_init(), vaapi_get_image_format(), vaapi_map_frame(), vaapi_pool_alloc(), vaapi_transfer_get_formats(), vaapi_unmap_frame(), vkfmt_from_pixfmt2(), vulkan_device_derive(), vulkan_frame_free(), vulkan_frames_init(), vulkan_frames_uninit(), vulkan_free_internal(), vulkan_map_from(), vulkan_map_to(), vulkan_pool_alloc(), vulkan_transfer_data_from(), vulkan_transfer_data_to(), and vulkan_transfer_frame().
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.
Definition at line 97 of file hwcontext.h.
Referenced by d3d12va_device_create(), drm_device_create(), and opencl_device_create_internal().
void* AVHWDeviceContext::user_opaque |
Arbitrary user data, to be used e.g.
by the free() callback.
Definition at line 102 of file hwcontext.h.