diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c index cb48a0798d..d428114d0a 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c @@ -540,7 +540,7 @@ gst_vulkan_video_profile_from_h264_sps (GstVulkanVideoProfile * profile, .lumaBitDepth = _get_component_bit_depth (sps->bit_depth_luma_minus8 + 8), .chromaBitDepth = _get_component_bit_depth (sps->bit_depth_chroma_minus8 + 8), }, - .usage = { + .usage.decode = { .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR, .videoUsageHints = VK_VIDEO_DECODE_USAGE_DEFAULT_KHR, .pNext = &profile->codec, diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdecoder.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdecoder.c index 2c0736ee2c..704b78406b 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdecoder.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdecoder.c @@ -183,8 +183,8 @@ gst_vulkan_decoder_start (GstVulkanDecoder * self, } self->profile = *profile; - self->profile.profile.pNext = &self->profile.usage; - self->profile.usage.pNext = &self->profile.codec; + self->profile.profile.pNext = &self->profile.usage.decode; + self->profile.usage.decode.pNext = &self->profile.codec; switch (self->codec) { case VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR: diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideoutils.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideoutils.c index b00405d934..c3911b17bf 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideoutils.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideoutils.c @@ -224,8 +224,8 @@ gst_vulkan_video_profile_from_caps (GstVulkanVideoProfile * profile, structure = gst_caps_get_structure (caps, 0); - profile->usage.sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR; - profile->usage.videoUsageHints = VK_VIDEO_DECODE_USAGE_DEFAULT_KHR; + profile->usage.decode.sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR; + profile->usage.decode.videoUsageHints = VK_VIDEO_DECODE_USAGE_DEFAULT_KHR; profile->profile.sType = VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR; profile->profile.pNext = &profile->usage; @@ -245,7 +245,7 @@ gst_vulkan_video_profile_from_caps (GstVulkanVideoProfile * profile, STD_VIDEO_H264_PROFILE_IDC_INVALID; profile->codec.h264dec.pictureLayout = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_FLAG_BITS_MAX_ENUM_KHR; - profile->usage.pNext = &profile->codec; + profile->usage.decode.pNext = &profile->codec; profile_str = gst_structure_get_string (structure, "profile"); for (j = 0; profile_str && j < G_N_ELEMENTS (h264_profile_map); j++) { @@ -270,7 +270,7 @@ gst_vulkan_video_profile_from_caps (GstVulkanVideoProfile * profile, profile->codec.h265dec.sType = video_codecs_map[i].stype; profile->codec.h265dec.stdProfileIdc = STD_VIDEO_H265_PROFILE_IDC_INVALID; - profile->usage.pNext = &profile->codec; + profile->usage.decode.pNext = &profile->codec; profile_str = gst_structure_get_string (structure, "profile"); for (j = 0; profile_str && j < G_N_ELEMENTS (h265_profile_map); j++) { @@ -283,7 +283,7 @@ gst_vulkan_video_profile_from_caps (GstVulkanVideoProfile * profile, break; } default: - profile->usage.pNext = NULL; + profile->usage.decode.pNext = NULL; break; } diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideoutils.h b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideoutils.h index 1e8c0d7a0d..4d8399dd0f 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideoutils.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideoutils.h @@ -37,7 +37,10 @@ struct _GstVulkanVideoProfile /*< private >*/ #if GST_VULKAN_HAVE_VIDEO_EXTENSIONS VkVideoProfileInfoKHR profile; - VkVideoDecodeUsageInfoKHR usage; + union { + VkVideoDecodeUsageInfoKHR decode; + } usage; + union { VkBaseInStructure base; VkVideoDecodeH264ProfileInfoKHR h264dec; diff --git a/subprojects/gst-plugins-bad/tests/check/libs/vkvideodecode.c b/subprojects/gst-plugins-bad/tests/check/libs/vkvideodecode.c index 8facba6f20..c8939a598b 100644 --- a/subprojects/gst-plugins-bad/tests/check/libs/vkvideodecode.c +++ b/subprojects/gst-plugins-bad/tests/check/libs/vkvideodecode.c @@ -226,7 +226,7 @@ GST_START_TEST (test_decoder) .chromaBitDepth = VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, .lumaBitDepth = VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, }, - .usage = { + .usage.decode = { .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR, .videoUsageHints = VK_VIDEO_DECODE_USAGE_DEFAULT_KHR, .pNext = &profile.codec,