diff mbox series

[1/1] package/gstreamer1: gl enabled when either GL or GLES2 is present

Message ID 20190808113631.21408-1-cturner@igalia.com
State Accepted
Headers show
Series [1/1] package/gstreamer1: gl enabled when either GL or GLES2 is present | expand

Commit Message

Charlie Turner Aug. 8, 2019, 11:36 a.m. UTC
When building gst1-plugins-base with GL support on the rpi3 (which
supports only GLES2, not full desktop GL), GStreamer was being asked to
disable its GL support completely. This isn't correct since it can be
used with either GL or GLES2.

Signed-off-by: Charlie Turner <cturner@igalia.com>
---
 .../gstreamer1/gst1-plugins-base/gst1-plugins-base.mk    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Adrian Perez de Castro Aug. 8, 2019, 11:51 a.m. UTC | #1
Hello Charlie,

Thanks for the quick update, patch looks all good to me 👍

On Thu,  8 Aug 2019 12:36:31 +0100, Charlie Turner <cturner@igalia.com> wrote:
> When building gst1-plugins-base with GL support on the rpi3 (which
> supports only GLES2, not full desktop GL), GStreamer was being asked to
> disable its GL support completely. This isn't correct since it can be
> used with either GL or GLES2.
> 
> Signed-off-by: Charlie Turner <cturner@igalia.com>

Reviewed-By: Adrian Perez de Castro <aperez@igalia.com>

> ---
>  .../gstreamer1/gst1-plugins-base/gst1-plugins-base.mk    | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
> index 66c136c36c..e80b301b82 100644
> --- a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
> +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
> @@ -38,12 +38,15 @@ else
>  GST1_PLUGINS_BASE_CONF_OPTS += -Dorc=disabled
>  endif
>  
> +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL)$(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2),)
> +GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled
> +else
> +GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=enabled
> +endif
> +
>  ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL),y)
>  GST1_PLUGINS_BASE_GL_API_LIST = opengl
> -GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=enabled
>  GST1_PLUGINS_BASE_DEPENDENCIES += libgl libglu
> -else
> -GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled
>  endif
>  
>  ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2),y)
> -- 
> 2.17.1

Cheers,
—Adrián
Arnout Vandecappelle Oct. 11, 2019, 10:04 p.m. UTC | #2
Hi Charlie,

On 08/08/2019 13:36, Charlie Turner wrote:
> When building gst1-plugins-base with GL support on the rpi3 (which
> supports only GLES2, not full desktop GL), GStreamer was being asked to
> disable its GL support completely. This isn't correct since it can be
> used with either GL or GLES2.
> 
> Signed-off-by: Charlie Turner <cturner@igalia.com>

 I *finally* applied to master, thanks.

> ---
>  .../gstreamer1/gst1-plugins-base/gst1-plugins-base.mk    | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
> index 66c136c36c..e80b301b82 100644
> --- a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
> +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
> @@ -38,12 +38,15 @@ else
>  GST1_PLUGINS_BASE_CONF_OPTS += -Dorc=disabled
>  endif
>  
> +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL)$(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2),)

 Instead of this, I refactored it using the
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API option, which is selected by
those two. It has exactly the same effect and is much easer to read.

> +GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled
> +else
> +GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=enabled
> +endif
> +
>  ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL),y)

... and I also moved these two conditions under the _API condition, so it's
clear that it all belongs together.

 Regards,
 Arnout

>  GST1_PLUGINS_BASE_GL_API_LIST = opengl
> -GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=enabled
>  GST1_PLUGINS_BASE_DEPENDENCIES += libgl libglu
> -else
> -GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled
>  endif
>  
>  ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2),y)
>
Peter Korsgaard Oct. 29, 2019, 8:04 a.m. UTC | #3
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 >  Hi Charlie,
 > On 08/08/2019 13:36, Charlie Turner wrote:
 >> When building gst1-plugins-base with GL support on the rpi3 (which
 >> supports only GLES2, not full desktop GL), GStreamer was being asked to
 >> disable its GL support completely. This isn't correct since it can be
 >> used with either GL or GLES2.
 >> 
 >> Signed-off-by: Charlie Turner <cturner@igalia.com>

 >  I *finally* applied to master, thanks.

Committed to 2019.08.x, thanks. 2019.02.x uses an older gstreamer1 /
autotools, so it isn't (directly) applicable.
diff mbox series

Patch

diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
index 66c136c36c..e80b301b82 100644
--- a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
+++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk
@@ -38,12 +38,15 @@  else
 GST1_PLUGINS_BASE_CONF_OPTS += -Dorc=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL)$(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2),)
+GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled
+else
+GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=enabled
+endif
+
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL),y)
 GST1_PLUGINS_BASE_GL_API_LIST = opengl
-GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=enabled
 GST1_PLUGINS_BASE_DEPENDENCIES += libgl libglu
-else
-GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled
 endif
 
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2),y)