C Specification

Encoded parameter data can be retrieved from a video session parameters object created with a video encode operation using the command:

// Provided by VK_KHR_video_encode_queue
VkResult vkGetEncodedVideoSessionParametersKHR(
    VkDevice                                    device,
    const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo,
    VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo,
    size_t*                                     pDataSize,
    void*                                       pData);

Parameters

  • device is the logical device that owns the video session parameters object.

  • pVideoSessionParametersInfo is a pointer to a VkVideoEncodeSessionParametersGetInfoKHR structure specifying the parameters of the encoded parameter data to retrieve.

  • pFeedbackInfo is either NULL or a pointer to a VkVideoEncodeSessionParametersFeedbackInfoKHR structure in which feedback about the requested parameter data is returned.

  • pDataSize is a pointer to a size_t value related to the amount of encode parameter data returned, as described below.

  • pData is either NULL or a pointer to a buffer to write the encoded parameter data to.

Description

If pData is NULL, then the size of the encoded parameter data, in bytes, that can be retrieved is returned in pDataSize. Otherwise, pDataSize must point to a variable set by the application to the size of the buffer, in bytes, pointed to by pData, and on return the variable is overwritten with the number of bytes actually written to pData. If pDataSize is less than the size of the encoded parameter data that can be retrieved, then no data will be written to pData, zero will be written to pDataSize, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that no encoded parameter data was returned.

If pFeedbackInfo is not NULL then the members of the VkVideoEncodeSessionParametersFeedbackInfoKHR structure and any additional structures included in its pNext chain that are applicable to the video session parameters object specified in pVideoSessionParametersInfo::videoSessionParameters will be filled with feedback about the requested parameter data on all successful calls to this command.

Note:

This includes the cases when pData is NULL or when VK_INCOMPLETE is returned by the command, and enables the application to determine whether the implementation overrode any of the requested video session parameters without actually needing to retrieve the encoded parameter data itself.

Valid Usage (Implicit)
  • VUID-vkGetEncodedVideoSessionParametersKHR-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetEncodedVideoSessionParametersKHR-pVideoSessionParametersInfo-parameter
    pVideoSessionParametersInfo must be a valid pointer to a valid VkVideoEncodeSessionParametersGetInfoKHR structure

  • VUID-vkGetEncodedVideoSessionParametersKHR-pFeedbackInfo-parameter
    If pFeedbackInfo is not NULL, pFeedbackInfo must be a valid pointer to a VkVideoEncodeSessionParametersFeedbackInfoKHR structure

  • VUID-vkGetEncodedVideoSessionParametersKHR-pDataSize-parameter
    pDataSize must be a valid pointer to a size_t value

  • VUID-vkGetEncodedVideoSessionParametersKHR-pData-parameter
    If the value referenced by pDataSize is not 0, and pData is not NULL, pData must be a valid pointer to an array of pDataSize bytes

Return Codes
On success, this command returns
  • VK_SUCCESS

  • VK_INCOMPLETE

On failure, this command returns
  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0