2 * GStreamer Wayland video sink
3 * Copyright (C) 2011 Intel Corporation
4 * Copyright (C) 2011 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA.
22 #ifndef __GST_WAYLAND_VIDEO_SINK_H__
23 #define __GST_WAYLAND_VIDEO_SINK_H__
26 #include <gst/video/video.h>
28 #include <wayland-client.h>
30 #include "wldisplay.h"
34 #define GST_TYPE_WAYLAND_SINK \
35 (gst_wayland_sink_get_type())
36 #define GST_WAYLAND_SINK(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WAYLAND_SINK,GstWaylandSink))
38 #define GST_WAYLAND_SINK_CLASS(klass) \
39 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WAYLAND_SINK,GstWaylandSinkClass))
40 #define GST_IS_WAYLAND_SINK(obj) \
41 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WAYLAND_SINK))
42 #define GST_IS_WAYLAND_SINK_CLASS(klass) \
43 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAYLAND_SINK))
44 #define GST_WAYLAND_SINK_GET_CLASS(inst) \
45 (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_WAYLAND_SINK, GstWaylandSinkClass))
46 #ifdef GST_WLSINK_ENHANCEMENT
49 DISP_GEO_METHOD_LETTER_BOX = 0,
50 DISP_GEO_METHOD_ORIGIN_SIZE,
51 DISP_GEO_METHOD_FULL_SCREEN,
52 DISP_GEO_METHOD_CROPPED_FULL_SCREEN,
53 DISP_GEO_METHOD_ORIGIN_SIZE_OR_LETTER_BOX,
75 #define DEF_DISPLAY_FLIP FLIP_NONE
76 #define DEF_DISPLAY_GEOMETRY_METHOD DISP_GEO_METHOD_LETTER_BOX
79 typedef struct _GstWaylandSink GstWaylandSink;
80 typedef struct _GstWaylandSinkClass GstWaylandSinkClass;
82 struct _GstWaylandSink
87 GstWlDisplay *display;
91 gboolean video_info_changed;
92 GstVideoInfo video_info;
96 gboolean redraw_pending;
98 GstBuffer *last_buffer;
99 #ifdef GST_WLSINK_ENHANCEMENT
100 gboolean use_gapless;
101 gboolean got_eos_event;
105 guint display_geometry_method;
115 struct _GstWaylandSinkClass
117 GstVideoSinkClass parent;
121 gst_wayland_sink_get_type (void)
125 #endif /* __GST_WAYLAND_VIDEO_SINK_H__ */