aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>2021-11-23 06:34:35 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-01-10 11:39:42 +0000
commite78d53c56f068ef781d30fdcd1f6fc56e8b3683f (patch)
tree1c30228eb466c4abc0742c422e39b3d22ab8ae4f
parent8b273d4b3ca386d20bdee322f18c8e6b9be5441c (diff)
meta-agl-core: gstreamer: Add 0001-waylandsink-Fix-xdg_shell-fullscreen-mode.patch.
It is needed to make waylandsink work with AGL compositor. Patch included conditionally to pass: meta-agl-core/scripts/run-yocto-check-layer.sh Bug-AGL: SPEC-4148 Change-Id: Iebe5595e468404483d7e599c6c4a664474271988 Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26981 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Marius Vlad <marius.vlad@collabora.com> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
-rw-r--r--meta-agl-core/recipes-multimedia/gstreamer/files/0001-waylandsink-Fix-xdg_shell-fullscreen-mode.patch60
-rw-r--r--meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.bbappend1
-rw-r--r--meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_aglcore.inc3
3 files changed, 64 insertions, 0 deletions
diff --git a/meta-agl-core/recipes-multimedia/gstreamer/files/0001-waylandsink-Fix-xdg_shell-fullscreen-mode.patch b/meta-agl-core/recipes-multimedia/gstreamer/files/0001-waylandsink-Fix-xdg_shell-fullscreen-mode.patch
new file mode 100644
index 000000000..9a11fa1d7
--- /dev/null
+++ b/meta-agl-core/recipes-multimedia/gstreamer/files/0001-waylandsink-Fix-xdg_shell-fullscreen-mode.patch
@@ -0,0 +1,60 @@
+From 58b1f41f992e457b25eda125b6f823f97128e203 Mon Sep 17 00:00:00 2001
+From: Shinya Saito <ssaito@igel.co.jp>
+Date: Thu, 22 Aug 2019 16:04:37 +0900
+Subject: [PATCH] waylandsink: Fix xdg_shell fullscreen mode
+
+xdg_shell fullscreen mode doesn't work for committing
+xdg_surface without configure acknowledgement.
+
+In addition, we can't set different surface setting from
+acknowledged config in this mode.
+
+Upstream-Status: Backport [from master/1.17.1]
+---
+ ext/wayland/wlwindow.c | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
+index f22ebcab6..50158795b 100644
+--- a/ext/wayland/wlwindow.c
++++ b/ext/wayland/wlwindow.c
+@@ -259,7 +259,6 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info,
+ gboolean fullscreen, GMutex * render_lock)
+ {
+ GstWlWindow *window;
+- gint width;
+
+ window = gst_wl_window_new_internal (display, render_lock);
+
+@@ -325,10 +324,14 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info,
+ goto error;
+ }
+
+- /* set the initial size to be the same as the reported video size */
+- width =
+- gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
+- gst_wl_window_set_render_rectangle (window, 0, 0, width, info->height);
++ /* render_rectangle is already set via toplevel_configure in
++ * xdg_shell fullscreen mode */
++ if (!(display->xdg_wm_base && fullscreen)) {
++ /* set the initial size to be the same as the reported video size */
++ gint width =
++ gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
++ gst_wl_window_set_render_rectangle (window, 0, 0, width, info->height);
++ }
+
+ return window;
+
+@@ -548,6 +551,9 @@ gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
+
+ gst_wl_window_update_borders (window);
+
++ if (!window->configured)
++ return;
++
+ if (window->video_width != 0) {
+ wl_subsurface_set_sync (window->video_subsurface);
+ gst_wl_window_resize_video_surface (window, TRUE);
+--
+2.20.1
+
diff --git a/meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.bbappend b/meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.bbappend
new file mode 100644
index 000000000..980783236
--- /dev/null
+++ b/meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_aglcore.inc b/meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_aglcore.inc
new file mode 100644
index 000000000..618065f7f
--- /dev/null
+++ b/meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_aglcore.inc
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://0001-waylandsink-Fix-xdg_shell-fullscreen-mode.patch"