2011-11-02 09:02:11 +00:00
|
|
|
/*
|
|
|
|
* GStreamer Wayland video sink
|
|
|
|
* Copyright (C) 2011 Intel Corporation
|
|
|
|
* Copyright (C) 2011 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free
|
2012-08-18 19:31:17 +00:00
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA.
|
2011-11-02 09:02:11 +00:00
|
|
|
*/
|
|
|
|
|
2022-01-04 14:20:41 +00:00
|
|
|
#pragma once
|
2011-11-02 09:02:11 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2014-06-13 13:58:08 +00:00
|
|
|
#include <gst/video/video.h>
|
2022-01-04 14:20:41 +00:00
|
|
|
#include <gst/wayland/wayland.h>
|
2014-02-12 10:28:40 +00:00
|
|
|
|
2014-02-04 15:32:31 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2011-11-02 09:02:11 +00:00
|
|
|
#define GST_TYPE_WAYLAND_SINK \
|
|
|
|
(gst_wayland_sink_get_type())
|
|
|
|
#define GST_WAYLAND_SINK(obj) \
|
2011-11-02 11:51:13 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WAYLAND_SINK,GstWaylandSink))
|
2011-11-02 09:02:11 +00:00
|
|
|
#define GST_WAYLAND_SINK_CLASS(klass) \
|
2011-11-02 11:51:13 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WAYLAND_SINK,GstWaylandSinkClass))
|
2011-11-02 09:02:11 +00:00
|
|
|
#define GST_IS_WAYLAND_SINK(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WAYLAND_SINK))
|
|
|
|
#define GST_IS_WAYLAND_SINK_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAYLAND_SINK))
|
|
|
|
#define GST_WAYLAND_SINK_GET_CLASS(inst) \
|
2011-11-02 11:51:13 +00:00
|
|
|
(G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_WAYLAND_SINK, GstWaylandSinkClass))
|
2011-11-02 09:02:11 +00:00
|
|
|
|
2011-11-02 11:51:13 +00:00
|
|
|
typedef struct _GstWaylandSink GstWaylandSink;
|
|
|
|
typedef struct _GstWaylandSinkClass GstWaylandSinkClass;
|
2011-11-02 09:02:11 +00:00
|
|
|
|
2011-11-02 11:51:13 +00:00
|
|
|
struct _GstWaylandSink
|
2011-11-02 09:02:11 +00:00
|
|
|
{
|
|
|
|
GstVideoSink parent;
|
|
|
|
|
2014-06-06 10:04:44 +00:00
|
|
|
GMutex display_lock;
|
2014-02-12 10:28:40 +00:00
|
|
|
GstWlDisplay *display;
|
2014-02-13 10:59:45 +00:00
|
|
|
GstWlWindow *window;
|
2012-08-08 14:10:28 +00:00
|
|
|
GstBufferPool *pool;
|
2011-11-02 09:02:11 +00:00
|
|
|
|
2014-06-13 13:58:08 +00:00
|
|
|
gboolean video_info_changed;
|
|
|
|
GstVideoInfo video_info;
|
2023-07-28 19:56:32 +00:00
|
|
|
GstVideoInfoDmaDrm drm_info;
|
2017-02-23 10:48:13 +00:00
|
|
|
gboolean fullscreen;
|
2023-02-16 18:54:42 +00:00
|
|
|
GstCaps *caps;
|
2014-02-26 12:56:21 +00:00
|
|
|
|
|
|
|
gchar *display_name;
|
2014-02-28 09:48:30 +00:00
|
|
|
|
2014-03-07 15:25:00 +00:00
|
|
|
gboolean redraw_pending;
|
2014-05-28 10:10:43 +00:00
|
|
|
GMutex render_lock;
|
2014-03-11 15:45:05 +00:00
|
|
|
GstBuffer *last_buffer;
|
2020-12-15 10:11:08 +00:00
|
|
|
|
2022-06-02 12:22:21 +00:00
|
|
|
GstVideoOrientationMethod sink_rotate_method;
|
|
|
|
GstVideoOrientationMethod tag_rotate_method;
|
|
|
|
GstVideoOrientationMethod current_rotate_method;
|
|
|
|
|
2020-12-15 10:11:08 +00:00
|
|
|
struct wl_callback *callback;
|
2023-02-16 21:21:33 +00:00
|
|
|
|
|
|
|
gchar *drm_device;
|
|
|
|
gboolean skip_dumb_buffer_copy;
|
2011-11-02 09:02:11 +00:00
|
|
|
};
|
|
|
|
|
2011-11-02 11:51:13 +00:00
|
|
|
struct _GstWaylandSinkClass
|
2011-11-02 09:02:11 +00:00
|
|
|
{
|
2012-05-23 10:07:14 +00:00
|
|
|
GstVideoSinkClass parent;
|
2011-11-02 09:02:11 +00:00
|
|
|
};
|
|
|
|
|
2011-11-02 11:51:13 +00:00
|
|
|
GType gst_wayland_sink_get_type (void) G_GNUC_CONST;
|
2011-11-02 09:02:11 +00:00
|
|
|
|
2021-02-24 17:56:55 +00:00
|
|
|
GST_ELEMENT_REGISTER_DECLARE (waylandsink);
|
|
|
|
|
2011-11-02 09:02:11 +00:00
|
|
|
G_END_DECLS
|