HYL_OK3568_LINUX/buildroot/package/gstreamer1/gst1-plugins-base/0019-gl-wayland-Honor-render-rectangle-for-toplevel-windo.patch

33 lines
1.2 KiB
Diff
Raw Normal View History

2025-05-10 21:49:39 +08:00
From 7eb8b7010f63268ef738fe8c33a2c4db712b4f51 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Thu, 4 May 2023 17:52:33 +0800
Subject: [PATCH 19/20] gl: wayland: Honor render-rectangle for toplevel window
Tested on RK3588 evb with:
gst-launch-1.0 videotestsrc ! glimagesink render-rectangle='<100,200,300,400>'
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
index f2d7ceb..55fce34 100644
--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
+++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
@@ -732,6 +732,11 @@ _set_render_rectangle (gpointer data)
window_resize (render->window_egl, render->rect.w, render->rect.h);
+ /* try to position the xdg surface with hacked wayland server API */
+ if (render->window_egl->window.xdg_surface)
+ xdg_surface_set_window_geometry (render->window_egl->window.xdg_surface,
+ render->rect.x, render->rect.y, 0, 0);
+
render->window_egl->window.render_rect = render->rect;
}
--
2.20.1