pub struct Va {Show 77 fields
pub vaErrorStr: Result<unsafe extern "C" fn(error_status: VAStatus) -> *const c_char, Error>,
pub vaSetErrorCallback: Result<unsafe extern "C" fn(dpy: VADisplay, callback: VAMessageCallback, user_context: *mut c_void) -> VAMessageCallback, Error>,
pub vaSetInfoCallback: Result<unsafe extern "C" fn(dpy: VADisplay, callback: VAMessageCallback, user_context: *mut c_void) -> VAMessageCallback, Error>,
pub vaDisplayIsValid: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>,
pub vaSetDriverName: Result<unsafe extern "C" fn(dpy: VADisplay, driver_name: *mut c_char) -> VAStatus, Error>,
pub vaInitialize: Result<unsafe extern "C" fn(dpy: VADisplay, major_version: *mut c_int, minor_version: *mut c_int) -> VAStatus, Error>,
pub vaTerminate: Result<unsafe extern "C" fn(dpy: VADisplay) -> VAStatus, Error>,
pub vaQueryVendorString: Result<unsafe extern "C" fn(dpy: VADisplay) -> *const c_char, Error>,
pub vaGetLibFunc: Result<unsafe extern "C" fn(dpy: VADisplay, func: *const c_char) -> VAPrivFunc, Error>,
pub vaMaxNumProfiles: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>,
pub vaMaxNumEntrypoints: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>,
pub vaMaxNumConfigAttributes: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>,
pub vaQueryConfigProfiles: Result<unsafe extern "C" fn(dpy: VADisplay, profile_list: *mut Type, num_profiles: *mut c_int) -> VAStatus, Error>,
pub vaQueryConfigEntrypoints: Result<unsafe extern "C" fn(dpy: VADisplay, profile: Type, entrypoint_list: *mut Type, num_entrypoints: *mut c_int) -> VAStatus, Error>,
pub vaGetConfigAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, profile: Type, entrypoint: Type, attrib_list: *mut VAConfigAttrib, num_attribs: c_int) -> VAStatus, Error>,
pub vaCreateConfig: Result<unsafe extern "C" fn(dpy: VADisplay, profile: Type, entrypoint: Type, attrib_list: *mut VAConfigAttrib, num_attribs: c_int, config_id: *mut VAConfigID) -> VAStatus, Error>,
pub vaDestroyConfig: Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID) -> VAStatus, Error>,
pub vaQueryConfigAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID, profile: *mut Type, entrypoint: *mut Type, attrib_list: *mut VAConfigAttrib, num_attribs: *mut c_int) -> VAStatus, Error>,
pub vaQuerySurfaceAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, config: VAConfigID, attrib_list: *mut VASurfaceAttrib, num_attribs: *mut c_uint) -> VAStatus, Error>,
pub vaCreateSurfaces: Result<unsafe extern "C" fn(dpy: VADisplay, format: c_uint, width: c_uint, height: c_uint, surfaces: *mut VASurfaceID, num_surfaces: c_uint, attrib_list: *mut VASurfaceAttrib, num_attribs: c_uint) -> VAStatus, Error>,
pub vaDestroySurfaces: Result<unsafe extern "C" fn(dpy: VADisplay, surfaces: *mut VASurfaceID, num_surfaces: c_int) -> VAStatus, Error>,
pub vaCreateContext: Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID, picture_width: c_int, picture_height: c_int, flag: c_int, render_targets: *mut VASurfaceID, num_render_targets: c_int, context: *mut VAContextID) -> VAStatus, Error>,
pub vaDestroyContext: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID) -> VAStatus, Error>,
pub vaCreateMFContext: Result<unsafe extern "C" fn(dpy: VADisplay, mf_context: *mut VAMFContextID) -> VAStatus, Error>,
pub vaMFAddContext: Result<unsafe extern "C" fn(dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID) -> VAStatus, Error>,
pub vaMFReleaseContext: Result<unsafe extern "C" fn(dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID) -> VAStatus, Error>,
pub vaQueryProcessingRate: Result<unsafe extern "C" fn(dpy: VADisplay, config: VAConfigID, proc_buf: *mut VAProcessingRateParameter, processing_rate: *mut c_uint) -> VAStatus, Error>,
pub vaCreateBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, type_: Type, size: c_uint, num_elements: c_uint, data: *mut c_void, buf_id: *mut VABufferID) -> VAStatus, Error>,
pub vaCreateBuffer2: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, type_: Type, width: c_uint, height: c_uint, unit_size: *mut c_uint, pitch: *mut c_uint, buf_id: *mut VABufferID) -> VAStatus, Error>,
pub vaBufferSetNumElements: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, num_elements: c_uint) -> VAStatus, Error>,
pub vaMapBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, pbuf: *mut *mut c_void) -> VAStatus, Error>,
pub vaMapBuffer2: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, pbuf: *mut *mut c_void, flags: u32) -> VAStatus, Error>,
pub vaUnmapBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID) -> VAStatus, Error>,
pub vaDestroyBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, buffer_id: VABufferID) -> VAStatus, Error>,
pub vaAcquireBufferHandle: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, buf_info: *mut VABufferInfo) -> VAStatus, Error>,
pub vaReleaseBufferHandle: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID) -> VAStatus, Error>,
pub vaExportSurfaceHandle: Result<unsafe extern "C" fn(dpy: VADisplay, surface_id: VASurfaceID, mem_type: u32, flags: u32, descriptor: *mut c_void) -> VAStatus, Error>,
pub vaBeginPicture: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, render_target: VASurfaceID) -> VAStatus, Error>,
pub vaRenderPicture: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, buffers: *mut VABufferID, num_buffers: c_int) -> VAStatus, Error>,
pub vaEndPicture: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID) -> VAStatus, Error>,
pub vaMFSubmit: Result<unsafe extern "C" fn(dpy: VADisplay, mf_context: VAMFContextID, contexts: *mut VAContextID, num_contexts: c_int) -> VAStatus, Error>,
pub vaSyncSurface: Result<unsafe extern "C" fn(dpy: VADisplay, render_target: VASurfaceID) -> VAStatus, Error>,
pub vaSyncSurface2: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, timeout_ns: u64) -> VAStatus, Error>,
pub vaQuerySurfaceStatus: Result<unsafe extern "C" fn(dpy: VADisplay, render_target: VASurfaceID, status: *mut Type) -> VAStatus, Error>,
pub vaQuerySurfaceError: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, error_status: VAStatus, error_info: *mut *mut c_void) -> VAStatus, Error>,
pub vaSyncBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, timeout_ns: u64) -> VAStatus, Error>,
pub vaMaxNumImageFormats: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>,
pub vaQueryImageFormats: Result<unsafe extern "C" fn(dpy: VADisplay, format_list: *mut VAImageFormat, num_formats: *mut c_int) -> VAStatus, Error>,
pub vaCreateImage: Result<unsafe extern "C" fn(dpy: VADisplay, format: *mut VAImageFormat, width: c_int, height: c_int, image: *mut VAImage) -> VAStatus, Error>,
pub vaDestroyImage: Result<unsafe extern "C" fn(dpy: VADisplay, image: VAImageID) -> VAStatus, Error>,
pub vaSetImagePalette: Result<unsafe extern "C" fn(dpy: VADisplay, image: VAImageID, palette: *mut c_uchar) -> VAStatus, Error>,
pub vaGetImage: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, x: c_int, y: c_int, width: c_uint, height: c_uint, image: VAImageID) -> VAStatus, Error>,
pub vaPutImage: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, image: VAImageID, src_x: c_int, src_y: c_int, src_width: c_uint, src_height: c_uint, dest_x: c_int, dest_y: c_int, dest_width: c_uint, dest_height: c_uint) -> VAStatus, Error>,
pub vaDeriveImage: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, image: *mut VAImage) -> VAStatus, Error>,
pub vaMaxNumSubpictureFormats: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>,
pub vaQuerySubpictureFormats: Result<unsafe extern "C" fn(dpy: VADisplay, format_list: *mut VAImageFormat, flags: *mut c_uint, num_formats: *mut c_uint) -> VAStatus, Error>,
pub vaCreateSubpicture: Result<unsafe extern "C" fn(dpy: VADisplay, image: VAImageID, subpicture: *mut VASubpictureID) -> VAStatus, Error>,
pub vaDestroySubpicture: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID) -> VAStatus, Error>,
pub vaSetSubpictureImage: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, image: VAImageID) -> VAStatus, Error>,
pub vaSetSubpictureChromakey: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, chromakey_min: c_uint, chromakey_max: c_uint, chromakey_mask: c_uint) -> VAStatus, Error>,
pub vaSetSubpictureGlobalAlpha: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, global_alpha: f32) -> VAStatus, Error>,
pub vaAssociateSubpicture: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, target_surfaces: *mut VASurfaceID, num_surfaces: c_int, src_x: i16, src_y: i16, src_width: u16, src_height: u16, dest_x: i16, dest_y: i16, dest_width: u16, dest_height: u16, flags: u32) -> VAStatus, Error>,
pub vaDeassociateSubpicture: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, target_surfaces: *mut VASurfaceID, num_surfaces: c_int) -> VAStatus, Error>,
pub vaMaxNumDisplayAttributes: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>,
pub vaQueryDisplayAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: *mut c_int) -> VAStatus, Error>,
pub vaGetDisplayAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: c_int) -> VAStatus, Error>,
pub vaSetDisplayAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: c_int) -> VAStatus, Error>,
pub vaCopy: Result<unsafe extern "C" fn(dpy: VADisplay, dst: *mut VACopyObject, src: *mut VACopyObject, option: VACopyOption) -> VAStatus, Error>,
pub vaQueryVideoProcFilters: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, filters: *mut VAProcFilterType, num_filters: *mut c_uint) -> VAStatus, Error>,
pub vaQueryVideoProcFilterCaps: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, type_: VAProcFilterType, filter_caps: *mut c_void, num_filter_caps: *mut c_uint) -> VAStatus, Error>,
pub vaQueryVideoProcPipelineCaps: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, filters: *mut VABufferID, num_filters: c_uint, pipeline_caps: *mut VAProcPipelineCaps) -> VAStatus, Error>,
pub vaCreateProtectedSession: Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID, protected_session: *mut VAProtectedSessionID) -> VAStatus, Error>,
pub vaDestroyProtectedSession: Result<unsafe extern "C" fn(dpy: VADisplay, protected_session: VAProtectedSessionID) -> VAStatus, Error>,
pub vaAttachProtectedSession: Result<unsafe extern "C" fn(dpy: VADisplay, id: VAGenericID, protected_session: VAProtectedSessionID) -> VAStatus, Error>,
pub vaDetachProtectedSession: Result<unsafe extern "C" fn(dpy: VADisplay, id: VAGenericID) -> VAStatus, Error>,
pub vaProtectedSessionExecute: Result<unsafe extern "C" fn(dpy: VADisplay, protected_session: VAProtectedSessionID, buf_id: VABufferID) -> VAStatus, Error>,
pub vaGetDisplayDRM: Result<unsafe extern "C" fn(fd: c_int) -> VADisplay, Error>,
/* private fields */
}Fields§
§vaErrorStr: Result<unsafe extern "C" fn(error_status: VAStatus) -> *const c_char, Error>§vaSetErrorCallback: Result<unsafe extern "C" fn(dpy: VADisplay, callback: VAMessageCallback, user_context: *mut c_void) -> VAMessageCallback, Error>§vaSetInfoCallback: Result<unsafe extern "C" fn(dpy: VADisplay, callback: VAMessageCallback, user_context: *mut c_void) -> VAMessageCallback, Error>§vaDisplayIsValid: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>§vaSetDriverName: Result<unsafe extern "C" fn(dpy: VADisplay, driver_name: *mut c_char) -> VAStatus, Error>§vaInitialize: Result<unsafe extern "C" fn(dpy: VADisplay, major_version: *mut c_int, minor_version: *mut c_int) -> VAStatus, Error>§vaTerminate: Result<unsafe extern "C" fn(dpy: VADisplay) -> VAStatus, Error>§vaQueryVendorString: Result<unsafe extern "C" fn(dpy: VADisplay) -> *const c_char, Error>§vaGetLibFunc: Result<unsafe extern "C" fn(dpy: VADisplay, func: *const c_char) -> VAPrivFunc, Error>§vaMaxNumProfiles: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>§vaMaxNumEntrypoints: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>§vaMaxNumConfigAttributes: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>§vaQueryConfigProfiles: Result<unsafe extern "C" fn(dpy: VADisplay, profile_list: *mut Type, num_profiles: *mut c_int) -> VAStatus, Error>§vaQueryConfigEntrypoints: Result<unsafe extern "C" fn(dpy: VADisplay, profile: Type, entrypoint_list: *mut Type, num_entrypoints: *mut c_int) -> VAStatus, Error>§vaGetConfigAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, profile: Type, entrypoint: Type, attrib_list: *mut VAConfigAttrib, num_attribs: c_int) -> VAStatus, Error>§vaCreateConfig: Result<unsafe extern "C" fn(dpy: VADisplay, profile: Type, entrypoint: Type, attrib_list: *mut VAConfigAttrib, num_attribs: c_int, config_id: *mut VAConfigID) -> VAStatus, Error>§vaDestroyConfig: Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID) -> VAStatus, Error>§vaQueryConfigAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID, profile: *mut Type, entrypoint: *mut Type, attrib_list: *mut VAConfigAttrib, num_attribs: *mut c_int) -> VAStatus, Error>§vaQuerySurfaceAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, config: VAConfigID, attrib_list: *mut VASurfaceAttrib, num_attribs: *mut c_uint) -> VAStatus, Error>§vaCreateSurfaces: Result<unsafe extern "C" fn(dpy: VADisplay, format: c_uint, width: c_uint, height: c_uint, surfaces: *mut VASurfaceID, num_surfaces: c_uint, attrib_list: *mut VASurfaceAttrib, num_attribs: c_uint) -> VAStatus, Error>§vaDestroySurfaces: Result<unsafe extern "C" fn(dpy: VADisplay, surfaces: *mut VASurfaceID, num_surfaces: c_int) -> VAStatus, Error>§vaCreateContext: Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID, picture_width: c_int, picture_height: c_int, flag: c_int, render_targets: *mut VASurfaceID, num_render_targets: c_int, context: *mut VAContextID) -> VAStatus, Error>§vaDestroyContext: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID) -> VAStatus, Error>§vaCreateMFContext: Result<unsafe extern "C" fn(dpy: VADisplay, mf_context: *mut VAMFContextID) -> VAStatus, Error>§vaMFAddContext: Result<unsafe extern "C" fn(dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID) -> VAStatus, Error>§vaMFReleaseContext: Result<unsafe extern "C" fn(dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID) -> VAStatus, Error>§vaQueryProcessingRate: Result<unsafe extern "C" fn(dpy: VADisplay, config: VAConfigID, proc_buf: *mut VAProcessingRateParameter, processing_rate: *mut c_uint) -> VAStatus, Error>§vaCreateBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, type_: Type, size: c_uint, num_elements: c_uint, data: *mut c_void, buf_id: *mut VABufferID) -> VAStatus, Error>§vaCreateBuffer2: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, type_: Type, width: c_uint, height: c_uint, unit_size: *mut c_uint, pitch: *mut c_uint, buf_id: *mut VABufferID) -> VAStatus, Error>§vaBufferSetNumElements: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, num_elements: c_uint) -> VAStatus, Error>§vaMapBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, pbuf: *mut *mut c_void) -> VAStatus, Error>§vaMapBuffer2: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, pbuf: *mut *mut c_void, flags: u32) -> VAStatus, Error>§vaUnmapBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID) -> VAStatus, Error>§vaDestroyBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, buffer_id: VABufferID) -> VAStatus, Error>§vaAcquireBufferHandle: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, buf_info: *mut VABufferInfo) -> VAStatus, Error>§vaReleaseBufferHandle: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID) -> VAStatus, Error>§vaExportSurfaceHandle: Result<unsafe extern "C" fn(dpy: VADisplay, surface_id: VASurfaceID, mem_type: u32, flags: u32, descriptor: *mut c_void) -> VAStatus, Error>§vaBeginPicture: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, render_target: VASurfaceID) -> VAStatus, Error>§vaRenderPicture: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, buffers: *mut VABufferID, num_buffers: c_int) -> VAStatus, Error>§vaEndPicture: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID) -> VAStatus, Error>§vaMFSubmit: Result<unsafe extern "C" fn(dpy: VADisplay, mf_context: VAMFContextID, contexts: *mut VAContextID, num_contexts: c_int) -> VAStatus, Error>§vaSyncSurface: Result<unsafe extern "C" fn(dpy: VADisplay, render_target: VASurfaceID) -> VAStatus, Error>§vaSyncSurface2: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, timeout_ns: u64) -> VAStatus, Error>§vaQuerySurfaceStatus: Result<unsafe extern "C" fn(dpy: VADisplay, render_target: VASurfaceID, status: *mut Type) -> VAStatus, Error>§vaQuerySurfaceError: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, error_status: VAStatus, error_info: *mut *mut c_void) -> VAStatus, Error>§vaSyncBuffer: Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, timeout_ns: u64) -> VAStatus, Error>§vaMaxNumImageFormats: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>§vaQueryImageFormats: Result<unsafe extern "C" fn(dpy: VADisplay, format_list: *mut VAImageFormat, num_formats: *mut c_int) -> VAStatus, Error>§vaCreateImage: Result<unsafe extern "C" fn(dpy: VADisplay, format: *mut VAImageFormat, width: c_int, height: c_int, image: *mut VAImage) -> VAStatus, Error>§vaDestroyImage: Result<unsafe extern "C" fn(dpy: VADisplay, image: VAImageID) -> VAStatus, Error>§vaSetImagePalette: Result<unsafe extern "C" fn(dpy: VADisplay, image: VAImageID, palette: *mut c_uchar) -> VAStatus, Error>§vaGetImage: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, x: c_int, y: c_int, width: c_uint, height: c_uint, image: VAImageID) -> VAStatus, Error>§vaPutImage: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, image: VAImageID, src_x: c_int, src_y: c_int, src_width: c_uint, src_height: c_uint, dest_x: c_int, dest_y: c_int, dest_width: c_uint, dest_height: c_uint) -> VAStatus, Error>§vaDeriveImage: Result<unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, image: *mut VAImage) -> VAStatus, Error>§vaMaxNumSubpictureFormats: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>§vaQuerySubpictureFormats: Result<unsafe extern "C" fn(dpy: VADisplay, format_list: *mut VAImageFormat, flags: *mut c_uint, num_formats: *mut c_uint) -> VAStatus, Error>§vaCreateSubpicture: Result<unsafe extern "C" fn(dpy: VADisplay, image: VAImageID, subpicture: *mut VASubpictureID) -> VAStatus, Error>§vaDestroySubpicture: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID) -> VAStatus, Error>§vaSetSubpictureImage: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, image: VAImageID) -> VAStatus, Error>§vaSetSubpictureChromakey: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, chromakey_min: c_uint, chromakey_max: c_uint, chromakey_mask: c_uint) -> VAStatus, Error>§vaSetSubpictureGlobalAlpha: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, global_alpha: f32) -> VAStatus, Error>§vaAssociateSubpicture: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, target_surfaces: *mut VASurfaceID, num_surfaces: c_int, src_x: i16, src_y: i16, src_width: u16, src_height: u16, dest_x: i16, dest_y: i16, dest_width: u16, dest_height: u16, flags: u32) -> VAStatus, Error>§vaDeassociateSubpicture: Result<unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, target_surfaces: *mut VASurfaceID, num_surfaces: c_int) -> VAStatus, Error>§vaMaxNumDisplayAttributes: Result<unsafe extern "C" fn(dpy: VADisplay) -> c_int, Error>§vaQueryDisplayAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: *mut c_int) -> VAStatus, Error>§vaGetDisplayAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: c_int) -> VAStatus, Error>§vaSetDisplayAttributes: Result<unsafe extern "C" fn(dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: c_int) -> VAStatus, Error>§vaCopy: Result<unsafe extern "C" fn(dpy: VADisplay, dst: *mut VACopyObject, src: *mut VACopyObject, option: VACopyOption) -> VAStatus, Error>§vaQueryVideoProcFilters: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, filters: *mut VAProcFilterType, num_filters: *mut c_uint) -> VAStatus, Error>§vaQueryVideoProcFilterCaps: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, type_: VAProcFilterType, filter_caps: *mut c_void, num_filter_caps: *mut c_uint) -> VAStatus, Error>§vaQueryVideoProcPipelineCaps: Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, filters: *mut VABufferID, num_filters: c_uint, pipeline_caps: *mut VAProcPipelineCaps) -> VAStatus, Error>§vaCreateProtectedSession: Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID, protected_session: *mut VAProtectedSessionID) -> VAStatus, Error>§vaDestroyProtectedSession: Result<unsafe extern "C" fn(dpy: VADisplay, protected_session: VAProtectedSessionID) -> VAStatus, Error>§vaAttachProtectedSession: Result<unsafe extern "C" fn(dpy: VADisplay, id: VAGenericID, protected_session: VAProtectedSessionID) -> VAStatus, Error>§vaDetachProtectedSession: Result<unsafe extern "C" fn(dpy: VADisplay, id: VAGenericID) -> VAStatus, Error>§vaProtectedSessionExecute: Result<unsafe extern "C" fn(dpy: VADisplay, protected_session: VAProtectedSessionID, buf_id: VABufferID) -> VAStatus, Error>§vaGetDisplayDRM: Result<unsafe extern "C" fn(fd: c_int) -> VADisplay, Error>Implementations§
Source§impl Va
impl Va
pub unsafe fn new<P>(path: P) -> Result<Self, Error>
pub unsafe fn from_library<L>(library: L) -> Result<Self, Error>
Sourcepub unsafe fn vaErrorStr(&self, error_status: VAStatus) -> *const c_char
pub unsafe fn vaErrorStr(&self, error_status: VAStatus) -> *const c_char
Returns a short english description of error_status
Sourcepub unsafe fn vaSetErrorCallback(
&self,
dpy: VADisplay,
callback: VAMessageCallback,
user_context: *mut c_void,
) -> VAMessageCallback
pub unsafe fn vaSetErrorCallback( &self, dpy: VADisplay, callback: VAMessageCallback, user_context: *mut c_void, ) -> VAMessageCallback
Set the callback for error messages, or NULL for no logging. Returns the previous one, or NULL if it was disabled.
Sourcepub unsafe fn vaSetInfoCallback(
&self,
dpy: VADisplay,
callback: VAMessageCallback,
user_context: *mut c_void,
) -> VAMessageCallback
pub unsafe fn vaSetInfoCallback( &self, dpy: VADisplay, callback: VAMessageCallback, user_context: *mut c_void, ) -> VAMessageCallback
Set the callback for info messages, or NULL for no logging. Returns the previous one, or NULL if it was disabled.
pub unsafe fn vaDisplayIsValid(&self, dpy: VADisplay) -> c_int
Sourcepub unsafe fn vaSetDriverName(
&self,
dpy: VADisplay,
driver_name: *mut c_char,
) -> VAStatus
pub unsafe fn vaSetDriverName( &self, dpy: VADisplay, driver_name: *mut c_char, ) -> VAStatus
Set the override driver name instead of queried driver driver.
Sourcepub unsafe fn vaInitialize(
&self,
dpy: VADisplay,
major_version: *mut c_int,
minor_version: *mut c_int,
) -> VAStatus
pub unsafe fn vaInitialize( &self, dpy: VADisplay, major_version: *mut c_int, minor_version: *mut c_int, ) -> VAStatus
Initialize the library
Sourcepub unsafe fn vaTerminate(&self, dpy: VADisplay) -> VAStatus
pub unsafe fn vaTerminate(&self, dpy: VADisplay) -> VAStatus
After this call, all library internal resources will be cleaned up
Sourcepub unsafe fn vaQueryVendorString(&self, dpy: VADisplay) -> *const c_char
pub unsafe fn vaQueryVendorString(&self, dpy: VADisplay) -> *const c_char
vaQueryVendorString returns a pointer to a zero-terminated string describing some aspects of the VA implemenation on a specific hardware accelerator. The format of the returned string is vendor specific and at the discretion of the implementer. e.g. for the Intel GMA500 implementation, an example would be: “Intel GMA500 - 2.0.0.32L.0005”
Sourcepub unsafe fn vaGetLibFunc(
&self,
dpy: VADisplay,
func: *const c_char,
) -> VAPrivFunc
pub unsafe fn vaGetLibFunc( &self, dpy: VADisplay, func: *const c_char, ) -> VAPrivFunc
Return a function pointer given a function name in the library. This allows private interfaces into the library
Sourcepub unsafe fn vaMaxNumProfiles(&self, dpy: VADisplay) -> c_int
pub unsafe fn vaMaxNumProfiles(&self, dpy: VADisplay) -> c_int
Get maximum number of profiles supported by the implementation
Sourcepub unsafe fn vaMaxNumEntrypoints(&self, dpy: VADisplay) -> c_int
pub unsafe fn vaMaxNumEntrypoints(&self, dpy: VADisplay) -> c_int
Get maximum number of entrypoints supported by the implementation
Sourcepub unsafe fn vaMaxNumConfigAttributes(&self, dpy: VADisplay) -> c_int
pub unsafe fn vaMaxNumConfigAttributes(&self, dpy: VADisplay) -> c_int
Get maximum number of attributs supported by the implementation
Sourcepub unsafe fn vaQueryConfigProfiles(
&self,
dpy: VADisplay,
profile_list: *mut Type,
num_profiles: *mut c_int,
) -> VAStatus
pub unsafe fn vaQueryConfigProfiles( &self, dpy: VADisplay, profile_list: *mut Type, num_profiles: *mut c_int, ) -> VAStatus
Query supported profiles The caller must provide a “profile_list” array that can hold at least vaMaxNumProfile() entries. The actual number of profiles returned in “profile_list” is returned in “num_profile”.
Sourcepub unsafe fn vaQueryConfigEntrypoints(
&self,
dpy: VADisplay,
profile: Type,
entrypoint_list: *mut Type,
num_entrypoints: *mut c_int,
) -> VAStatus
pub unsafe fn vaQueryConfigEntrypoints( &self, dpy: VADisplay, profile: Type, entrypoint_list: *mut Type, num_entrypoints: *mut c_int, ) -> VAStatus
Query supported entrypoints for a given profile The caller must provide an “entrypoint_list” array that can hold at least vaMaxNumEntrypoints() entries. The actual number of entrypoints returned in “entrypoint_list” is returned in “num_entrypoints”.
Sourcepub unsafe fn vaGetConfigAttributes(
&self,
dpy: VADisplay,
profile: Type,
entrypoint: Type,
attrib_list: *mut VAConfigAttrib,
num_attribs: c_int,
) -> VAStatus
pub unsafe fn vaGetConfigAttributes( &self, dpy: VADisplay, profile: Type, entrypoint: Type, attrib_list: *mut VAConfigAttrib, num_attribs: c_int, ) -> VAStatus
Get attributes for a given profile/entrypoint pair The caller must provide an “attrib_list” with all attributes to be retrieved. Upon return, the attributes in “attrib_list” have been updated with their value. Unknown attributes or attributes that are not supported for the given profile/entrypoint pair will have their value set to VA_ATTRIB_NOT_SUPPORTED
Sourcepub unsafe fn vaCreateConfig(
&self,
dpy: VADisplay,
profile: Type,
entrypoint: Type,
attrib_list: *mut VAConfigAttrib,
num_attribs: c_int,
config_id: *mut VAConfigID,
) -> VAStatus
pub unsafe fn vaCreateConfig( &self, dpy: VADisplay, profile: Type, entrypoint: Type, attrib_list: *mut VAConfigAttrib, num_attribs: c_int, config_id: *mut VAConfigID, ) -> VAStatus
Create a configuration for the video decode/encode/processing pipeline it passes in the attribute list that specifies the attributes it cares about, with the rest taking default values.
Sourcepub unsafe fn vaDestroyConfig(
&self,
dpy: VADisplay,
config_id: VAConfigID,
) -> VAStatus
pub unsafe fn vaDestroyConfig( &self, dpy: VADisplay, config_id: VAConfigID, ) -> VAStatus
Free resources associdated with a given config
Sourcepub unsafe fn vaQueryConfigAttributes(
&self,
dpy: VADisplay,
config_id: VAConfigID,
profile: *mut Type,
entrypoint: *mut Type,
attrib_list: *mut VAConfigAttrib,
num_attribs: *mut c_int,
) -> VAStatus
pub unsafe fn vaQueryConfigAttributes( &self, dpy: VADisplay, config_id: VAConfigID, profile: *mut Type, entrypoint: *mut Type, attrib_list: *mut VAConfigAttrib, num_attribs: *mut c_int, ) -> VAStatus
Query all attributes for a given configuration The profile of the configuration is returned in “profile” The entrypoint of the configuration is returned in “entrypoint” The caller must provide an “attrib_list” array that can hold at least vaMaxNumConfigAttributes() entries. The actual number of attributes returned in “attrib_list” is returned in “num_attribs”
Sourcepub unsafe fn vaQuerySurfaceAttributes(
&self,
dpy: VADisplay,
config: VAConfigID,
attrib_list: *mut VASurfaceAttrib,
num_attribs: *mut c_uint,
) -> VAStatus
pub unsafe fn vaQuerySurfaceAttributes( &self, dpy: VADisplay, config: VAConfigID, attrib_list: *mut VASurfaceAttrib, num_attribs: *mut c_uint, ) -> VAStatus
\brief Queries surface attributes for the supplied config.
This function queries for all supported attributes for the supplied VA \c config. In particular, if the underlying hardware supports the creation of VA surfaces in various formats, then this function will enumerate all pixel formats that are supported.
The \c attrib_list array is allocated by the user and \c num_attribs shall be initialized to the number of allocated elements in that array. Upon successful return, the actual number of attributes will be overwritten into \c num_attribs. Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \c num_attribs is adjusted to the number of elements that would be returned if enough space was available.
Note: it is perfectly valid to pass NULL to the \c attrib_list argument when vaQuerySurfaceAttributes() is used to determine the actual number of elements that need to be allocated.
@param[in] dpy the VA display @param[in] config the config identifying a codec or a video processing pipeline @param[out] attrib_list the output array of #VASurfaceAttrib elements @param[in,out] num_attribs the number of elements allocated on input, the number of elements actually filled in output
Sourcepub unsafe fn vaCreateSurfaces(
&self,
dpy: VADisplay,
format: c_uint,
width: c_uint,
height: c_uint,
surfaces: *mut VASurfaceID,
num_surfaces: c_uint,
attrib_list: *mut VASurfaceAttrib,
num_attribs: c_uint,
) -> VAStatus
pub unsafe fn vaCreateSurfaces( &self, dpy: VADisplay, format: c_uint, width: c_uint, height: c_uint, surfaces: *mut VASurfaceID, num_surfaces: c_uint, attrib_list: *mut VASurfaceAttrib, num_attribs: c_uint, ) -> VAStatus
\brief Creates an array of surfaces
Creates an array of surfaces. The optional list of attributes shall be constructed based on what the underlying hardware could expose through vaQuerySurfaceAttributes().
@param[in] dpy the VA display @param[in] format the desired surface format. See \c VA_RT_FORMAT_* @param[in] width the surface width @param[in] height the surface height @param[out] surfaces the array of newly created surfaces @param[in] num_surfaces the number of surfaces to create @param[in] attrib_list the list of (optional) attributes, or \c NULL @param[in] num_attribs the number of attributes supplied in \c attrib_list, or zero
Sourcepub unsafe fn vaDestroySurfaces(
&self,
dpy: VADisplay,
surfaces: *mut VASurfaceID,
num_surfaces: c_int,
) -> VAStatus
pub unsafe fn vaDestroySurfaces( &self, dpy: VADisplay, surfaces: *mut VASurfaceID, num_surfaces: c_int, ) -> VAStatus
vaDestroySurfaces - Destroy resources associated with surfaces. Surfaces can only be destroyed after all contexts using these surfaces have been destroyed. dpy: display surfaces: array of surfaces to destroy num_surfaces: number of surfaces in the array to be destroyed.
Sourcepub unsafe fn vaCreateContext(
&self,
dpy: VADisplay,
config_id: VAConfigID,
picture_width: c_int,
picture_height: c_int,
flag: c_int,
render_targets: *mut VASurfaceID,
num_render_targets: c_int,
context: *mut VAContextID,
) -> VAStatus
pub unsafe fn vaCreateContext( &self, dpy: VADisplay, config_id: VAConfigID, picture_width: c_int, picture_height: c_int, flag: c_int, render_targets: *mut VASurfaceID, num_render_targets: c_int, context: *mut VAContextID, ) -> VAStatus
vaCreateContext - Create a context dpy: display config_id: configuration for the context picture_width: coded picture width picture_height: coded picture height flag: any combination of the following: VA_PROGRESSIVE (only progressive frame pictures in the sequence when set) render_targets: a hint for render targets (surfaces) tied to the context num_render_targets: number of render targets in the above array context: created context id upon return
Sourcepub unsafe fn vaDestroyContext(
&self,
dpy: VADisplay,
context: VAContextID,
) -> VAStatus
pub unsafe fn vaDestroyContext( &self, dpy: VADisplay, context: VAContextID, ) -> VAStatus
vaDestroyContext - Destroy a context dpy: display context: context to be destroyed
Sourcepub unsafe fn vaCreateMFContext(
&self,
dpy: VADisplay,
mf_context: *mut VAMFContextID,
) -> VAStatus
pub unsafe fn vaCreateMFContext( &self, dpy: VADisplay, mf_context: *mut VAMFContextID, ) -> VAStatus
vaCreateMFContext - Create a multi-frame context interface encapsulating common for all streams memory objects and structures required for single GPU task submission from several VAContextID’s. Allocation: This call only creates an instance, doesn’t allocate any additional memory. Support identification: Application can identify multi-frame feature support by ability to create multi-frame context. If driver supports multi-frame - call successful, mf_context != NULL and VAStatus = VA_STATUS_SUCCESS, otherwise if multi-frame processing not supported driver returns VA_STATUS_ERROR_UNIMPLEMENTED and mf_context = NULL. return values: VA_STATUS_SUCCESS - operation successful. VA_STATUS_ERROR_UNIMPLEMENTED - no support for multi-frame. dpy: display adapter. mf_context: Multi-Frame context encapsulating all associated context for multi-frame submission.
Sourcepub unsafe fn vaMFAddContext(
&self,
dpy: VADisplay,
mf_context: VAMFContextID,
context: VAContextID,
) -> VAStatus
pub unsafe fn vaMFAddContext( &self, dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID, ) -> VAStatus
vaMFAddContext - Provide ability to associate each context used for Multi-Frame submission and common Multi-Frame context. Try to add context to understand if it is supported. Allocation: this call allocates and/or reallocates all memory objects common for all contexts associated with particular Multi-Frame context. All memory required for each context(pixel buffers, internal driver buffers required for processing) allocated during standard vaCreateContext call for each context. Runtime dependency - if current implementation doesn’t allow to run different entry points/profile, first context added will set entry point/profile for whole Multi-Frame context, all other entry points and profiles can be rejected to be added. Return values: VA_STATUS_SUCCESS - operation successful, context was added. VA_STATUS_ERROR_OPERATION_FAILED - something unexpected happened - application have to close current mf_context and associated contexts and start working with new ones. VA_STATUS_ERROR_INVALID_CONTEXT - ContextID is invalid, means: 1 - mf_context is not valid context or 2 - driver can’t suport different VAEntrypoint or VAProfile simultaneosly and current context contradicts with previously added, application can continue with current mf_context and other contexts passed this call, rejected context can continue work in stand-alone mode or other mf_context. VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT - particular context being added was created with with unsupported VAEntrypoint. Application can continue with current mf_context and other contexts passed this call, rejected context can continue work in stand-alone mode. VA_STATUS_ERROR_UNSUPPORTED_PROFILE - Current context with Particular VAEntrypoint is supported but VAProfile is not supported. Application can continue with current mf_context and other contexts passed this call, rejected context can continue work in stand-alone mode. dpy: display adapter. context: context being associated with Multi-Frame context. mf_context: - multi-frame context used to associate contexts for multi-frame submission.
Sourcepub unsafe fn vaMFReleaseContext(
&self,
dpy: VADisplay,
mf_context: VAMFContextID,
context: VAContextID,
) -> VAStatus
pub unsafe fn vaMFReleaseContext( &self, dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID, ) -> VAStatus
vaMFReleaseContext - Removes context from multi-frame and association with multi-frame context. After association removed vaEndPicture will submit tasks, but not vaMFSubmit. Return values: VA_STATUS_SUCCESS - operation successful, context was removed. VA_STATUS_ERROR_OPERATION_FAILED - something unexpected happened. application need to destroy this VAMFContextID and all assotiated VAContextID dpy: display mf_context: VAMFContextID where context is added context: VAContextID to be added
Sourcepub unsafe fn vaQueryProcessingRate(
&self,
dpy: VADisplay,
config: VAConfigID,
proc_buf: *mut VAProcessingRateParameter,
processing_rate: *mut c_uint,
) -> VAStatus
pub unsafe fn vaQueryProcessingRate( &self, dpy: VADisplay, config: VAConfigID, proc_buf: *mut VAProcessingRateParameter, processing_rate: *mut c_uint, ) -> VAStatus
\brief Queries processing rate for the supplied config.
This function queries the processing rate based on parameters in \c proc_buf for the given \c config. Upon successful return, the processing rate value will be stored in \c processing_rate. Processing rate is specified as the number of macroblocks/CTU per second.
If NULL is passed to the \c proc_buf, the default processing rate for the given configuration will be returned.
@param[in] dpy the VA display @param[in] config the config identifying a codec or a video processing pipeline @param[in] proc_buf the buffer that contains the parameters for either the encode or decode processing rate @param[out] processing_rate processing rate in number of macroblocks per second constrained by parameters specified in proc_buf
Sourcepub unsafe fn vaCreateBuffer(
&self,
dpy: VADisplay,
context: VAContextID,
type_: Type,
size: c_uint,
num_elements: c_uint,
data: *mut c_void,
buf_id: *mut VABufferID,
) -> VAStatus
pub unsafe fn vaCreateBuffer( &self, dpy: VADisplay, context: VAContextID, type_: Type, size: c_uint, num_elements: c_uint, data: *mut c_void, buf_id: *mut VABufferID, ) -> VAStatus
Creates a buffer for “num_elements” elements of “size” bytes and initalize with “data”. if “data” is null, then the contents of the buffer data store are undefined. Basically there are two ways to get buffer data to the server side. One is to call vaCreateBuffer() with a non-null “data”, which results the data being copied to the data store on the server side. A different method that eliminates this copy is to pass null as “data” when calling vaCreateBuffer(), and then use vaMapBuffer() to map the data store from the server side to the client address space for access. The user must call vaDestroyBuffer() to destroy a buffer. Note: image buffers are created by the library, not the client. Please see vaCreateImage on how image buffers are managed.
Sourcepub unsafe fn vaCreateBuffer2(
&self,
dpy: VADisplay,
context: VAContextID,
type_: Type,
width: c_uint,
height: c_uint,
unit_size: *mut c_uint,
pitch: *mut c_uint,
buf_id: *mut VABufferID,
) -> VAStatus
pub unsafe fn vaCreateBuffer2( &self, dpy: VADisplay, context: VAContextID, type_: Type, width: c_uint, height: c_uint, unit_size: *mut c_uint, pitch: *mut c_uint, buf_id: *mut VABufferID, ) -> VAStatus
Create a buffer for given width & height get unit_size, pitch, buf_id for 2D buffer for permb qp buffer, it will return unit_size for one MB or LCU and the pitch for alignments can call vaMapBuffer with this Buffer ID to get virtual address. e.g. AVC 1080P encode, 1920x1088, the size in MB is 120x68,but inside driver, maybe it should align with 256, and one byte present one Qp.so, call the function. then get unit_size = 1, pitch = 256. call vaMapBuffer to get the virtual address (pBuf). then read write the memory like 2D. the size is 256x68, application can only use 120x68 pBuf + 256 is the start of next line. different driver implementation maybe return different unit_size and pitch
Sourcepub unsafe fn vaBufferSetNumElements(
&self,
dpy: VADisplay,
buf_id: VABufferID,
num_elements: c_uint,
) -> VAStatus
pub unsafe fn vaBufferSetNumElements( &self, dpy: VADisplay, buf_id: VABufferID, num_elements: c_uint, ) -> VAStatus
Convey to the server how many valid elements are in the buffer. e.g. if multiple slice parameters are being held in a single buffer, this will communicate to the server the number of slice parameters that are valid in the buffer.
Sourcepub unsafe fn vaMapBuffer(
&self,
dpy: VADisplay,
buf_id: VABufferID,
pbuf: *mut *mut c_void,
) -> VAStatus
pub unsafe fn vaMapBuffer( &self, dpy: VADisplay, buf_id: VABufferID, pbuf: *mut *mut c_void, ) -> VAStatus
Map data store of the buffer into the client’s address space vaCreateBuffer() needs to be called with “data” set to NULL before calling vaMapBuffer()
if buffer type is VAEncCodedBufferType, pbuf points to link-list of VACodedBufferSegment, and the list is terminated if “next” is NULL
pub unsafe fn vaMapBuffer2( &self, dpy: VADisplay, buf_id: VABufferID, pbuf: *mut *mut c_void, flags: u32, ) -> VAStatus
Sourcepub unsafe fn vaUnmapBuffer(
&self,
dpy: VADisplay,
buf_id: VABufferID,
) -> VAStatus
pub unsafe fn vaUnmapBuffer( &self, dpy: VADisplay, buf_id: VABufferID, ) -> VAStatus
After client making changes to a mapped data store, it needs to “Unmap” it to let the server know that the data is ready to be consumed by the server
Sourcepub unsafe fn vaDestroyBuffer(
&self,
dpy: VADisplay,
buffer_id: VABufferID,
) -> VAStatus
pub unsafe fn vaDestroyBuffer( &self, dpy: VADisplay, buffer_id: VABufferID, ) -> VAStatus
After this call, the buffer is deleted and this buffer_id is no longer valid
A buffer can be re-used and sent to the server by another Begin/Render/End sequence if vaDestroyBuffer() is not called with this buffer.
Note re-using a shared buffer (e.g. a slice data buffer) between the host and the hardware accelerator can result in performance dropping.
Sourcepub unsafe fn vaAcquireBufferHandle(
&self,
dpy: VADisplay,
buf_id: VABufferID,
buf_info: *mut VABufferInfo,
) -> VAStatus
pub unsafe fn vaAcquireBufferHandle( &self, dpy: VADisplay, buf_id: VABufferID, buf_info: *mut VABufferInfo, ) -> VAStatus
\brief Acquires buffer handle for external API usage
Locks the VA buffer object \ref buf_id for external API usage like EGL or OpenCL (OCL). This function is a synchronization point. This means that any pending operation is guaranteed to be completed prior to returning from the function.
If the referenced VA buffer object is the backing store of a VA surface, then this function acts as if vaSyncSurface() on the parent surface was called first.
The \ref VABufferInfo argument shall be zero’ed on input. On successful output, the data structure is filled in with all the necessary buffer level implementation details like handle, type, memory type and memory size.
Note: the external API implementation, or the application, can express the memory types it is interested in by filling in the \ref mem_type field accordingly. On successful output, the memory type that fits best the request and that was used is updated in the \ref VABufferInfo data structure. If none of the supplied memory types is supported, then a \ref VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE error is returned.
The \ref VABufferInfo data is valid until vaReleaseBufferHandle() is called. Besides, no additional operation is allowed on any of the buffer parent object until vaReleaseBufferHandle() is called. e.g. decoding into a VA surface backed with the supplied VA buffer object \ref buf_id would fail with a \ref VA_STATUS_ERROR_SURFACE_BUSY error.
Possible errors:
- \ref VA_STATUS_ERROR_UNIMPLEMENTED: the VA driver implementation does not support this interface
- \ref VA_STATUS_ERROR_INVALID_DISPLAY: an invalid display was supplied
- \ref VA_STATUS_ERROR_INVALID_BUFFER: an invalid buffer was supplied
- \ref VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE: the implementation does not support exporting buffers of the specified type
- \ref VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE: none of the requested memory types in \ref VABufferInfo.mem_type was supported
@param[in] dpy the VA display @param[in] buf_id the VA buffer @param[in,out] buf_info the associated VA buffer information @return VA_STATUS_SUCCESS if successful
Sourcepub unsafe fn vaReleaseBufferHandle(
&self,
dpy: VADisplay,
buf_id: VABufferID,
) -> VAStatus
pub unsafe fn vaReleaseBufferHandle( &self, dpy: VADisplay, buf_id: VABufferID, ) -> VAStatus
\brief Releases buffer after usage from external API
Unlocks the VA buffer object \ref buf_id from external API usage like EGL or OpenCL (OCL). This function is a synchronization point. This means that any pending operation is guaranteed to be completed prior to returning from the function.
The \ref VABufferInfo argument shall point to the original data structure that was obtained from vaAcquireBufferHandle(), unaltered. This is necessary so that the VA driver implementation could deallocate any resources that were needed.
In any case, returning from this function invalidates any contents in \ref VABufferInfo. i.e. the underlyng buffer handle is no longer valid. Therefore, VA driver implementations are free to reset this data structure to safe defaults.
Possible errors:
- \ref VA_STATUS_ERROR_UNIMPLEMENTED: the VA driver implementation does not support this interface
- \ref VA_STATUS_ERROR_INVALID_DISPLAY: an invalid display was supplied
- \ref VA_STATUS_ERROR_INVALID_BUFFER: an invalid buffer was supplied
- \ref VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE: the implementation does not support exporting buffers of the specified type
@param[in] dpy the VA display @param[in] buf_id the VA buffer @return VA_STATUS_SUCCESS if successful
Sourcepub unsafe fn vaExportSurfaceHandle(
&self,
dpy: VADisplay,
surface_id: VASurfaceID,
mem_type: u32,
flags: u32,
descriptor: *mut c_void,
) -> VAStatus
pub unsafe fn vaExportSurfaceHandle( &self, dpy: VADisplay, surface_id: VASurfaceID, mem_type: u32, flags: u32, descriptor: *mut c_void, ) -> VAStatus
\brief Export a handle to a surface for use with an external API
The exported handles are owned by the caller, and the caller is responsible for freeing them when no longer needed (e.g. by closing DRM PRIME file descriptors).
This does not perform any synchronisation. If the contents of the surface will be read, vaSyncSurface() must be called before doing so. If the contents of the surface are written, then all operations must be completed externally before using the surface again by via VA-API functions.
@param[in] dpy VA display. @param[in] surface_id Surface to export. @param[in] mem_type Memory type to export to. @param[in] flags Combination of flags to apply (VA_EXPORT_SURFACE_*). @param[out] descriptor Pointer to the descriptor structure to fill with the handle details. The type of this structure depends on the value of mem_type.
@return Status code:
- VA_STATUS_SUCCESS: Success.
- VA_STATUS_ERROR_INVALID_DISPLAY: The display is not valid.
- VA_STATUS_ERROR_UNIMPLEMENTED: The driver does not implement this interface.
- VA_STATUS_ERROR_INVALID_SURFACE: The surface is not valid, or the surface is not exportable in the specified way.
- VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE: The driver does not support exporting surfaces to the specified memory type.
Sourcepub unsafe fn vaBeginPicture(
&self,
dpy: VADisplay,
context: VAContextID,
render_target: VASurfaceID,
) -> VAStatus
pub unsafe fn vaBeginPicture( &self, dpy: VADisplay, context: VAContextID, render_target: VASurfaceID, ) -> VAStatus
Get ready for a video pipeline
- decode a picture to a target surface
- encode a picture from a target surface
- process a picture to a target surface
Sourcepub unsafe fn vaRenderPicture(
&self,
dpy: VADisplay,
context: VAContextID,
buffers: *mut VABufferID,
num_buffers: c_int,
) -> VAStatus
pub unsafe fn vaRenderPicture( &self, dpy: VADisplay, context: VAContextID, buffers: *mut VABufferID, num_buffers: c_int, ) -> VAStatus
Send video decode, encode or processing buffers to the server.
Sourcepub unsafe fn vaEndPicture(
&self,
dpy: VADisplay,
context: VAContextID,
) -> VAStatus
pub unsafe fn vaEndPicture( &self, dpy: VADisplay, context: VAContextID, ) -> VAStatus
Make the end of rendering for a picture. The server should start processing all pending operations for this surface. This call is non-blocking. The client can start another Begin/Render/End sequence on a different render target. if VAContextID used in this function previously successfully passed vaMFAddContext call, real processing will be started during vaMFSubmit
Sourcepub unsafe fn vaMFSubmit(
&self,
dpy: VADisplay,
mf_context: VAMFContextID,
contexts: *mut VAContextID,
num_contexts: c_int,
) -> VAStatus
pub unsafe fn vaMFSubmit( &self, dpy: VADisplay, mf_context: VAMFContextID, contexts: *mut VAContextID, num_contexts: c_int, ) -> VAStatus
Make the end of rendering for a pictures in contexts passed with submission. The server should start processing all pending operations for contexts. All contexts passed should be associated through vaMFAddContext and call sequence Begin/Render/End performed. This call is non-blocking. The client can start another Begin/Render/End/vaMFSubmit sequence on a different render targets. Return values: VA_STATUS_SUCCESS - operation successful, context was removed. VA_STATUS_ERROR_INVALID_CONTEXT - mf_context or one of contexts are invalid due to mf_context not created or one of contexts not assotiated with mf_context through vaAddContext. VA_STATUS_ERROR_INVALID_PARAMETER - one of context has not submitted it’s frame through vaBeginPicture vaRenderPicture vaEndPicture call sequence. dpy: display mf_context: Multi-Frame context contexts: list of contexts submitting their tasks for multi-frame operation. num_contexts: number of passed contexts.
Sourcepub unsafe fn vaSyncSurface(
&self,
dpy: VADisplay,
render_target: VASurfaceID,
) -> VAStatus
pub unsafe fn vaSyncSurface( &self, dpy: VADisplay, render_target: VASurfaceID, ) -> VAStatus
This function blocks until all pending operations on the render target have been completed. Upon return it is safe to use the render target for a different picture.
Sourcepub unsafe fn vaSyncSurface2(
&self,
dpy: VADisplay,
surface: VASurfaceID,
timeout_ns: u64,
) -> VAStatus
pub unsafe fn vaSyncSurface2( &self, dpy: VADisplay, surface: VASurfaceID, timeout_ns: u64, ) -> VAStatus
\brief Synchronizes pending operations associated with the supplied surface.
This function blocks during specified timeout (in nanoseconds) until all pending operations on the render target have been completed. If timeout is zero, the function returns immediately.
Possible errors:
- \ref VA_STATUS_ERROR_UNIMPLEMENTED: the VA driver implementation does not support this interface
- \ref VA_STATUS_ERROR_INVALID_DISPLAY: an invalid display was supplied
- \ref VA_STATUS_ERROR_INVALID_SURFACE: an invalid surface was supplied
- \ref VA_STATUS_ERROR_TIMEDOUT: synchronization is still in progress, client should call the function again to complete synchronization
@param[in] dpy the VA display @param[in] surface the surface for which synchronization is performed @param[in] timeout_ns the timeout in nanoseconds
Sourcepub unsafe fn vaQuerySurfaceStatus(
&self,
dpy: VADisplay,
render_target: VASurfaceID,
status: *mut Type,
) -> VAStatus
pub unsafe fn vaQuerySurfaceStatus( &self, dpy: VADisplay, render_target: VASurfaceID, status: *mut Type, ) -> VAStatus
Find out any pending ops on the render target
Sourcepub unsafe fn vaQuerySurfaceError(
&self,
dpy: VADisplay,
surface: VASurfaceID,
error_status: VAStatus,
error_info: *mut *mut c_void,
) -> VAStatus
pub unsafe fn vaQuerySurfaceError( &self, dpy: VADisplay, surface: VASurfaceID, error_status: VAStatus, error_info: *mut *mut c_void, ) -> VAStatus
After the application gets VA_STATUS_ERROR_DECODING_ERROR after calling vaSyncSurface(), it can call vaQuerySurfaceError to find out further details on the particular error. VA_STATUS_ERROR_DECODING_ERROR should be passed in as “error_status”.
After the applications get VA_STATUS_HW_BUSY or VA_STATUS_SUCCESSFULL from vaSyncSurface(), it still can call vaQuerySurfaceError to find out further details to know if has real hw reset happened on this surface since umd and kmd could recover the context from reset with success in sometimes. VA_STATUS_HW_BUSY or VA_STATUS_SUCCESSFULL also could be passed in as “error_status”.
Upon the return, error_info will point to an array of _VASurfaceDecodeMBErrors structure, which is allocated and filled by libVA with detailed information on the VADecodeErrorType. The array is terminated if “status==-1” is detected.
Sourcepub unsafe fn vaSyncBuffer(
&self,
dpy: VADisplay,
buf_id: VABufferID,
timeout_ns: u64,
) -> VAStatus
pub unsafe fn vaSyncBuffer( &self, dpy: VADisplay, buf_id: VABufferID, timeout_ns: u64, ) -> VAStatus
\brief Synchronizes pending operations associated with the supplied buffer.
This function blocks during specified timeout (in nanoseconds) until all pending operations on the supplied buffer have been completed. If timeout is zero, the function returns immediately.
Possible errors:
- \ref VA_STATUS_ERROR_UNIMPLEMENTED: the VA driver implementation does not support this interface
- \ref VA_STATUS_ERROR_INVALID_DISPLAY: an invalid display was supplied
- \ref VA_STATUS_ERROR_INVALID_BUFFER: an invalid buffer was supplied
- \ref VA_STATUS_ERROR_TIMEDOUT: synchronization is still in progress, client should call the function again to complete synchronization
@param[in] dpy the VA display @param[in] buf_id the buffer for which synchronization is performed @param[in] timeout_ns the timeout in nanoseconds
Sourcepub unsafe fn vaMaxNumImageFormats(&self, dpy: VADisplay) -> c_int
pub unsafe fn vaMaxNumImageFormats(&self, dpy: VADisplay) -> c_int
Get maximum number of image formats supported by the implementation
Sourcepub unsafe fn vaQueryImageFormats(
&self,
dpy: VADisplay,
format_list: *mut VAImageFormat,
num_formats: *mut c_int,
) -> VAStatus
pub unsafe fn vaQueryImageFormats( &self, dpy: VADisplay, format_list: *mut VAImageFormat, num_formats: *mut c_int, ) -> VAStatus
Query supported image formats The caller must provide a “format_list” array that can hold at least vaMaxNumImageFormats() entries. The actual number of formats returned in “format_list” is returned in “num_formats”.
Sourcepub unsafe fn vaCreateImage(
&self,
dpy: VADisplay,
format: *mut VAImageFormat,
width: c_int,
height: c_int,
image: *mut VAImage,
) -> VAStatus
pub unsafe fn vaCreateImage( &self, dpy: VADisplay, format: *mut VAImageFormat, width: c_int, height: c_int, image: *mut VAImage, ) -> VAStatus
Create a VAImage structure The width and height fields returned in the VAImage structure may get enlarged for some YUV formats. Upon return from this function, image->buf has been created and proper storage allocated by the library. The client can access the image through the Map/Unmap calls.
Sourcepub unsafe fn vaDestroyImage(
&self,
dpy: VADisplay,
image: VAImageID,
) -> VAStatus
pub unsafe fn vaDestroyImage( &self, dpy: VADisplay, image: VAImageID, ) -> VAStatus
Should call DestroyImage before destroying the surface it is bound to
pub unsafe fn vaSetImagePalette( &self, dpy: VADisplay, image: VAImageID, palette: *mut c_uchar, ) -> VAStatus
Sourcepub unsafe fn vaGetImage(
&self,
dpy: VADisplay,
surface: VASurfaceID,
x: c_int,
y: c_int,
width: c_uint,
height: c_uint,
image: VAImageID,
) -> VAStatus
pub unsafe fn vaGetImage( &self, dpy: VADisplay, surface: VASurfaceID, x: c_int, y: c_int, width: c_uint, height: c_uint, image: VAImageID, ) -> VAStatus
Retrive surface data into a VAImage Image must be in a format supported by the implementation
Sourcepub unsafe fn vaPutImage(
&self,
dpy: VADisplay,
surface: VASurfaceID,
image: VAImageID,
src_x: c_int,
src_y: c_int,
src_width: c_uint,
src_height: c_uint,
dest_x: c_int,
dest_y: c_int,
dest_width: c_uint,
dest_height: c_uint,
) -> VAStatus
pub unsafe fn vaPutImage( &self, dpy: VADisplay, surface: VASurfaceID, image: VAImageID, src_x: c_int, src_y: c_int, src_width: c_uint, src_height: c_uint, dest_x: c_int, dest_y: c_int, dest_width: c_uint, dest_height: c_uint, ) -> VAStatus
Copy data from a VAImage to a surface Image must be in a format supported by the implementation Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface shouldn’t be rendered into when this is called
Sourcepub unsafe fn vaDeriveImage(
&self,
dpy: VADisplay,
surface: VASurfaceID,
image: *mut VAImage,
) -> VAStatus
pub unsafe fn vaDeriveImage( &self, dpy: VADisplay, surface: VASurfaceID, image: *mut VAImage, ) -> VAStatus
Derive an VAImage from an existing surface. This interface will derive a VAImage and corresponding image buffer from an existing VA Surface. The image buffer can then be mapped/unmapped for direct CPU access. This operation is only possible on implementations with direct rendering capabilities and internal surface formats that can be represented with a VAImage. When the operation is not possible this interface will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall back to using vaCreateImage + vaPutImage to accomplish the same task in an indirect manner.
Implementations should only return success when the resulting image buffer would be useable with vaMap/Unmap.
When directly accessing a surface special care must be taken to insure proper synchronization with the graphics hardware. Clients should call vaQuerySurfaceStatus to insure that a surface is not the target of concurrent rendering or currently being displayed by an overlay.
Additionally nothing about the contents of a surface should be assumed following a vaPutSurface. Implementations are free to modify the surface for scaling or subpicture blending within a call to vaPutImage.
Calls to vaPutImage or vaGetImage using the same surface from which the image has been derived will return VA_STATUS_ERROR_SURFACE_BUSY. vaPutImage or vaGetImage with other surfaces is supported.
An image created with vaDeriveImage should be freed with vaDestroyImage. The image and image buffer structures will be destroyed; however, the underlying surface will remain unchanged until freed with vaDestroySurfaces.
Sourcepub unsafe fn vaMaxNumSubpictureFormats(&self, dpy: VADisplay) -> c_int
pub unsafe fn vaMaxNumSubpictureFormats(&self, dpy: VADisplay) -> c_int
Get maximum number of subpicture formats supported by the implementation
Sourcepub unsafe fn vaQuerySubpictureFormats(
&self,
dpy: VADisplay,
format_list: *mut VAImageFormat,
flags: *mut c_uint,
num_formats: *mut c_uint,
) -> VAStatus
pub unsafe fn vaQuerySubpictureFormats( &self, dpy: VADisplay, format_list: *mut VAImageFormat, flags: *mut c_uint, num_formats: *mut c_uint, ) -> VAStatus
Query supported subpicture formats The caller must provide a “format_list” array that can hold at least vaMaxNumSubpictureFormats() entries. The flags arrary holds the flag for each format to indicate additional capabilities for that format. The actual number of formats returned in “format_list” is returned in “num_formats”. flags: returned value to indicate addtional capabilities VA_SUBPICTURE_CHROMA_KEYING - supports chroma-keying VA_SUBPICTURE_GLOBAL_ALPHA - supports global alpha VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD - supports unscaled screen relative subpictures for On Screen Display
Sourcepub unsafe fn vaCreateSubpicture(
&self,
dpy: VADisplay,
image: VAImageID,
subpicture: *mut VASubpictureID,
) -> VAStatus
pub unsafe fn vaCreateSubpicture( &self, dpy: VADisplay, image: VAImageID, subpicture: *mut VASubpictureID, ) -> VAStatus
Subpictures are created with an image associated.
Sourcepub unsafe fn vaDestroySubpicture(
&self,
dpy: VADisplay,
subpicture: VASubpictureID,
) -> VAStatus
pub unsafe fn vaDestroySubpicture( &self, dpy: VADisplay, subpicture: VASubpictureID, ) -> VAStatus
Destroy the subpicture before destroying the image it is assocated to
Sourcepub unsafe fn vaSetSubpictureImage(
&self,
dpy: VADisplay,
subpicture: VASubpictureID,
image: VAImageID,
) -> VAStatus
pub unsafe fn vaSetSubpictureImage( &self, dpy: VADisplay, subpicture: VASubpictureID, image: VAImageID, ) -> VAStatus
Bind an image to the subpicture. This image will now be associated with the subpicture instead of the one at creation.
Sourcepub unsafe fn vaSetSubpictureChromakey(
&self,
dpy: VADisplay,
subpicture: VASubpictureID,
chromakey_min: c_uint,
chromakey_max: c_uint,
chromakey_mask: c_uint,
) -> VAStatus
pub unsafe fn vaSetSubpictureChromakey( &self, dpy: VADisplay, subpicture: VASubpictureID, chromakey_min: c_uint, chromakey_max: c_uint, chromakey_mask: c_uint, ) -> VAStatus
If chromakey is enabled, then the area where the source value falls within the chromakey [min, max] range is transparent The chromakey component format is the following: For RGB: [0:7] Red [8:15] Blue [16:23] Green For YUV: [0:7] V [8:15] U [16:23] Y The chromakey mask can be used to mask out certain components for chromakey comparision
Sourcepub unsafe fn vaSetSubpictureGlobalAlpha(
&self,
dpy: VADisplay,
subpicture: VASubpictureID,
global_alpha: f32,
) -> VAStatus
pub unsafe fn vaSetSubpictureGlobalAlpha( &self, dpy: VADisplay, subpicture: VASubpictureID, global_alpha: f32, ) -> VAStatus
Global alpha value is between 0 and 1. A value of 1 means fully opaque and a value of 0 means fully transparent. If per-pixel alpha is also specified then the overall alpha is per-pixel alpha multiplied by the global alpha
Sourcepub unsafe fn vaAssociateSubpicture(
&self,
dpy: VADisplay,
subpicture: VASubpictureID,
target_surfaces: *mut VASurfaceID,
num_surfaces: c_int,
src_x: i16,
src_y: i16,
src_width: u16,
src_height: u16,
dest_x: i16,
dest_y: i16,
dest_width: u16,
dest_height: u16,
flags: u32,
) -> VAStatus
pub unsafe fn vaAssociateSubpicture( &self, dpy: VADisplay, subpicture: VASubpictureID, target_surfaces: *mut VASurfaceID, num_surfaces: c_int, src_x: i16, src_y: i16, src_width: u16, src_height: u16, dest_x: i16, dest_y: i16, dest_width: u16, dest_height: u16, flags: u32, ) -> VAStatus
vaAssociateSubpicture associates the subpicture with target_surfaces. It defines the region mapping between the subpicture and the target surfaces through source and destination rectangles (with the same width and height). Both will be displayed at the next call to vaPutSurface. Additional associations before the call to vaPutSurface simply overrides the association.
Sourcepub unsafe fn vaDeassociateSubpicture(
&self,
dpy: VADisplay,
subpicture: VASubpictureID,
target_surfaces: *mut VASurfaceID,
num_surfaces: c_int,
) -> VAStatus
pub unsafe fn vaDeassociateSubpicture( &self, dpy: VADisplay, subpicture: VASubpictureID, target_surfaces: *mut VASurfaceID, num_surfaces: c_int, ) -> VAStatus
vaDeassociateSubpicture removes the association of the subpicture with target_surfaces.
Sourcepub unsafe fn vaMaxNumDisplayAttributes(&self, dpy: VADisplay) -> c_int
pub unsafe fn vaMaxNumDisplayAttributes(&self, dpy: VADisplay) -> c_int
Get maximum number of display attributs supported by the implementation
Sourcepub unsafe fn vaQueryDisplayAttributes(
&self,
dpy: VADisplay,
attr_list: *mut VADisplayAttribute,
num_attributes: *mut c_int,
) -> VAStatus
pub unsafe fn vaQueryDisplayAttributes( &self, dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: *mut c_int, ) -> VAStatus
Query display attributes The caller must provide a “attr_list” array that can hold at least vaMaxNumDisplayAttributes() entries. The actual number of attributes returned in “attr_list” is returned in “num_attributes”.
Sourcepub unsafe fn vaGetDisplayAttributes(
&self,
dpy: VADisplay,
attr_list: *mut VADisplayAttribute,
num_attributes: c_int,
) -> VAStatus
pub unsafe fn vaGetDisplayAttributes( &self, dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: c_int, ) -> VAStatus
Get display attributes This function returns the current attribute values in “attr_list”. Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the “flags” field from vaQueryDisplayAttributes() can have their values retrieved.
Sourcepub unsafe fn vaSetDisplayAttributes(
&self,
dpy: VADisplay,
attr_list: *mut VADisplayAttribute,
num_attributes: c_int,
) -> VAStatus
pub unsafe fn vaSetDisplayAttributes( &self, dpy: VADisplay, attr_list: *mut VADisplayAttribute, num_attributes: c_int, ) -> VAStatus
Set display attributes Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the “flags” field from vaQueryDisplayAttributes() can be set. If the attribute is not settable or the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED
Sourcepub unsafe fn vaCopy(
&self,
dpy: VADisplay,
dst: *mut VACopyObject,
src: *mut VACopyObject,
option: VACopyOption,
) -> VAStatus
pub unsafe fn vaCopy( &self, dpy: VADisplay, dst: *mut VACopyObject, src: *mut VACopyObject, option: VACopyOption, ) -> VAStatus
\brief Copies an object.
Copies specified object (surface or buffer). If non-blocking copy is requested (VA_COPY_NONBLOCK), then need vaSyncBuffer or vaSyncSurface/vaSyncSurface2 to sync the destination object.
@param[in] dpy the VA display @param[in] dst Destination object to copy to @param[in] src Source object to copy from @param[in] option VA copy option @return VA_STATUS_SUCCESS if successful
Sourcepub unsafe fn vaQueryVideoProcFilters(
&self,
dpy: VADisplay,
context: VAContextID,
filters: *mut VAProcFilterType,
num_filters: *mut c_uint,
) -> VAStatus
pub unsafe fn vaQueryVideoProcFilters( &self, dpy: VADisplay, context: VAContextID, filters: *mut VAProcFilterType, num_filters: *mut c_uint, ) -> VAStatus
\brief Queries video processing filters.
This function returns the list of video processing filters supported by the driver. The \c filters array is allocated by the user and \c num_filters shall be initialized to the number of allocated elements in that array. Upon successful return, the actual number of filters will be overwritten into \c num_filters. Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \c num_filters is adjusted to the number of elements that would be returned if enough space was available.
The list of video processing filters supported by the driver shall be ordered in the way they can be iteratively applied. This is needed for both correctness, i.e. some filters would not mean anything if applied at the beginning of the pipeline; but also for performance since some filters can be applied in a single pass (e.g. noise reduction + deinterlacing).
@param[in] dpy the VA display @param[in] context the video processing context @param[out] filters the output array of #VAProcFilterType elements @param[in,out] num_filters the number of elements allocated on input, the number of elements actually filled in on output
Sourcepub unsafe fn vaQueryVideoProcFilterCaps(
&self,
dpy: VADisplay,
context: VAContextID,
type_: VAProcFilterType,
filter_caps: *mut c_void,
num_filter_caps: *mut c_uint,
) -> VAStatus
pub unsafe fn vaQueryVideoProcFilterCaps( &self, dpy: VADisplay, context: VAContextID, type_: VAProcFilterType, filter_caps: *mut c_void, num_filter_caps: *mut c_uint, ) -> VAStatus
\brief Queries video filter capabilities.
This function returns the list of capabilities supported by the driver for a specific video filter. The \c filter_caps array is allocated by the user and \c num_filter_caps shall be initialized to the number of allocated elements in that array. Upon successful return, the actual number of filters will be overwritten into \c num_filter_caps. Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \c num_filter_caps is adjusted to the number of elements that would be returned if enough space was available.
@param[in] dpy the VA display @param[in] context the video processing context @param[in] type the video filter type @param[out] filter_caps the output array of #VAProcFilterCap elements @param[in,out] num_filter_caps the number of elements allocated on input, the number of elements actually filled in output
Sourcepub unsafe fn vaQueryVideoProcPipelineCaps(
&self,
dpy: VADisplay,
context: VAContextID,
filters: *mut VABufferID,
num_filters: c_uint,
pipeline_caps: *mut VAProcPipelineCaps,
) -> VAStatus
pub unsafe fn vaQueryVideoProcPipelineCaps( &self, dpy: VADisplay, context: VAContextID, filters: *mut VABufferID, num_filters: c_uint, pipeline_caps: *mut VAProcPipelineCaps, ) -> VAStatus
\brief Queries video processing pipeline capabilities.
This function returns the video processing pipeline capabilities. The \c filters array defines the video processing pipeline and is an array of buffers holding filter parameters.
Note: the #VAProcPipelineCaps structure contains user-provided arrays. If non-NULL, the corresponding \c num_* fields shall be filled in on input with the number of elements allocated. Upon successful return, the actual number of elements will be overwritten into the \c num_* fields. Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \c num_* fields are adjusted to the number of elements that would be returned if enough space was available.
@param[in] dpy the VA display @param[in] context the video processing context @param[in] filters the array of VA buffers defining the video processing pipeline @param[in] num_filters the number of elements in filters @param[in,out] pipeline_caps the video processing pipeline capabilities
Sourcepub unsafe fn vaCreateProtectedSession(
&self,
dpy: VADisplay,
config_id: VAConfigID,
protected_session: *mut VAProtectedSessionID,
) -> VAStatus
pub unsafe fn vaCreateProtectedSession( &self, dpy: VADisplay, config_id: VAConfigID, protected_session: *mut VAProtectedSessionID, ) -> VAStatus
\brief Create a protected session
Create a protected session
@param[in] dpy the VA display @param[in] config_id configuration for the protected session @param[out] protected_session created protected session id upon return
Sourcepub unsafe fn vaDestroyProtectedSession(
&self,
dpy: VADisplay,
protected_session: VAProtectedSessionID,
) -> VAStatus
pub unsafe fn vaDestroyProtectedSession( &self, dpy: VADisplay, protected_session: VAProtectedSessionID, ) -> VAStatus
\brief Destroy a protected session
Destroy a protected session
@param[in] dpy the VA display @param[in] protected_session protected session to be destroyed
Sourcepub unsafe fn vaAttachProtectedSession(
&self,
dpy: VADisplay,
id: VAGenericID,
protected_session: VAProtectedSessionID,
) -> VAStatus
pub unsafe fn vaAttachProtectedSession( &self, dpy: VADisplay, id: VAGenericID, protected_session: VAProtectedSessionID, ) -> VAStatus
\brief Attach a protected content session to VA context
Attach a protected content session to the context to enable decryption/protection
@param[in] dpy the VA display @param[in] id the VA decode/encode/vp context @param[in] protected_session the protected session to attach
Sourcepub unsafe fn vaDetachProtectedSession(
&self,
dpy: VADisplay,
id: VAGenericID,
) -> VAStatus
pub unsafe fn vaDetachProtectedSession( &self, dpy: VADisplay, id: VAGenericID, ) -> VAStatus
\brief Detach the protected content session from the VA context
Detach protected content session of the context to disable decryption/protection
@param[in] dpy the VA display @param[in] id TEE client id to be detached
Sourcepub unsafe fn vaProtectedSessionExecute(
&self,
dpy: VADisplay,
protected_session: VAProtectedSessionID,
buf_id: VABufferID,
) -> VAStatus
pub unsafe fn vaProtectedSessionExecute( &self, dpy: VADisplay, protected_session: VAProtectedSessionID, buf_id: VABufferID, ) -> VAStatus
\brief Execute provides a general mechanism for TEE client tasks execution.
vaProtectedSessionExecute provides a mechanism for TEE clients to execute specific tasks. The implementation may differ between IHVs. This is a synchronous API.
@param[in] dpy the VA display @param[in] protected_session the protected session @param[in,out] buf_id the VA buffer
Sourcepub unsafe fn vaGetDisplayDRM(&self, fd: c_int) -> VADisplay
pub unsafe fn vaGetDisplayDRM(&self, fd: c_int) -> VADisplay
\brief Returns a VA display derived from the specified DRM connection.
This function returns a (possibly cached) VA display from the specified DRM connection @fd.
@param[in] fd the DRM connection descriptor @return the VA display