new/yocto/meta-rockchip/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20/0006-waylandsink-Support-place-below-above.patch
2025-05-10 21:58:58 +08:00

41 lines
1.1 KiB
Diff

From 4c27748d13263756aaf2fb3efaab723e6ce993f8 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Mon, 15 Jun 2020 10:01:54 +0800
Subject: [PATCH 06/33] waylandsink: Support place below/above
Set environment WAYLANDSINK_PLACE_ABOVE=1 to place it above parent.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
ext/wayland/wlwindow.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
index 66df0fc..57b5491 100644
--- a/ext/wayland/wlwindow.c
+++ b/ext/wayland/wlwindow.c
@@ -24,6 +24,8 @@
#include <config.h>
#endif
+#include <stdlib.h>
+
#include "wlwindow.h"
#include "wlshmallocator.h"
#include "wlbuffer.h"
@@ -357,6 +359,11 @@ gst_wl_window_new_in_surface (GstWlDisplay * display,
window->area_surface, parent);
wl_subsurface_set_desync (window->area_subsurface);
+ if (g_getenv ("WAYLANDSINK_PLACE_ABOVE"))
+ wl_subsurface_place_above (window->area_subsurface, parent);
+ else
+ wl_subsurface_place_below (window->area_subsurface, parent);
+
wl_surface_commit (parent);
return window;
--
2.20.1