1 /* 2 * GStreamer 3 * Copyright (C) 2019 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 __GST_VULKAN_DESCRIPTOR_CACHE_H__ 22 #define __GST_VULKAN_DESCRIPTOR_CACHE_H__ 23 24 #include <gst/vulkan/gstvkqueue.h> 25 #include <gst/vulkan/gstvkhandlepool.h> 26 27 #define GST_TYPE_VULKAN_DESCRIPTOR_CACHE (gst_vulkan_descriptor_cache_get_type()) 28 #define GST_VULKAN_DESCRIPTOR_CACHE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_DESCRIPTOR_CACHE, GstVulkanDescriptorCache)) 29 #define GST_VULKAN_DESCRIPTOR_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_VULKAN_DESCRIPTOR_CACHE, GstVulkanDescriptorCacheClass)) 30 #define GST_IS_VULKAN_DESCRIPTOR_CACHE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_DESCRIPTOR_CACHE)) 31 #define GST_IS_VULKAN_DESCRIPTOR_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_DESCRIPTOR_CACHE)) 32 #define GST_VULKAN_DESCRIPTOR_CACHE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_DESCRIPTOR_CACHE, GstVulkanDescriptorCacheClass)) 33 GST_VULKAN_API 34 GType gst_vulkan_descriptor_cache_get_type (void); 35 36 /** 37 * GstVulkanDescriptorCache: 38 * @parent: the parent #GstVulkanHandlePool 39 * @pool: the #GstVulkanDescriptorPool to cache descriptor sets for 40 * 41 * Since: 1.18 42 */ 43 struct _GstVulkanDescriptorCache 44 { 45 GstVulkanHandlePool parent; 46 47 GstVulkanDescriptorPool *pool; 48 49 /* <private> */ 50 gpointer _reserved [GST_PADDING]; 51 }; 52 53 /** 54 * GstVulkanDescriptorCacheClass: 55 * @parent_class: the parent #GstObjectClass 56 * 57 * Since: 1.18 58 */ 59 struct _GstVulkanDescriptorCacheClass 60 { 61 GstVulkanHandlePoolClass parent_class; 62 63 /* <private> */ 64 gpointer _reserved [GST_PADDING]; 65 }; 66 67 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GstVulkanDescriptorCache, gst_object_unref) 68 69 GST_VULKAN_API 70 GstVulkanDescriptorCache * gst_vulkan_descriptor_cache_new (GstVulkanDescriptorPool * pool, 71 guint n_layouts, 72 GstVulkanHandle ** layouts); 73 74 GST_VULKAN_API 75 GstVulkanDescriptorSet * gst_vulkan_descriptor_cache_acquire (GstVulkanDescriptorCache * cache, 76 GError ** error); 77 78 #endif /* __GST_VULKAN_DESCRIPTOR_CACHE_H__ */ 79