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 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24
25 #include <gst/vulkan/vulkan.h>
26
27 #include "gstvkdisplay_android.h"
28
29 #define GST_CAT_DEFAULT gst_vulkan_display_debug
30 GST_DEBUG_CATEGORY_STATIC (gst_vulkan_display_debug);
31
32 G_DEFINE_TYPE (GstVulkanDisplayAndroid, gst_vulkan_display_android,
33 GST_TYPE_VULKAN_DISPLAY);
34
35 static void gst_vulkan_display_android_finalize (GObject * object);
36 static gpointer gst_vulkan_display_android_get_handle (GstVulkanDisplay *
37 display);
38
39 static void
gst_vulkan_display_android_class_init(GstVulkanDisplayAndroidClass * klass)40 gst_vulkan_display_android_class_init (GstVulkanDisplayAndroidClass * klass)
41 {
42 GST_VULKAN_DISPLAY_CLASS (klass)->get_handle =
43 GST_DEBUG_FUNCPTR (gst_vulkan_display_android_get_handle);
44
45 G_OBJECT_CLASS (klass)->finalize = gst_vulkan_display_android_finalize;
46 }
47
48 static void
gst_vulkan_display_android_init(GstVulkanDisplayAndroid * display_android)49 gst_vulkan_display_android_init (GstVulkanDisplayAndroid * display_android)
50 {
51 GstVulkanDisplay *display = (GstVulkanDisplay *) display_android;
52
53 display->type = GST_VULKAN_DISPLAY_TYPE_ANDROID;
54 }
55
56 static void
gst_vulkan_display_android_finalize(GObject * object)57 gst_vulkan_display_android_finalize (GObject * object)
58 {
59 G_OBJECT_CLASS (gst_vulkan_display_android_parent_class)->finalize (object);
60 }
61
62 /**
63 * gst_vulkan_display_android_new:
64 *
65 * Create a new #GstVulkanDisplayAndroid.
66 *
67 * Returns: (transfer full): a new #GstVulkanDisplayAndroid or %NULL
68 */
69 GstVulkanDisplayAndroid *
gst_vulkan_display_android_new(void)70 gst_vulkan_display_android_new (void)
71 {
72 GstVulkanDisplayAndroid *ret;
73
74 GST_DEBUG_CATEGORY_GET (gst_vulkan_display_debug, "vulkandisplay");
75
76 ret = g_object_new (GST_TYPE_VULKAN_DISPLAY_ANDROID, NULL);
77 gst_object_ref_sink (ret);
78
79 return ret;
80 }
81
82 static gpointer
gst_vulkan_display_android_get_handle(GstVulkanDisplay * display)83 gst_vulkan_display_android_get_handle (GstVulkanDisplay * display)
84 {
85 return NULL;
86 }
87