summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <niels.degraef@barco.com>2019-03-01 10:17:23 +0100
committerNiels De Graef <nielsdegraef@gmail.com>2019-03-04 10:58:54 +0000
commitc461f22befeae020b4411907164925a4250b583f (patch)
tree790a8f441babcd5cbe773a6f842d3840541f7a30
parent18d3d31dc88f9dc03aeae3442bf544d6c41e0ce6 (diff)
waylandsink: prefix wl_shell-specific variables with wl_
-rw-r--r--ext/wayland/wldisplay.c8
-rw-r--r--ext/wayland/wldisplay.h3
-rw-r--r--ext/wayland/wlwindow.c30
-rw-r--r--ext/wayland/wlwindow.h2
4 files changed, 22 insertions, 21 deletions
diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c
index cf7036167..079901979 100644
--- a/ext/wayland/wldisplay.c
+++ b/ext/wayland/wldisplay.c
@@ -87,8 +87,8 @@ gst_wl_display_finalize (GObject * gobject)
if (self->dmabuf)
zwp_linux_dmabuf_v1_destroy (self->dmabuf);
- if (self->shell)
- wl_shell_destroy (self->shell);
+ if (self->wl_shell)
+ wl_shell_destroy (self->wl_shell);
if (self->fullscreen_shell)
zwp_fullscreen_shell_v1_release (self->fullscreen_shell);
@@ -199,7 +199,7 @@ registry_handle_global (void *data, struct wl_registry *registry,
self->subcompositor =
wl_registry_bind (registry, id, &wl_subcompositor_interface, 1);
} else if (g_strcmp0 (interface, "wl_shell") == 0) {
- self->shell = wl_registry_bind (registry, id, &wl_shell_interface, 1);
+ self->wl_shell = wl_registry_bind (registry, id, &wl_shell_interface, 1);
} else if (g_strcmp0 (interface, "zwp_fullscreen_shell_v1") == 0) {
self->fullscreen_shell = wl_registry_bind (registry, id,
&zwp_fullscreen_shell_v1_interface, 1);
@@ -331,7 +331,7 @@ gst_wl_display_new_existing (struct wl_display * display,
g_warning ("Could not bind to zwp_linux_dmabuf_v1");
}
- if (!self->shell && !self->fullscreen_shell) {
+ if (!self->wl_shell && !self->fullscreen_shell) {
/* If wl_surface and wl_display are passed via GstContext
* wl_shell, zwp_fullscreen_shell are not used.
* In this case is correct to continue.
diff --git a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h
index 89bedee5a..020ed6ea3 100644
--- a/ext/wayland/wldisplay.h
+++ b/ext/wayland/wldisplay.h
@@ -24,6 +24,7 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <wayland-client.h>
+#include "xdg-shell-client-protocol.h"
#include "viewporter-client-protocol.h"
#include "linux-dmabuf-unstable-v1-client-protocol.h"
#include "fullscreen-shell-unstable-v1-client-protocol.h"
@@ -53,7 +54,7 @@ struct _GstWlDisplay
struct wl_registry *registry;
struct wl_compositor *compositor;
struct wl_subcompositor *subcompositor;
- struct wl_shell *shell;
+ struct wl_shell *wl_shell;
struct zwp_fullscreen_shell_v1 *fullscreen_shell;
struct wl_shm *shm;
struct wp_viewporter *viewporter;
diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
index add15d9b6..547917baa 100644
--- a/ext/wayland/wlwindow.c
+++ b/ext/wayland/wlwindow.c
@@ -36,14 +36,14 @@ G_DEFINE_TYPE (GstWlWindow, gst_wl_window, G_TYPE_OBJECT);
static void gst_wl_window_finalize (GObject * gobject);
static void
-handle_ping (void *data, struct wl_shell_surface *shell_surface,
+handle_ping (void *data, struct wl_shell_surface *wl_shell_surface,
uint32_t serial)
{
- wl_shell_surface_pong (shell_surface, serial);
+ wl_shell_surface_pong (wl_shell_surface, serial);
}
static void
-handle_configure (void *data, struct wl_shell_surface *shell_surface,
+handle_configure (void *data, struct wl_shell_surface *wl_shell_surface,
uint32_t edges, int32_t width, int32_t height)
{
GstWlWindow *window = data;
@@ -58,12 +58,12 @@ handle_configure (void *data, struct wl_shell_surface *shell_surface,
}
static void
-handle_popup_done (void *data, struct wl_shell_surface *shell_surface)
+handle_popup_done (void *data, struct wl_shell_surface *wl_shell_surface)
{
GST_DEBUG ("Window popup done.");
}
-static const struct wl_shell_surface_listener shell_surface_listener = {
+static const struct wl_shell_surface_listener wl_shell_surface_listener = {
handle_ping,
handle_configure,
handle_popup_done
@@ -86,8 +86,8 @@ gst_wl_window_finalize (GObject * gobject)
{
GstWlWindow *self = GST_WL_WINDOW (gobject);
- if (self->shell_surface)
- wl_shell_surface_destroy (self->shell_surface);
+ if (self->wl_shell_surface)
+ wl_shell_surface_destroy (self->wl_shell_surface);
if (self->video_viewport)
wp_viewport_destroy (self->video_viewport);
@@ -158,10 +158,10 @@ gst_wl_window_ensure_fullscreen (GstWlWindow * window, gboolean fullscreen)
return;
if (fullscreen)
- wl_shell_surface_set_fullscreen (window->shell_surface,
+ wl_shell_surface_set_fullscreen (window->wl_shell_surface,
WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE, 0, NULL);
else
- wl_shell_surface_set_toplevel (window->shell_surface);
+ wl_shell_surface_set_toplevel (window->wl_shell_surface);
}
GstWlWindow *
@@ -173,14 +173,14 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info,
window = gst_wl_window_new_internal (display, render_lock);
- if (display->shell) {
+ if (display->wl_shell) {
/* go toplevel */
- window->shell_surface = wl_shell_get_shell_surface (display->shell,
+ window->wl_shell_surface = wl_shell_get_shell_surface (display->wl_shell,
window->area_surface);
- if (window->shell_surface) {
- wl_shell_surface_add_listener (window->shell_surface,
- &shell_surface_listener, window);
+ if (window->wl_shell_surface) {
+ wl_shell_surface_add_listener (window->wl_shell_surface,
+ &wl_shell_surface_listener, window);
gst_wl_window_ensure_fullscreen (window, fullscreen);
} else {
GST_ERROR ("Unable to get wl_shell_surface");
@@ -242,7 +242,7 @@ gst_wl_window_is_toplevel (GstWlWindow * window)
{
g_return_val_if_fail (window != NULL, FALSE);
- return (window->shell_surface != NULL);
+ return (window->wl_shell_surface != NULL);
}
static void
diff --git a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h
index 547ed55e0..ce2fa939a 100644
--- a/ext/wayland/wlwindow.h
+++ b/ext/wayland/wlwindow.h
@@ -52,7 +52,7 @@ struct _GstWlWindow
struct wl_surface *video_surface_wrapper;
struct wl_subsurface *video_subsurface;
struct wp_viewport *video_viewport;
- struct wl_shell_surface *shell_surface;
+ struct wl_shell_surface *wl_shell_surface;
/* the size and position of the area_(sub)surface */
GstVideoRectangle render_rectangle;