| 1 |
/* GStreamer Wayland Library |
| 2 |
* |
| 3 |
* Copyright (C) 2014 Collabora Ltd. |
| 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 Free |
| 17 |
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 |
* Boston, MA 02110-1301 USA. |
| 19 |
*/ |
| 20 |
|
| 21 |
#pragma once |
| 22 |
|
| 23 |
#include <gst/wayland/wayland.h> |
| 24 |
#include <gst/video/video.h> |
| 25 |
|
| 26 |
G_BEGIN_DECLS |
| 27 |
|
| 28 |
#define GST_TYPE_WL_WINDOW (gst_wl_window_get_type ()) |
| 29 |
|
| 30 |
GST_WL_API |
| 31 |
G_DECLARE_FINAL_TYPE (GstWlWindow, gst_wl_window, GST, WL_WINDOW, GstObject); |
| 32 |
|
| 33 |
struct _GstWlWindow |
| 34 |
{ |
| 35 |
GstObject parent_instance; |
| 36 |
}; |
| 37 |
|
| 38 |
GST_WL_API |
| 39 |
void gst_wl_window_ensure_fullscreen (GstWlWindow * self, gboolean fullscreen); |
| 40 |
|
| 41 |
GST_WL_API |
| 42 |
void gst_wl_window_ensure_fullscreen_for_output (GstWlWindow * self, |
| 43 |
gboolean fullscreen, const gchar * output_name); |
| 44 |
|
| 45 |
GST_WL_API |
| 46 |
GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display, |
| 47 |
const GstVideoInfo * info, gboolean fullscreen, GMutex * render_lock); |
| 48 |
|
| 49 |
GST_WL_API |
| 50 |
GstWlWindow * gst_wl_window_new_toplevel_full (GstWlDisplay * display, const GstVideoInfo * info, |
| 51 |
gboolean fullscreen, const gchar * output_name, GMutex * render_lock); |
| 52 |
|
| 53 |
GST_WL_API |
| 54 |
GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display, |
| 55 |
struct wl_surface * parent, GMutex * render_lock); |
| 56 |
|
| 57 |
GST_WL_API |
| 58 |
GstWlDisplay *gst_wl_window_get_display (GstWlWindow * self); |
| 59 |
|
| 60 |
GST_WL_API |
| 61 |
struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * self); |
| 62 |
|
| 63 |
GST_WL_API |
| 64 |
struct wl_subsurface *gst_wl_window_get_subsurface (GstWlWindow * self); |
| 65 |
|
| 66 |
GST_WL_API |
| 67 |
gboolean gst_wl_window_is_toplevel (GstWlWindow * self); |
| 68 |
|
| 69 |
GST_WL_API |
| 70 |
gboolean gst_wl_window_render (GstWlWindow * self, GstWlBuffer * buffer, |
| 71 |
const GstVideoInfo * info); |
| 72 |
|
| 73 |
GST_WL_API |
| 74 |
gboolean gst_wl_window_flush (GstWlWindow * self); |
| 75 |
|
| 76 |
GST_WL_API |
| 77 |
gboolean gst_wl_window_render_hdr (GstWlWindow * self, GstWlBuffer * buffer, |
| 78 |
const GstVideoInfo * info, const GstVideoMasteringDisplayInfo *minfo, |
| 79 |
const GstVideoContentLightLevel *linfo); |
| 80 |
|
| 81 |
GST_WL_API |
| 82 |
void gst_wl_window_set_render_rectangle (GstWlWindow * self, gint x, gint y, |
| 83 |
gint w, gint h); |
| 84 |
|
| 85 |
GST_WL_API |
| 86 |
const GstVideoRectangle *gst_wl_window_get_render_rectangle (GstWlWindow * self); |
| 87 |
|
| 88 |
GST_WL_API |
| 89 |
void gst_wl_window_set_rotate_method (GstWlWindow *self, |
| 90 |
GstVideoOrientationMethod rotate_method); |
| 91 |
|
| 92 |
GST_WL_API |
| 93 |
void gst_wl_window_set_force_aspect_ratio (GstWlWindow * self, |
| 94 |
gboolean force_aspect_ratio); |
| 95 |
|
| 96 |
G_END_DECLS |