• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef _VK_UTILS_H_
21 #define _VK_UTILS_H_
22 
23 #include <gst/gst.h>
24 #include <gst/vulkan/vulkan.h>
25 
26 G_BEGIN_DECLS
27 
28 GST_VULKAN_API
29 gboolean                gst_vulkan_ensure_element_data          (GstElement * element,
30                                                                  GstVulkanDisplay ** display_ptr,
31                                                                  GstVulkanInstance ** instance_ptr);
32 GST_VULKAN_API
33 gboolean                gst_vulkan_handle_set_context           (GstElement * element,
34                                                                  GstContext * context,
35                                                                  GstVulkanDisplay ** display,
36                                                                  GstVulkanInstance ** instance);
37 GST_VULKAN_API
38 gboolean                gst_vulkan_handle_context_query         (GstElement * element,
39                                                                  GstQuery * query,
40                                                                  GstVulkanDisplay * display,
41                                                                  GstVulkanInstance * instance,
42                                                                  GstVulkanDevice * device);
43 
44 GST_VULKAN_API
45 void                    gst_vulkan_global_context_query         (GstElement * element,
46                                                                  const gchar * context_type);
47 GST_VULKAN_API
48 GstQuery *              gst_vulkan_local_context_query          (GstElement * element,
49                                                                  const gchar * context_type);
50 GST_VULKAN_API
51 gboolean                gst_vulkan_run_query                    (GstElement * element,
52                                                                  GstQuery * query,
53                                                                  GstPadDirection direction);
54 
55 GST_VULKAN_API
56 GstVulkanImageView *    gst_vulkan_get_or_create_image_view     (GstVulkanImageMemory * image);
57 
58 GST_VULKAN_API
59 GstVulkanHandle *       gst_vulkan_create_shader                (GstVulkanDevice * device,
60                                                                  const gchar * code,
61                                                                  gsize size,
62                                                                  GError ** error);
63 
64 G_END_DECLS
65 
66 #endif /*_VK_UTILS_H_ */
67