mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
vulkan video: add GST_VK_VIDEO_EXTENSIONS enum
To avoid using mysterious value, use an enum to show the valid value in _vk_codec_extensions Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5922>
This commit is contained in:
parent
30d34a99f1
commit
dd6fca1d02
3 changed files with 9 additions and 4 deletions
|
@ -193,7 +193,7 @@ gst_vulkan_decoder_start (GstVulkanDecoder * self,
|
|||
.sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR,
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
codec_idx = 0;
|
||||
codec_idx = GST_VK_VIDEO_EXTENSION_DECODE_H264;
|
||||
break;
|
||||
case VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR:
|
||||
/* *INDENT-OFF* */
|
||||
|
@ -201,7 +201,7 @@ gst_vulkan_decoder_start (GstVulkanDecoder * self,
|
|||
.sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR,
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
codec_idx = 1;
|
||||
codec_idx = GST_VK_VIDEO_EXTENSION_DECODE_H265;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
|
||||
/* *INDENT-OFF* */
|
||||
const VkExtensionProperties _vk_codec_extensions[] = {
|
||||
{
|
||||
[GST_VK_VIDEO_EXTENSION_DECODE_H264] {
|
||||
.extensionName = VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME,
|
||||
.specVersion = VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION,
|
||||
},
|
||||
{
|
||||
[GST_VK_VIDEO_EXTENSION_DECODE_H265] {
|
||||
.extensionName = VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME,
|
||||
.specVersion = VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION,
|
||||
},
|
||||
|
|
|
@ -40,6 +40,11 @@ struct _GstVulkanVideoSession
|
|||
GstBuffer *buffer;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
GST_VK_VIDEO_EXTENSION_DECODE_H264,
|
||||
GST_VK_VIDEO_EXTENSION_DECODE_H265,
|
||||
} GST_VK_VIDEO_EXTENSIONS;
|
||||
|
||||
#define GST_VULKAN_VIDEO_FN_LIST(V) \
|
||||
V(GetPhysicalDeviceVideoFormatProperties) \
|
||||
V(GetPhysicalDeviceVideoCapabilities) \
|
||||
|
|
Loading…
Reference in a new issue