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 _GST_VULKAN_BUFFER_POOL_H_
22 #define _GST_VULKAN_BUFFER_POOL_H_
23 
24 #include <gst/video/video.h>
25 #include <gst/video/gstvideometa.h>
26 #include <gst/video/gstvideopool.h>
27 
28 #include <vk.h>
29 
30 G_BEGIN_DECLS
31 
32 /* buffer pool functions */
33 GType gst_vulkan_buffer_pool_get_type (void);
34 #define GST_TYPE_VULKAN_BUFFER_POOL      (gst_vulkan_buffer_pool_get_type())
35 #define GST_IS_VULKAN_BUFFER_POOL(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VULKAN_BUFFER_POOL))
36 #define GST_VULKAN_BUFFER_POOL(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VULKAN_BUFFER_POOL, GstVulkanBufferPool))
37 #define GST_VULKAN_BUFFER_POOL_CAST(obj) ((GstVulkanBufferPool*)(obj))
38 
39 /**
40  * GstVulkanBufferPool:
41  *
42  * Opaque GstVulkanBufferPool struct
43  */
44 struct _GstVulkanBufferPool
45 {
46   GstBufferPool bufferpool;
47 
48   GstVulkanDevice *device;
49 
50   GstVulkanBufferPoolPrivate *priv;
51 };
52 
53 /**
54  * GstVulkanBufferPoolClass:
55  *
56  * The #GstVulkanBufferPoolClass structure contains only private data
57  */
58 struct _GstVulkanBufferPoolClass
59 {
60   GstBufferPoolClass parent_class;
61 };
62 
63 GstBufferPool *gst_vulkan_buffer_pool_new (GstVulkanDevice * device);
64 
65 G_END_DECLS
66 
67 #endif /* _GST_VULKAN_BUFFER_POOL_H_ */
68