diff mbox series

[kirkstone] gstreamer1.0-plugins-base: enable glx/opengl support

Message ID 20231206091249.1357218-1-claus.stovgaard@gmail.com
State Accepted, archived
Commit 9fc0f0a15388af175bd53de5190801750064e60c
Headers show
Series [kirkstone] gstreamer1.0-plugins-base: enable glx/opengl support | expand

Commit Message

Claus Stovgaard Dec. 6, 2023, 9:12 a.m. UTC
From: Alexander Kanavin <alex.kanavin@gmail.com>

This is required by latest webkit when built with x11 support.

(From OE-Core rev: 024edebf6f722ae4d05411be348730d9eeb3bd7c)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Claus Stovgaard <claus.stovgaard@gmail.com>
---
 .../gstreamer/gstreamer1.0-plugins-base_1.20.7.bb           | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Steve Sakoman Dec. 7, 2023, 3:07 p.m. UTC | #1
On Tue, Dec 5, 2023 at 11:13 PM Claus Stovgaard
<claus.stovgaard@gmail.com> wrote:
>
> From: Alexander Kanavin <alex.kanavin@gmail.com>
>
> This is required by latest webkit when built with x11 support.

Is this an issue for the version of webkit in kirkstone?  i.e. is it
currently broken?

Steve

>
> (From OE-Core rev: 024edebf6f722ae4d05411be348730d9eeb3bd7c)
>
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> Signed-off-by: Claus Stovgaard <claus.stovgaard@gmail.com>
> ---
>  .../gstreamer/gstreamer1.0-plugins-base_1.20.7.bb           | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.7.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.7.bb
> index 8822c6a905..8dfa70aea3 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.7.bb
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.7.bb
> @@ -21,7 +21,8 @@ inherit gobject-introspection
>
>  # opengl packageconfig factored out to make it easy for distros
>  # and BSP layers to choose OpenGL APIs/platforms/window systems
> -PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
> +PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}"
> +PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}"
>
>  PACKAGECONFIG ??= " \
>      ${GSTREAMER_ORC} \
> @@ -32,7 +33,7 @@ PACKAGECONFIG ??= " \
>  "
>
>  OPENGL_APIS = 'opengl gles2'
> -OPENGL_PLATFORMS = 'egl'
> +OPENGL_PLATFORMS = 'egl glx'
>
>  X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
>  X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
> @@ -61,6 +62,7 @@ PACKAGECONFIG[gles2]        = ",,virtual/libgles2"
>
>  # OpenGL platform packageconfigs
>  PACKAGECONFIG[egl]          = ",,virtual/egl"
> +PACKAGECONFIG[glx]          = ",,virtual/libgl"
>
>  # OpenGL window systems (except for X11)
>  PACKAGECONFIG[gbm]          = ",,virtual/libgbm libgudev libdrm"
> --
> 2.41.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#191876): https://lists.openembedded.org/g/openembedded-core/message/191876
> Mute This Topic: https://lists.openembedded.org/mt/103009798/3620601
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [steve@sakoman.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Claus Stovgaard Dec. 7, 2023, 4:55 p.m. UTC | #2
On Thu, 2023-12-07 at 05:07 -1000, Steve Sakoman wrote:
> On Tue, Dec 5, 2023 at 11:13 PM Claus Stovgaard
> <claus.stovgaard@gmail.com> wrote:
> > 
> > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > 
> > This is required by latest webkit when built with x11 support.
> 
> Is this an issue for the version of webkit in kirkstone?  i.e. is it
> currently broken?
> 
> Steve


I should properly update the message, though as it was a backport from
master, I kept the commit message.

The issue in kirkstone is more general.

An example - if I have a distro without wayland / vulkan, but have
opengl / x11 enabled.

And then look in the log from " bitbake -c configure gstreamer1.0-
plugins-base" and search for gl_api you will find.

"-Dgl_api=gles2 -Dgl_platform=egl -Dgl_winsys=egl,x11 -Dalsa=enabled"

And when running configure for gstreamer1.0-plugins-good you find.

gstreamer1.0-plugins-good/1.20.7-r0/temp $ grep OpenGL log.do_configure
Message: GStreamer OpenGL window systems: egl x11
Message: GStreamer OpenGL platforms: egl
Message: GStreamer OpenGL apis: gles2

Notice the lag of glx / opengl support.

After this change and running the same plugins-base / plugins-good
configuration you see.

"-Dgl_api=opengl,gles2 -Dgl_platform=egl,glx -Dgl_winsys=egl,x11 -
Dalsa=enabled"

and for good plugins.

gstreamer1.0-plugins-good/1.20.7-r0/temp $ grep OpenGL log.do_configure
Message: GStreamer OpenGL window systems: egl x11
Message: GStreamer OpenGL platforms: egl glx
Message: GStreamer OpenGL apis: gles2 gl

Notice we now have gl api and glx platform.

This is an issue when having application using qmlgl plugin as an
example.

In short it fixes so gstreamer1.0 follow the DISTRO_fEATURES, and make
it possible to have x11 support in plugins using glx/gl features like
qmlgl plugin

Hope it make it clear why I see it as a bug needing fixed in kirkstone.

Regards
Claus
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.7.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.7.bb
index 8822c6a905..8dfa70aea3 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.7.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.7.bb
@@ -21,7 +21,8 @@  inherit gobject-introspection
 
 # opengl packageconfig factored out to make it easy for distros
 # and BSP layers to choose OpenGL APIs/platforms/window systems
-PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
+PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}"
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}"
 
 PACKAGECONFIG ??= " \
     ${GSTREAMER_ORC} \
@@ -32,7 +33,7 @@  PACKAGECONFIG ??= " \
 "
 
 OPENGL_APIS = 'opengl gles2'
-OPENGL_PLATFORMS = 'egl'
+OPENGL_PLATFORMS = 'egl glx'
 
 X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
 X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
@@ -61,6 +62,7 @@  PACKAGECONFIG[gles2]        = ",,virtual/libgles2"
 
 # OpenGL platform packageconfigs
 PACKAGECONFIG[egl]          = ",,virtual/egl"
+PACKAGECONFIG[glx]          = ",,virtual/libgl"
 
 # OpenGL window systems (except for X11)
 PACKAGECONFIG[gbm]          = ",,virtual/libgbm libgudev libdrm"