1 /* 2 * GStreamer 3 * Copyright (C) 2016 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_TRASH_H_ 22 #define _VK_TRASH_H_ 23 24 #include <vk.h> 25 26 G_BEGIN_DECLS 27 28 typedef void (*GstVulkanTrashNotify) (GstVulkanDevice * device, gpointer user_data); 29 30 struct _GstVulkanTrash 31 { 32 GstVulkanFence *fence; 33 34 GstVulkanTrashNotify notify; 35 gpointer user_data; 36 }; 37 38 GstVulkanTrash * gst_vulkan_trash_new (GstVulkanFence * fence, 39 GstVulkanTrashNotify notify, 40 gpointer user_data); 41 GstVulkanTrash * gst_vulkan_trash_new_free_command_buffer (GstVulkanFence * fence, 42 VkCommandBuffer cmd); 43 GstVulkanTrash * gst_vulkan_trash_new_free_semaphore (GstVulkanFence * fence, 44 VkSemaphore cmd); 45 void gst_vulkan_trash_free (GstVulkanTrash * trash); 46 47 GList * gst_vulkan_trash_list_gc (GList * trash_list); 48 gboolean gst_vulkan_trash_list_wait (GList * trash_list, 49 guint64 timeout); 50 51 G_END_DECLS 52 53 #endif /* _VK_INSTANCE_H_ */ 54