package/gstreamer1: gl enabled when either GL or GLES2 is present
authorCharlie Turner <cturner@igalia.com>
Thu, 25 Jul 2019 11:42:25 +0000 (12:42 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Fri, 11 Oct 2019 21:58:41 +0000 (23:58 +0200)
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. There is already a Config.in symbol to
indicate that either of them is enabled:
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API. So use that to
determine if gl should be enabled or disabled.

While we're at it, also move the GL/GLES handling under the same API
condition. This makes it clearer that they belong together.

Signed-off-by: Charlie Turner <cturner@igalia.com>
Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
[Arnout: refactor using
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk

index 91b5637316005698b601afaa99d508e69325616c..21a29cbea23a8ffcf6bb704b2507c589cae388ea 100644 (file)
@@ -38,18 +38,19 @@ else
 GST1_PLUGINS_BASE_CONF_OPTS += -Dorc=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API),y)
+GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=enabled
 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)
 GST1_PLUGINS_BASE_GL_API_LIST += gles2
 GST1_PLUGINS_BASE_DEPENDENCIES += libgles
 endif
+else
+GST1_PLUGINS_BASE_CONF_OPTS += -Dgl=disabled
+endif
 GST1_PLUGINS_BASE_CONF_OPTS += -Dgl_api='$(subst $(space),$(comma),$(GST1_PLUGINS_BASE_GL_API_LIST))'
 
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLX),y)