1 /* 2 * GStreamer 3 * Copyright (C) 2015 Matthew Waters <matthew@centricular.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef _VK_QUEUE_H_ 22 #define _VK_QUEUE_H_ 23 24 #include "vk.h" 25 26 #define GST_TYPE_VULKAN_QUEUE (gst_vulkan_queue_get_type()) 27 #define GST_VULKAN_QUEUE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_QUEUE, GstVulkanQueue)) 28 #define GST_VULKAN_QUEUE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_VULKAN_QUEUE, GstVulkanQueueClass)) 29 #define GST_IS_VULKAN_QUEUE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_QUEUE)) 30 #define GST_IS_VULKAN_QUEUE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_QUEUE)) 31 #define GST_VULKAN_QUEUE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_QUEUE, GstVulkanQueueClass)) 32 GType gst_vulkan_queue_get_type (void); 33 34 #define GST_VULKAN_QUEUE_CONTEXT_TYPE_STR "gst.vulkan.queue" 35 36 struct _GstVulkanQueue 37 { 38 GstObject parent; 39 40 GstVulkanDevice *device; 41 42 VkQueue queue; /* hides a pointer */ 43 guint32 family; 44 guint32 index; 45 }; 46 47 struct _GstVulkanQueueClass 48 { 49 GstObjectClass parent_class; 50 }; 51 52 GstVulkanDevice * gst_vulkan_queue_get_device (GstVulkanQueue * queue); 53 54 void gst_context_set_vulkan_queue (GstContext * context, 55 GstVulkanQueue * queue); 56 gboolean gst_context_get_vulkan_queue (GstContext * context, 57 GstVulkanQueue ** queue); 58 gboolean gst_vulkan_queue_handle_context_query (GstElement * element, 59 GstQuery * query, 60 GstVulkanQueue ** queue); 61 gboolean gst_vulkan_queue_run_context_query (GstElement * element, 62 GstVulkanQueue ** queue); 63 64 #endif /* _VK_QUEUE_H_ */ 65