meson: gl: fix build of openglmixers plugin
authorTim-Philipp Müller <tim@centricular.com>
Tue, 19 Dec 2017 17:34:50 +0000 (17:34 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 19 Dec 2017 17:34:50 +0000 (17:34 +0000)
ext/gl/meson.build
ext/meson.build
meson.build

index dbc696c..90a4bdb 100644 (file)
@@ -5,13 +5,14 @@ opengl_sources = [
   'gstglmixer.c',
   'gstglvideomixer.c',
   'gstglstereomix.c',
+  'gstglutils.c',
 ]
 
 if build_gstgl and gstgl_dep.found()
   optional_deps = []
-  opengl_defines = []
+  opengl_defines = ['-DGST_USE_UNSTABLE_API'] # for videoaggregator
 
-  if gl_dep.found() # have desktop GL
+  if gst_gl_have_api_opengl # have desktop GL
     opengl_sources += [
       'gstglmosaic.c',
     ]
@@ -22,14 +23,6 @@ if build_gstgl and gstgl_dep.found()
     optional_deps += x11_dep
   endif
 
-  if bcm_host_dep.found()
-    optional_deps += bcm_host_dep
-  endif
-
-  if egl_dep.found() and cc.has_header('libdrm/drm_fourcc.h', required : false)
-    optional_deps += gstallocators_dep
-  endif
-
   gstopenglmixers = library('gstopenglmixers',
     opengl_sources,
     c_args : gst_plugins_bad_args + opengl_defines,
index 7267c5b..d4730b7 100644 (file)
@@ -15,7 +15,7 @@ subdir('faad')
 subdir('fdkaac')
 subdir('flite')
 subdir('fluidsynth')
-#subdir('gl') # FIXME: re-enable for gl mixers
+subdir('gl')
 #subdir('gme')
 subdir('gsm')
 subdir('gtk')
index 646234c..4dca0ed 100644 (file)
@@ -331,16 +331,19 @@ build_gstgl = gstgl_dep.found() # FIXME: add option?
 
 if build_gstgl
   if gstgl_dep.type_name() == 'pkgconfig'
-    gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys')
-    gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms')
+    gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis').split()
+    gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split()
+    gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms').split()
   else
     gstbase = subproject('gst-plugins-base')
-    gst_gl_winsys = ' '.join(gstbase.get_variable('enabled_gl_winsys'))
-    gst_gl_platforms = ' '.join(gstbase.get_variable('enabled_gl_platforms'))
+    gst_gl_apis = gstbase.get_variable('enabled_gl_apis')
+    gst_gl_winsys = gstbase.get_variable('enabled_gl_winsys')
+    gst_gl_platforms = gstbase.get_variable('enabled_gl_platforms')
   endif
 
-  message('GStreamer OpenGL window systems: ' + gst_gl_winsys)
-  message('GStreamer OpenGL platforms: ' + gst_gl_platforms)
+  message('GStreamer OpenGL window systems: @0@'.format(' '.join(gst_gl_winsys)))
+  message('GStreamer OpenGL platforms: @0@'.format(' '.join(gst_gl_platforms)))
+  message('GStreamer OpenGL apis: @0@'.format(' '.join(gst_gl_apis)))
 
   foreach ws : ['x11', 'wayland', 'android', 'cocoa', 'eagl', 'win32', 'dispmanx', 'viv_fb']
     set_variable('gst_gl_have_window_@0@'.format(ws), gst_gl_winsys.contains(ws))
@@ -349,6 +352,10 @@ if build_gstgl
   foreach p : ['glx', 'egl', 'cgl', 'eagl', 'wgl']
     set_variable('gst_gl_have_platform_@0@'.format(p), gst_gl_platforms.contains(p))
   endforeach
+
+  foreach api : ['opengl', 'gles2']
+    set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api))
+  endforeach
 endif
 
 libm = cc.find_library('m', required : false)