2 * GStreamer Wayland Library
3 * Copyright (C) 2014 Collabora Ltd.
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.
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.
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.
21 #ifndef __GST_WAYLAND_H__
22 #define __GST_WAYLAND_H__
25 #include <wayland-client.h>
29 /* The type of GstContext used to pass the wl_display pointer
30 * from the application to the sink */
31 #define GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE "GstWaylandDisplayHandleContextType"
33 #define GST_TYPE_WAYLAND_VIDEO \
34 (gst_wayland_video_get_type ())
35 #define GST_WAYLAND_VIDEO(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WAYLAND_VIDEO, GstWaylandVideo))
37 #define GST_IS_WAYLAND_VIDEO(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WAYLAND_VIDEO))
39 #define GST_WAYLAND_VIDEO_GET_INTERFACE(inst) \
40 (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_WAYLAND_VIDEO, GstWaylandVideoInterface))
45 * Opaque #GstWaylandVideo interface structure
47 typedef struct _GstWaylandVideo GstWaylandVideo;
48 typedef struct _GstWaylandVideoInterface GstWaylandVideoInterface;
52 * GstWaylandVideoInterface:
53 * @iface: parent interface type.
55 * #GstWaylandVideo interface
57 struct _GstWaylandVideoInterface {
60 /* virtual functions */
61 void (*set_surface_size) (GstWaylandVideo *video, gint w, gint h);
62 void (*pause_rendering) (GstWaylandVideo *video);
63 void (*resume_rendering) (GstWaylandVideo *video);
66 GType gst_wayland_video_get_type (void);
68 /* virtual function wrappers */
70 void gst_wayland_video_set_surface_size (GstWaylandVideo * video,
73 void gst_wayland_video_pause_rendering (GstWaylandVideo * video);
74 void gst_wayland_video_resume_rendering (GstWaylandVideo * video);
78 #endif /* __GST_WAYLAND_H__ */