Skip to main content

vulkan_frames_add_usage

Function vulkan_frames_add_usage 

Source
pub fn vulkan_frames_add_usage(
    frames: &mut AVHWFramesContext,
    usage: u32,
) -> Result<(), BridgeError>
Expand description

Adds usage to a Vulkan frames context before it allocates its pool.

Left at zero, hwcontext_vulkan picks a default that requires STORAGE support. A nonzero usage is used exactly as given, so every flag must be supported by the format; encoder-input pools ask for VULKAN_ENCODE_INPUT_USAGE. Call between av_hwframe_ctx_alloc and av_hwframe_ctx_init.

ยงErrors

Returns an error when the context is not a Vulkan one.