vkCreateVideoSessionKHR(3)

# vkCreateVideoSessionKHR(3) Manual Page

## Name

vkCreateVideoSessionKHR - Creates a video session object

Loading… please wait.

## C Specification

To create a video session object, call:

    // Provided by VK_KHR_video_queue
    VkResult vkCreateVideoSessionKHR(
        VkDevice                                    device,
        const VkVideoSessionCreateInfoKHR*          pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkVideoSessionKHR*                          pVideoSession);

## Parameters

- `device` is the logical device that creates the decode or encode session object.

- `pCreateInfo` is the pointer to VkVideoSessionCreateInfoKHR structure containing parameters specifying the creation of the decode or encode session.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pVideoSession` is the pointer for the decode or encode video session object which will be created by this function when it returns `VK_SUCCESS`

## Description

Valid Usage (Implicit)

- VUID-vkCreateVideoSessionKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateVideoSessionKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkVideoSessionCreateInfoKHR structure

- VUID-vkCreateVideoSessionKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateVideoSessionKHR-pVideoSession-parameter
  `pVideoSession` must be a valid pointer to a VkVideoSessionKHR handle

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_OUT_OF_DEVICE_MEMORY`

  - `VK_ERROR_INITIALIZATION_FAILED`

  - `VK_ERROR_INCOMPATIBLE_DRIVER`

  - `VK_ERROR_FEATURE_NOT_PRESENT`

## See Also

VkAllocationCallbacks, VkDevice, VkVideoSessionCreateInfoKHR, VkVideoSessionKHR

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0