2015-10-24 06:29:05 +00:00
|
|
|
/*
|
|
|
|
* GStreamer
|
|
|
|
* Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2019-04-08 11:35:22 +00:00
|
|
|
#ifndef __GST_VULKAN_QUEUE_H__
|
|
|
|
#define __GST_VULKAN_QUEUE_H__
|
2015-10-24 06:29:05 +00:00
|
|
|
|
2019-04-11 06:52:54 +00:00
|
|
|
#include <gst/vulkan/gstvkdevice.h>
|
|
|
|
#include <gst/vulkan/gstvkcommandpool.h>
|
2015-10-24 06:29:05 +00:00
|
|
|
|
|
|
|
#define GST_TYPE_VULKAN_QUEUE (gst_vulkan_queue_get_type())
|
|
|
|
#define GST_VULKAN_QUEUE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_QUEUE, GstVulkanQueue))
|
|
|
|
#define GST_VULKAN_QUEUE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_VULKAN_QUEUE, GstVulkanQueueClass))
|
|
|
|
#define GST_IS_VULKAN_QUEUE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_QUEUE))
|
|
|
|
#define GST_IS_VULKAN_QUEUE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_QUEUE))
|
|
|
|
#define GST_VULKAN_QUEUE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_QUEUE, GstVulkanQueueClass))
|
2019-04-08 11:35:22 +00:00
|
|
|
GST_VULKAN_API
|
2015-10-24 06:29:05 +00:00
|
|
|
GType gst_vulkan_queue_get_type (void);
|
|
|
|
|
2020-08-12 05:59:01 +00:00
|
|
|
/**
|
|
|
|
* GST_VULKAN_QUEUE_CONTEXT_TYPE_STR:
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
*/
|
2016-02-16 00:22:37 +00:00
|
|
|
#define GST_VULKAN_QUEUE_CONTEXT_TYPE_STR "gst.vulkan.queue"
|
|
|
|
|
2020-08-12 05:59:01 +00:00
|
|
|
/**
|
|
|
|
* GstVulkanQueue:
|
|
|
|
* @parent: the parent #GstObject
|
|
|
|
* @device: the #GstVulkanDevice this queue was allocated from
|
|
|
|
* @queue: the vulkan queue handle
|
|
|
|
* @family: the vulkan queue family
|
|
|
|
* @index: the vulkan queue index
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
*/
|
2015-10-24 06:29:05 +00:00
|
|
|
struct _GstVulkanQueue
|
|
|
|
{
|
|
|
|
GstObject parent;
|
|
|
|
|
|
|
|
GstVulkanDevice *device;
|
|
|
|
|
|
|
|
VkQueue queue; /* hides a pointer */
|
|
|
|
guint32 family;
|
|
|
|
guint32 index;
|
2020-08-12 05:59:01 +00:00
|
|
|
|
|
|
|
/* <private> */
|
|
|
|
gpointer _reserved [GST_PADDING];
|
2015-10-24 06:29:05 +00:00
|
|
|
};
|
|
|
|
|
2020-08-12 05:59:01 +00:00
|
|
|
/**
|
|
|
|
* GstVulkanQueueClass:
|
|
|
|
* @parent_class: the parent #GstObjectClass
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
*/
|
2015-10-24 06:29:05 +00:00
|
|
|
struct _GstVulkanQueueClass
|
|
|
|
{
|
|
|
|
GstObjectClass parent_class;
|
2020-08-12 05:59:01 +00:00
|
|
|
|
|
|
|
/* <private> */
|
|
|
|
gpointer _reserved [GST_PADDING];
|
2015-10-24 06:29:05 +00:00
|
|
|
};
|
|
|
|
|
2021-03-05 08:18:15 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GstVulkanQueue, gst_object_unref)
|
|
|
|
|
|
|
|
GST_VULKAN_API
|
2016-02-16 00:22:37 +00:00
|
|
|
GstVulkanDevice * gst_vulkan_queue_get_device (GstVulkanQueue * queue);
|
|
|
|
|
2019-04-10 04:27:26 +00:00
|
|
|
GST_VULKAN_API
|
|
|
|
GstVulkanCommandPool * gst_vulkan_queue_create_command_pool (GstVulkanQueue * queue,
|
|
|
|
GError ** error);
|
|
|
|
|
2019-11-13 23:00:35 +00:00
|
|
|
GST_VULKAN_API
|
|
|
|
void gst_vulkan_queue_submit_lock (GstVulkanQueue * queue);
|
|
|
|
GST_VULKAN_API
|
|
|
|
void gst_vulkan_queue_submit_unlock (GstVulkanQueue * queue);
|
|
|
|
|
2019-04-08 11:35:22 +00:00
|
|
|
GST_VULKAN_API
|
2016-02-16 00:22:37 +00:00
|
|
|
void gst_context_set_vulkan_queue (GstContext * context,
|
|
|
|
GstVulkanQueue * queue);
|
2019-04-08 11:35:22 +00:00
|
|
|
GST_VULKAN_API
|
2016-02-16 00:22:37 +00:00
|
|
|
gboolean gst_context_get_vulkan_queue (GstContext * context,
|
|
|
|
GstVulkanQueue ** queue);
|
2019-04-08 11:35:22 +00:00
|
|
|
GST_VULKAN_API
|
2016-02-16 00:22:37 +00:00
|
|
|
gboolean gst_vulkan_queue_handle_context_query (GstElement * element,
|
|
|
|
GstQuery * query,
|
2019-09-16 01:21:55 +00:00
|
|
|
GstVulkanQueue * queue);
|
2019-04-08 11:35:22 +00:00
|
|
|
GST_VULKAN_API
|
2016-02-16 00:22:37 +00:00
|
|
|
gboolean gst_vulkan_queue_run_context_query (GstElement * element,
|
|
|
|
GstVulkanQueue ** queue);
|
2015-10-24 06:29:05 +00:00
|
|
|
|
2019-04-08 11:35:22 +00:00
|
|
|
#endif /* __GST_VULKAN_QUEUE_H__ */
|