diff options
Diffstat (limited to 'meta-agl-core/recipes-multimedia')
6 files changed, 179 insertions, 64 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 deleted file mode 100644 index 9a11fa1d7..000000000 --- a/meta-agl-core/recipes-multimedia/gstreamer/files/0001-waylandsink-Fix-xdg_shell-fullscreen-mode.patch +++ /dev/null @@ -1,60 +0,0 @@ -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 deleted file mode 100644 index 980783236..000000000 --- a/meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.bbappend +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 618065f7f..000000000 --- a/meta-agl-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_aglcore.inc +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -SRC_URI += "file://0001-waylandsink-Fix-xdg_shell-fullscreen-mode.patch" diff --git a/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/files/0001-Added-appid-and-title-support.patch b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/files/0001-Added-appid-and-title-support.patch new file mode 100644 index 000000000..685f80c7b --- /dev/null +++ b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/files/0001-Added-appid-and-title-support.patch @@ -0,0 +1,169 @@ +From b8bbab864a1367ac47bcc0998b4c07d20020965a Mon Sep 17 00:00:00 2001 +From: Marius Vlad <marius.vlad@collabora.com> +Date: Thu, 5 Oct 2023 18:23:52 +0300 +Subject: [PATCH] ext/wayland: Add title/appid support + +Upstream-Status: Pending + +Bug-AGL: SPEC-4870 +Signed-off-by: Marius Vlad <marius.vlad@collabora.com> +--- + ext/wayland/gstwaylandsink.c | 41 +++++++++++++++++++++++++++++- + ext/wayland/gstwaylandsink.h | 2 ++ + gst-libs/gst/wayland/gstwlwindow.c | 12 ++++++++- + gst-libs/gst/wayland/gstwlwindow.h | 3 ++- + 4 files changed, 55 insertions(+), 3 deletions(-) + +diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c +index 2f116bf..69f4a00 100644 +--- a/ext/wayland/gstwaylandsink.c ++++ b/ext/wayland/gstwaylandsink.c +@@ -61,6 +61,8 @@ enum + PROP_DISPLAY, + PROP_FULLSCREEN, + PROP_ROTATE_METHOD, ++ PROP_APP_ID, ++ PROP_TITLE, + PROP_LAST + }; + +@@ -177,6 +179,16 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass) + GST_TYPE_VIDEO_ORIENTATION_METHOD, GST_VIDEO_ORIENTATION_IDENTITY, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + ++ g_object_class_install_property (gobject_class, PROP_APP_ID, ++ g_param_spec_string ("appid", "Top-level application id", "Wayland " ++ "appid, as xdg_shell::set_app_id", ++ NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ ++ g_object_class_install_property (gobject_class, PROP_TITLE, ++ g_param_spec_string ("title", "Top-level title", "Wayland " ++ "title, xdg_shell::set_title", ++ NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ + /** + * waylandsink:render-rectangle: + * +@@ -266,6 +278,16 @@ gst_wayland_sink_get_property (GObject * object, + g_value_set_enum (value, self->current_rotate_method); + GST_OBJECT_UNLOCK (self); + break; ++ case PROP_APP_ID: ++ GST_OBJECT_LOCK (self); ++ g_value_set_string (value, self->app_id); ++ GST_OBJECT_UNLOCK (self); ++ break; ++ case PROP_TITLE: ++ GST_OBJECT_LOCK (self); ++ g_value_set_string (value, self->title); ++ GST_OBJECT_UNLOCK (self); ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -289,6 +311,16 @@ gst_wayland_sink_set_property (GObject * object, + gst_wayland_sink_set_fullscreen (self, g_value_get_boolean (value)); + GST_OBJECT_UNLOCK (self); + break; ++ case PROP_APP_ID: ++ GST_OBJECT_LOCK (self); ++ self->app_id = g_value_dup_string (value); ++ GST_OBJECT_UNLOCK (self); ++ break; ++ case PROP_TITLE: ++ GST_OBJECT_LOCK (self); ++ self->title = g_value_dup_string (value); ++ GST_OBJECT_UNLOCK (self); ++ break; + case PROP_ROTATE_METHOD: + gst_wayland_sink_set_rotate_method (self, g_value_get_enum (value), + FALSE); +@@ -310,12 +342,18 @@ gst_wayland_sink_finalize (GObject * object) + gst_buffer_unref (self->last_buffer); + if (self->display) + g_object_unref (self->display); ++ if (self->title) ++ g_object_unref (self->title); ++ if (self->app_id) ++ g_object_unref (self->app_id); + if (self->window) + g_object_unref (self->window); + if (self->pool) + gst_object_unref (self->pool); + + g_free (self->display_name); ++ g_free (self->title); ++ g_free (self->app_id); + + g_mutex_clear (&self->display_lock); + g_mutex_clear (&self->render_lock); +@@ -761,7 +799,8 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) + if (!self->window) { + /* if we were not provided a window, create one ourselves */ + self->window = gst_wl_window_new_toplevel (self->display, +- &self->video_info, self->fullscreen, &self->render_lock); ++ &self->video_info, self->fullscreen, &self->app_id, &self->title, ++ &self->render_lock); + g_signal_connect_object (self->window, "closed", + G_CALLBACK (on_window_closed), self, 0); + gst_wl_window_set_rotate_method (self->window, +diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h +index 3243d8c..6aee19d 100644 +--- a/ext/wayland/gstwaylandsink.h ++++ b/ext/wayland/gstwaylandsink.h +@@ -58,6 +58,8 @@ struct _GstWaylandSink + gboolean fullscreen; + + gchar *display_name; ++ gchar *app_id; ++ gchar *title; + + gboolean redraw_pending; + GMutex render_lock; +diff --git a/gst-libs/gst/wayland/gstwlwindow.c b/gst-libs/gst/wayland/gstwlwindow.c +index 6004993..de0a81e 100644 +--- a/gst-libs/gst/wayland/gstwlwindow.c ++++ b/gst-libs/gst/wayland/gstwlwindow.c +@@ -270,7 +270,7 @@ gst_wl_window_ensure_fullscreen (GstWlWindow * self, gboolean fullscreen) + + GstWlWindow * + gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info, +- gboolean fullscreen, GMutex * render_lock) ++ gboolean fullscreen, gchar *app_id, gchar *title, GMutex * render_lock) + { + GstWlWindow *self; + GstWlWindowPrivate *priv; +@@ -307,6 +307,16 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info, + + gst_wl_window_ensure_fullscreen (self, fullscreen); + ++ if (app_id) ++ xdg_toplevel_set_app_id (priv->xdg_toplevel, app_id); ++ else ++ xdg_toplevel_set_app_id (priv->xdg_toplevel, "ext.wayland.waylandsink"); ++ if (title) ++ xdg_toplevel_set_title (priv->xdg_toplevel, title); ++ else ++ xdg_toplevel_set_title (priv->xdg_toplevel, "ext.wayland.waylandsink"); ++ ++ + /* Finally, commit the xdg_surface state as toplevel */ + priv->configured = FALSE; + wl_surface_commit (priv->area_surface); +diff --git a/gst-libs/gst/wayland/gstwlwindow.h b/gst-libs/gst/wayland/gstwlwindow.h +index 06c4001..e102052 100644 +--- a/gst-libs/gst/wayland/gstwlwindow.h ++++ b/gst-libs/gst/wayland/gstwlwindow.h +@@ -39,7 +39,8 @@ void gst_wl_window_ensure_fullscreen (GstWlWindow * self, + + GST_WL_API + GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display, +- const GstVideoInfo * info, gboolean fullscreen, GMutex * render_lock); ++ const GstVideoInfo * info, gboolean fullscreen, gchar * app_id, ++ gchar *title, GMutex * render_lock); + + GST_WL_API + GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display, +-- +2.35.1 + diff --git a/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_%.bbappend b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_%.bbappend new file mode 100644 index 000000000..96bbdc34b --- /dev/null +++ b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_%.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'gstreamer1.0-plugins-bad_aglcore.inc', '', d)} diff --git a/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_aglcore.inc b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_aglcore.inc new file mode 100644 index 000000000..97a0c1688 --- /dev/null +++ b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_aglcore.inc @@ -0,0 +1,9 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +AGL_PATCHES = "file://0001-Added-appid-and-title-support.patch" + +# Above patch fails to apply against NXP's forked version, disable +# for now +AGL_PATCHES:use-nxp-bsp = "" + +SRC_URI:append = " ${AGL_PATCHES}" |