Patchwork gst-plugins-gl: make it work for both openGL and openGL ESv2

login
register
mail settings
Submitter Koen Kooi
Date April 25, 2013, 9:32 a.m.
Message ID <1366882349-22368-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/48857/
State New
Headers show

Comments

Koen Kooi - April 25, 2013, 9:32 a.m.
Those are mutually exclusive, but PACKAGECONFIG doesn't seem to handle that yet, so use this slightly ugly construct.

Tested on FRI2/angstrom and Minnowboard/angstrom. 'glimagesink' and 'glupload' work, but anything else (filters, gldownload) will throw an FBO error. This is most likely a problem with the EMGD drivers.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Ross Burton - April 25, 2013, 10:12 a.m.
On 25 April 2013 10:32, Koen Kooi <koen@dominion.thruhere.net> wrote:
> -DEPENDS += "gst-plugins-base virtual/libgles2 virtual/egl jpeg"
> +DEPENDS += "gst-plugins-base"

This "jpeg" dependency disappeared, was this intentional?

Ross
Koen Kooi - April 25, 2013, 10:18 a.m.
Op 25 apr. 2013, om 12:12 heeft "Burton, Ross" <ross.burton@intel.com> het volgende geschreven:

> On 25 April 2013 10:32, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> -DEPENDS += "gst-plugins-base virtual/libgles2 virtual/egl jpeg"
>> +DEPENDS += "gst-plugins-base"
> 
> This "jpeg" dependency disappeared, was this intentional?


AArgh! no!

Patch

diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb
index a6c74fb..7cf87e5 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb
@@ -8,15 +8,13 @@  SRC_URI[sha256sum] = "48340b6a4b8abce16344a7bc33e74a94fdcce4f57ef6342cdf2f941c42
 
 SRC_URI += " file://0001-conditional-gl-framebuffer-undefined-use.patch"
 
-DEPENDS += "gst-plugins-base virtual/libgles2 virtual/egl jpeg"
+DEPENDS += "gst-plugins-base"
 
 inherit gettext gconf
 
-# This package doesn't have a configure switch for EGL or GL, so forcibly tell
-# configure that it can't find gl.h so it always uses EGL.  If/when we have some
-# way for machines to specify their preferred GL flavour this can be
-# automatically adapted.
-EXTRA_OECONF += "ac_cv_header_GL_gl_h=no"
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'opengl', 'opengl', 'openglesv2', d)}"
+PACKAGECONFIG[opengl] = ",ac_cv_header_GL_gl_h=no,virtual/libgl glew"
+PACKAGECONFIG[openglesv2] = "ac_cv_header_GL_gl_h=no,,virtual/libgles2 virtual/egl"
 
 ALLOW_EMPTY_${PN} = "1"
 ALLOW_EMPTY_${PN}-apps = "1"