• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * GStreamer
3  * Copyright (C) 2013 Matthew Waters <ystreet00@gmail.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_GL_DISPLAY_WAYLAND_H__
22 #define __GST_GL_DISPLAY_WAYLAND_H__
23 
24 #include <gst/gst.h>
25 
26 #include <wayland-client.h>
27 
28 #include <gst/gl/gstgl_fwd.h>
29 #include <gst/gl/gstgldisplay.h>
30 
31 G_BEGIN_DECLS
32 
33 GST_GL_API GType gst_gl_display_wayland_get_type (void);
34 
35 #define GST_TYPE_GL_DISPLAY_WAYLAND             (gst_gl_display_wayland_get_type())
36 #define GST_GL_DISPLAY_WAYLAND(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DISPLAY_WAYLAND,GstGLDisplayWayland))
37 #define GST_GL_DISPLAY_WAYLAND_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_GL_DISPLAY_WAYLAND,GstGLDisplayWaylandClass))
38 #define GST_IS_GL_DISPLAY_WAYLAND(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DISPLAY_WAYLAND))
39 #define GST_IS_GL_DISPLAY_WAYLAND_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_DISPLAY_WAYLAND))
40 #define GST_GL_DISPLAY_WAYLAND_CAST(obj)        ((GstGLDisplayWayland*)(obj))
41 
42 typedef struct _GstGLDisplayWayland GstGLDisplayWayland;
43 typedef struct _GstGLDisplayWaylandClass GstGLDisplayWaylandClass;
44 
45 /**
46  * GstGLDisplayWayland:
47  *
48  * the contents of a #GstGLDisplayWayland are private and should only be accessed
49  * through the provided API
50  */
51 struct _GstGLDisplayWayland
52 {
53   GstGLDisplay            parent;
54 
55   struct wl_display       *display;
56   struct wl_registry      *registry;            /* unset */
57   struct wl_compositor    *compositor;          /* unset */
58   struct wl_subcompositor *subcompositor;       /* unset */
59 
60   /* Basic shell, see private struct for others (e.g. XDG-shell) */
61   struct wl_shell     *shell;                   /* unset */
62 
63   /*< private >*/
64   gboolean foreign_display;
65 
66   gpointer _padding[GST_PADDING];
67 };
68 
69 struct _GstGLDisplayWaylandClass
70 {
71   GstGLDisplayClass object_class;
72 
73   gpointer _padding[GST_PADDING];
74 };
75 
76 GST_GL_API
77 GstGLDisplayWayland *gst_gl_display_wayland_new (const gchar * name);
78 
79 GST_GL_API
80 GstGLDisplayWayland *gst_gl_display_wayland_new_with_display (struct wl_display *display);
81 
82 G_END_DECLS
83 
84 #endif /* __GST_GL_DISPLAY_WAYLAND_H__ */
85