2023-04-03 18:56:40 +00:00
|
|
|
/*
|
|
|
|
* GStreamer
|
|
|
|
* Copyright (C) 2023 Igalia, S.L.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2023-05-24 08:03:30 +00:00
|
|
|
#include <gst/vulkan/gstvkapi.h>
|
2023-04-03 18:56:40 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVulkanVideoProfile:
|
|
|
|
* @profile: the generic vulkan video profile
|
|
|
|
* @codec: the specific codec profile
|
|
|
|
*
|
|
|
|
* Since: 1.24
|
|
|
|
*/
|
2023-05-25 17:03:29 +00:00
|
|
|
struct _GstVulkanVideoProfile
|
|
|
|
{
|
2023-11-13 18:50:07 +00:00
|
|
|
/*< private >*/
|
2023-04-03 18:56:40 +00:00
|
|
|
#if GST_VULKAN_HAVE_VIDEO_EXTENSIONS
|
|
|
|
VkVideoProfileInfoKHR profile;
|
2023-10-30 15:40:47 +00:00
|
|
|
union {
|
|
|
|
VkVideoDecodeUsageInfoKHR decode;
|
2024-07-25 15:06:39 +00:00
|
|
|
/**
|
|
|
|
* GstVulkanVideoProfile.usage.encode:
|
|
|
|
*
|
|
|
|
* Since: 1.26
|
|
|
|
**/
|
2024-02-01 19:43:04 +00:00
|
|
|
VkVideoEncodeUsageInfoKHR encode;
|
2023-10-30 15:40:47 +00:00
|
|
|
} usage;
|
|
|
|
|
2023-04-03 18:56:40 +00:00
|
|
|
union {
|
2023-05-24 08:03:30 +00:00
|
|
|
VkBaseInStructure base;
|
2023-06-29 16:46:29 +00:00
|
|
|
VkVideoDecodeH264ProfileInfoKHR h264dec;
|
|
|
|
VkVideoDecodeH265ProfileInfoKHR h265dec;
|
2024-07-25 15:06:39 +00:00
|
|
|
/**
|
|
|
|
* GstVulkanVideoProfile.usage.codec.h264enc:
|
|
|
|
*
|
|
|
|
* Since: 1.26
|
|
|
|
**/
|
2023-07-10 12:44:05 +00:00
|
|
|
VkVideoEncodeH264ProfileInfoKHR h264enc;
|
2024-07-25 15:06:39 +00:00
|
|
|
/**
|
|
|
|
* GstVulkanVideoProfile.usage.codec.h265enc:
|
|
|
|
*
|
|
|
|
* Since: 1.26
|
|
|
|
**/
|
2024-04-22 07:48:14 +00:00
|
|
|
VkVideoEncodeH265ProfileInfoKHR h265enc;
|
2023-04-03 18:56:40 +00:00
|
|
|
} codec;
|
|
|
|
#endif
|
|
|
|
gpointer _reserved[GST_PADDING];
|
|
|
|
};
|
|
|
|
|
2023-06-23 15:50:16 +00:00
|
|
|
/**
|
|
|
|
* GstVulkanVideoCapabilities:
|
|
|
|
*
|
|
|
|
* Since: 1.24
|
|
|
|
*/
|
|
|
|
struct _GstVulkanVideoCapabilities
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
#if GST_VULKAN_HAVE_VIDEO_EXTENSIONS
|
|
|
|
VkVideoCapabilitiesKHR caps;
|
|
|
|
union
|
|
|
|
{
|
2024-08-19 15:52:10 +00:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
VkVideoDecodeCapabilitiesKHR caps;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
VkVideoDecodeH264CapabilitiesKHR h264;
|
|
|
|
VkVideoDecodeH265CapabilitiesKHR h265;
|
|
|
|
} codec;
|
|
|
|
} decoder;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
VkVideoEncodeCapabilitiesKHR caps;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
VkVideoEncodeH264CapabilitiesKHR h264;
|
|
|
|
VkVideoEncodeH265CapabilitiesKHR h265;
|
|
|
|
} codec;
|
|
|
|
} encoder;
|
|
|
|
};
|
2023-06-23 15:50:16 +00:00
|
|
|
#endif
|
2024-08-19 15:52:10 +00:00
|
|
|
/*< private >*/
|
2023-06-23 15:50:16 +00:00
|
|
|
gpointer _reserved[GST_PADDING];
|
|
|
|
};
|
|
|
|
|
2023-07-10 12:44:05 +00:00
|
|
|
/**
|
|
|
|
* GstVulkanVideoOperation:
|
|
|
|
* @GST_VULKAN_VIDEO_OPERATION_DECODE: decode operation
|
|
|
|
* @GST_VULKAN_VIDEO_OPERATION_ENCODE: encode operation
|
|
|
|
* @GST_VULKAN_VIDEO_OPERATION_UNKNOWN: unknown
|
|
|
|
*
|
|
|
|
* The type of video operation.
|
|
|
|
*
|
|
|
|
* Since: 1.24
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_VULKAN_VIDEO_OPERATION_DECODE = 0,
|
|
|
|
GST_VULKAN_VIDEO_OPERATION_ENCODE,
|
|
|
|
GST_VULKAN_VIDEO_OPERATION_UNKNOWN,
|
|
|
|
} GstVulkanVideoOperation;
|
|
|
|
|
2023-04-03 18:56:40 +00:00
|
|
|
GST_VULKAN_API
|
|
|
|
GstCaps * gst_vulkan_video_profile_to_caps (const GstVulkanVideoProfile * profile);
|
|
|
|
GST_VULKAN_API
|
|
|
|
gboolean gst_vulkan_video_profile_from_caps (GstVulkanVideoProfile * profile,
|
2023-07-10 12:44:05 +00:00
|
|
|
GstCaps * caps,
|
|
|
|
GstVulkanVideoOperation video_operation);
|
2023-05-24 08:03:30 +00:00
|
|
|
GST_VULKAN_API
|
|
|
|
gboolean gst_vulkan_video_profile_is_valid (GstVulkanVideoProfile * profile,
|
|
|
|
guint codec);
|
2023-07-03 15:43:05 +00:00
|
|
|
GST_VULKAN_API
|
|
|
|
gboolean gst_vulkan_video_profile_is_equal (const GstVulkanVideoProfile * a,
|
|
|
|
const GstVulkanVideoProfile * b);
|
2023-04-03 18:56:40 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|