pub unsafe extern "C" fn vaAcquireBufferHandle(
dpy: VADisplay,
buf_id: VABufferID,
buf_info: *mut VABufferInfo,
) -> VAStatusExpand description
\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