gl: hook up to build system
authorTim-Philipp Müller <tim@centricular.com>
Sun, 10 Dec 2017 20:02:26 +0000 (20:02 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 19 Dec 2017 12:01:48 +0000 (12:01 +0000)
Tests and documentation will follow separately.

The mixer elements in the opengl plugin need to stay
in -bad for now since they use GstVideoAggregator.

https://bugzilla.gnome.org/show_bug.cgi?id=754094

39 files changed:
.gitignore
Makefile.am
configure.ac
ext/Makefile.am
ext/gl/Makefile.am
ext/gl/gstopengl.c
ext/gl/meson.build
ext/meson.build
gst-libs/gst/Makefile.am
gst-libs/gst/gl/Makefile.am
gst-libs/gst/gl/meson.build
gst-libs/gst/meson.build
m4/gst-gl.m4 [new file with mode: 0644]
meson_options.txt
pkgconfig/Makefile.am
pkgconfig/gstreamer-gl-uninstalled.pc.in
pkgconfig/gstreamer-gl.pc.in
pkgconfig/gstreamer-plugins-base-uninstalled.pc.in
pkgconfig/gstreamer-plugins-base.pc.in
pkgconfig/meson.build
po/POTFILES.in
tests/check/Makefile.am
tests/examples/Makefile.am
tests/examples/gl/Makefile.am
tests/examples/gl/clutter/Makefile.am
tests/examples/gl/cocoa/Makefile.am
tests/examples/gl/generic/cube/Makefile.am
tests/examples/gl/generic/cubeyuv/Makefile.am
tests/examples/gl/generic/doublecube/Makefile.am
tests/examples/gl/generic/recordgraphic/Makefile.am
tests/examples/gl/gtk/3dvideo/Makefile.am
tests/examples/gl/gtk/3dvideo/mviewwidget.h
tests/examples/gl/gtk/Makefile.am
tests/examples/gl/gtk/filternovideooverlay/Makefile.am
tests/examples/gl/gtk/filtervideooverlay/Makefile.am
tests/examples/gl/gtk/fxtest/Makefile.am
tests/examples/gl/gtk/switchvideooverlay/Makefile.am
tests/examples/gl/sdl/meson.build
tests/examples/meson.build

index 0027838..8ed46ca 100644 (file)
@@ -43,6 +43,7 @@ Makefile
 *.gir
 *.typelib
 *.gc??
+.dirstamp
 
 /gst-libs/gst/pbutils/gstpluginsbaseversion.h
 /gst-libs/gst/tag/mklangtables
index f5d873e..020e2e6 100644 (file)
@@ -40,6 +40,7 @@ EXTRA_DIST = \
        gst-libs/gst/rtsp/rtsp_mkenum.py \
        gst-libs/gst/tag/tag_mkenum.py \
        gst-libs/gst/video/video_mkenum.py \
+       gst-libs/gst/gl/gstglconfig.h.meson \
        meson_options.txt
 
 DISTCLEANFILES = _stdint.h
index 6e52dbb..7e1dbc0 100644 (file)
@@ -295,6 +295,8 @@ GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
 AC_SUBST(GLIB_PREFIX)
 AC_SUBST(GST_PREFIX)
 
+AG_GST_GL_CHECKS
+
 dnl GTK is optional and only used in examples
 HAVE_GTK=no
 HAVE_GTK_X11=no
@@ -359,6 +361,9 @@ fi
 AM_CONDITIONAL(HAVE_QT, test "x$HAVE_QT" = "xyes")
 AM_CONDITIONAL(HAVE_QT_MOC, test "x$HAVE_QT_MOC" != "xno")
 
+dnl Check for OpenGL example dependencies (clutter, sdl, etc.)
+AG_GST_GL_EXAMPLES_CHECKS
+
 dnl chck for linux headers needed by the joystick seek example
 AC_COMPILE_IFELSE(
 [
@@ -420,10 +425,12 @@ AG_GST_CHECK_GST_DEBUG_DISABLED([NO_WARNINGS="-Wno-unused"], [NO_WARNINGS=""])
 
 dnl define an ERROR_CFLAGS Makefile variable
 dnl -Wformat-nonliteral - see ext/pango/gstclockoverlay.c and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39438
+dnl -Waggregate-return - xcb_intern_atom() returns an aggregate value
+dnl FIXME: -Wformat-nonliteral triggers in gst-libs/gst/gl/gstglcolorconvert.c (should be fixable)
 AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
     -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef
-    -Wwrite-strings -Wformat-nonliteral -Wformat-security
-    -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return
+    -Wwrite-strings -Wformat-security
+    -Winit-self -Wmissing-include-dirs -Waddress
     -Wno-multichar -Wnested-externs $NO_WARNINGS])
 
 dnl define an ERROR_CXXFLAGS Makefile variable
@@ -657,6 +664,18 @@ dnl FIXME : add second check somehow if that is necessary
 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
 
+dnl *** gl ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_GL, true)
+AG_GST_CHECK_FEATURE(GL, [gl elements], gl, [
+  HAVE_GL="no"
+
+  if test x"$USE_OPENGL" = x"yes" -o x"$USE_GLES2" = x"yes"; then
+    HAVE_GL="yes"
+    AG_GST_GL_PLUGIN_CHECKS
+  fi
+])
+
+
 dnl *** ivorbis ***
 dnl AM_PATH_IVORBIS only takes two options
 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
@@ -759,6 +778,7 @@ dnl not building plugins with external dependencies,
 dnl but we still need to set the conditionals
 AM_CONDITIONAL(USE_ALSA, false)
 AM_CONDITIONAL(USE_CDPARANOIA, false)
+AM_CONDITIONAL(USE_GL, false)
 AM_CONDITIONAL(USE_IVORBIS, false)
 AM_CONDITIONAL(USE_LIBVISUAL, false)
 AM_CONDITIONAL(USE_OGG, false)
@@ -890,6 +910,7 @@ sys/xvimage/Makefile
 ext/Makefile
 ext/alsa/Makefile
 ext/cdparanoia/Makefile
+ext/gl/Makefile
 ext/libvisual/Makefile
 ext/ogg/Makefile
 ext/opus/Makefile
@@ -902,6 +923,17 @@ gst-libs/gst/allocators/Makefile
 gst-libs/gst/audio/Makefile
 gst-libs/gst/app/Makefile
 gst-libs/gst/fft/Makefile
+gst-libs/gst/gl/Makefile
+gst-libs/gst/gl/android/Makefile
+gst-libs/gst/gl/cocoa/Makefile
+gst-libs/gst/gl/dispmanx/Makefile
+gst-libs/gst/gl/glprototypes/Makefile
+gst-libs/gst/gl/eagl/Makefile
+gst-libs/gst/gl/egl/Makefile
+gst-libs/gst/gl/wayland/Makefile
+gst-libs/gst/gl/win32/Makefile
+gst-libs/gst/gl/x11/Makefile
+gst-libs/gst/gl/viv-fb/Makefile
 gst-libs/gst/riff/Makefile
 gst-libs/gst/rtp/Makefile
 gst-libs/gst/rtsp/Makefile
@@ -934,6 +966,8 @@ pkgconfig/gstreamer-tag.pc
 pkgconfig/gstreamer-tag-uninstalled.pc
 pkgconfig/gstreamer-video.pc
 pkgconfig/gstreamer-video-uninstalled.pc
+pkgconfig/gstreamer-gl.pc
+pkgconfig/gstreamer-gl-uninstalled.pc
 pkgconfig/gstreamer-plugins-base.pc
 pkgconfig/gstreamer-plugins-base-uninstalled.pc
 tests/Makefile
@@ -946,6 +980,22 @@ tests/examples/dynamic/Makefile
 tests/examples/encoding/Makefile
 tests/examples/fft/Makefile
 tests/examples/gio/Makefile
+tests/examples/gl/Makefile
+tests/examples/gl/generic/Makefile
+tests/examples/gl/generic/cube/Makefile
+tests/examples/gl/generic/doublecube/Makefile
+tests/examples/gl/generic/recordgraphic/Makefile
+tests/examples/gl/generic/cubeyuv/Makefile
+tests/examples/gl/qt/Makefile
+tests/examples/gl/gtk/Makefile
+tests/examples/gl/gtk/fxtest/Makefile
+tests/examples/gl/gtk/3dvideo/Makefile
+tests/examples/gl/gtk/switchvideooverlay/Makefile
+tests/examples/gl/gtk/filternovideooverlay/Makefile
+tests/examples/gl/gtk/filtervideooverlay/Makefile
+tests/examples/gl/cocoa/Makefile
+tests/examples/gl/sdl/Makefile
+tests/examples/gl/clutter/Makefile
 tests/examples/overlay/Makefile
 tests/examples/seek/Makefile
 tests/examples/snapshot/Makefile
index 59fe8e6..c70b212 100644 (file)
@@ -10,6 +10,12 @@ else
 CDPARANOIA_DIR=
 endif
 
+if USE_GL
+GL_DIR=gl
+else
+GL_DIR=
+endif
+
 if USE_LIBVISUAL
 LIBVISUAL_DIR=libvisual
 else
@@ -57,6 +63,7 @@ endif
 SUBDIRS = \
   $(ALSA_DIR) \
   $(CDPARANOIA_DIR) \
+  $(GL_DIR) \
   $(LIBVISUAL_DIR) \
   $(OGG_DIR) \
   $(OPUS_DIR) \
@@ -67,6 +74,7 @@ SUBDIRS = \
 DIST_SUBDIRS = \
   alsa \
   cdparanoia \
+  gl \
   libvisual \
   ogg \
   opus \
index adeadbf..0430a89 100644 (file)
@@ -1,8 +1,17 @@
 plugin_LTLIBRARIES = libgstopengl.la
 
+# These have to stay in -bad until we can move GstVideoAggregator to -base
+#      gstglbasemixer.c
+#      gstglbasemixer.h
+#      gstglmixer.c
+#      gstglmixer.h
+#      gstglstereomix.c
+#      gstglstereomix.h
+#      gstglvideomixer.c
+#      gstglvideomixer.h
+
 libgstopengl_la_SOURCES = \
        gstopengl.c \
-       gstglbasemixer.c \
        gstgluploadelement.c \
        gstgldownloadelement.c \
        gstglcolorconvertelement.c \
@@ -34,20 +43,16 @@ libgstopengl_la_SOURCES = \
        effects/gstgleffectlaplacian.c \
        gstglcolorscale.c \
        gstglcolorbalance.c \
-       gstglmixer.c \
-       gstglvideomixer.c \
        gstglfiltershader.c \
        gstglfilterapp.c \
        gstglviewconvert.c \
        gstglstereosplit.c \
        gstgldeinterlace.c \
-       gstglstereomix.c \
        gltestsrc.c \
        gstgltestsrc.c \
        gstglutils.c
 
 noinst_HEADERS = \
-       gstglbasemixer.h \
        gstgluploadelement.h \
        gstgldownloadelement.h \
        gstglcolorconvertelement.h \
@@ -61,12 +66,9 @@ noinst_HEADERS = \
        effects/gstgleffectssources.h \
        gstglcolorscale.h \
        gstglcolorbalance.h \
-       gstglmixer.h \
-       gstglvideomixer.h \
        gstglfiltershader.h \
        gstglfilterapp.h \
        gstglstereosplit.h \
-       gstglstereomix.h \
        gstgldeinterlace.h \
        gstglviewconvert.h \
        gltestsrc.h \
@@ -75,13 +77,13 @@ noinst_HEADERS = \
 
 # full opengl required
 if USE_OPENGL
+#      gstglmosaic.c
 libgstopengl_la_SOURCES += \
-       gstglfilterglass.c \
-       gstglmosaic.c
+       gstglfilterglass.c
 
+#      gstglmosaic.h
 noinst_HEADERS += \
        gstglfilterglass.h \
-       gstglmosaic.h \
        effects/gstgleffectscurves.h \
        effects/gstgleffectlumatocurve.h
 
@@ -123,35 +125,31 @@ noinst_HEADERS += \
 endif
 
 libgstopengl_la_OBJCFLAGS = \
-       -I$(top_srcdir)/gst-libs \
-       -I$(top_builddir)/gst-libs \
+       $(GST_PLUGINS_BASE_CFLAGS) \
        -fobjc-arc \
        $(GST_OBJCFLAGS) \
        $(GST_BASE_CFLAGS) \
-       $(GST_PLUGINS_BASE_CFLAGS) \
        $(GST_CONTROLLER_CFLAGS) \
        $(GL_OBJCFLAGS)
 
 # check order of CFLAGS and LIBS, shouldn't the order be the other way around
 # (like in AM_CFLAGS)?
 libgstopengl_la_CFLAGS = \
-       -I$(top_srcdir)/gst-libs \
-       -I$(top_builddir)/gst-libs \
-       $(GST_CFLAGS) \
-       $(GST_BASE_CFLAGS) \
        $(GST_PLUGINS_BASE_CFLAGS) \
+       $(GST_BASE_CFLAGS) \
        $(GST_CONTROLLER_CFLAGS) \
+       $(GST_CFLAGS) \
        $(GL_CFLAGS) \
        $(LIBPNG_CFLAGS) \
        $(GRAPHENE_CFLAGS)
 
 libgstopengl_la_LIBADD = \
-       $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
-       $(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_API_VERSION@.la \
+       $(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
        $(GST_BASE_LIBS) \
-       $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
-       -lgstpbutils-$(GST_API_VERSION) \
        $(GST_CONTROLLER_LIBS) \
+       $(GST_LIBS) \
        $(GL_LIBS) \
        $(LIBPNG_LIBS) \
        $(JPEG_LIBS) \
index 93a1473..683ec01 100644 (file)
@@ -43,6 +43,8 @@
 #include "config.h"
 #endif
 
+#undef HAVE_VIDEO_AGGREGATOR_IN_BASE
+
 #include "gstglimagesink.h"
 #include "gstgluploadelement.h"
 #include "gstgldownloadelement.h"
 #include "gstglfilterbin.h"
 #include "gstglsinkbin.h"
 #include "gstglsrcbin.h"
-#include "gstglmixerbin.h"
 
 #include "gstglfiltercube.h"
 #include "gstgleffects.h"
 #include "gstglcolorscale.h"
+
+#ifdef HAVE_VIDEO_AGGREGATOR_IN_BASE
+#include "gstglmixerbin.h"
 #include "gstglvideomixer.h"
+#include "gstglstereomix.h"
+#endif
+
 #include "gstglfiltershader.h"
 #include "gstglfilterapp.h"
 #include "gstglstereosplit.h"
-#include "gstglstereomix.h"
 #include "gstglviewconvert.h"
 #include "gstgltestsrc.h"
 #include "gstgldeinterlace.h"
@@ -76,7 +82,9 @@
 #if GST_GL_HAVE_OPENGL
 #include "gstglfilterglass.h"
 /* #include "gstglfilterreflectedscreen.h" */
+#ifdef HAVE_VIDEO_AGGREGATOR_IN_BASE
 #include "gstglmosaic.h"
+#endif
 #if HAVE_PNG
 #include "gstgldifferencematte.h"
 /* #include "gstglbumper.h" */
@@ -159,11 +167,12 @@ plugin_init (GstPlugin * plugin)
           GST_RANK_NONE, GST_TYPE_GL_SRC_BIN)) {
     return FALSE;
   }
-
+#ifdef HAVE_VIDEO_AGGREGATOR_IN_BASE
   if (!gst_element_register (plugin, "glmixerbin",
           GST_RANK_NONE, GST_TYPE_GL_MIXER_BIN)) {
     return FALSE;
   }
+#endif
 
   if (!gst_element_register (plugin, "glfiltercube",
           GST_RANK_NONE, GST_TYPE_GL_FILTER_CUBE)) {
@@ -189,7 +198,7 @@ plugin_init (GstPlugin * plugin)
           GST_RANK_NONE, GST_TYPE_GL_COLORSCALE)) {
     return FALSE;
   }
-
+#ifdef HAVE_VIDEO_AGGREGATOR_IN_BASE
   if (!gst_element_register (plugin, "glvideomixer",
           GST_RANK_NONE, gst_gl_video_mixer_bin_get_type ())) {
     return FALSE;
@@ -199,6 +208,7 @@ plugin_init (GstPlugin * plugin)
           GST_RANK_NONE, gst_gl_video_mixer_get_type ())) {
     return FALSE;
   }
+#endif
 
   if (!gst_element_register (plugin, "glshader",
           GST_RANK_NONE, gst_gl_filtershader_get_type ())) {
@@ -219,11 +229,12 @@ plugin_init (GstPlugin * plugin)
           GST_RANK_NONE, GST_TYPE_GL_STEREOSPLIT)) {
     return FALSE;
   }
-
+#ifdef HAVE_VIDEO_AGGREGATOR_IN_BASE
   if (!gst_element_register (plugin, "glstereomix",
           GST_RANK_NONE, GST_TYPE_GL_STEREO_MIX)) {
     return FALSE;
   }
+#endif
 
   if (!gst_element_register (plugin, "gltestsrc",
           GST_RANK_NONE, GST_TYPE_GL_TEST_SRC)) {
@@ -251,10 +262,12 @@ plugin_init (GstPlugin * plugin)
     return FALSE;
   }
 #endif
+#ifdef HAVE_VIDEO_AGGREGATOR_IN_BASE
   if (!gst_element_register (plugin, "glmosaic",
           GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
     return FALSE;
   }
+#endif
 #if HAVE_PNG
   if (!gst_element_register (plugin, "gldifferencematte",
           GST_RANK_NONE, gst_gl_differencematte_get_type ())) {
index e7775cb..f78a346 100644 (file)
@@ -1,11 +1,15 @@
+# These have to stay in -bad until we can move GstVideoAggregator to -base
+#  'gstglbasemixer.c',
+#  'gstglmixerbin.c',
+#  'gstglmixer.c',
+#  'gstglvideomixer.c',
+#  'gstglstereomix.c',
 opengl_sources = [
   'gstopengl.c',
-  'gstglbasemixer.c',
   'gstgluploadelement.c',
   'gstgldownloadelement.c',
   'gstglcolorconvertelement.c',
   'gstglfilterbin.c',
-  'gstglmixerbin.c',
   'gstglsinkbin.c',
   'gstglsrcbin.c',
   'gstglimagesink.c',
@@ -32,14 +36,11 @@ opengl_sources = [
   'effects/gstgleffectlaplacian.c',
   'gstglcolorscale.c',
   'gstglcolorbalance.c',
-  'gstglmixer.c',
-  'gstglvideomixer.c',
   'gstglfiltershader.c',
   'gstglfilterapp.c',
   'gstglviewconvert.c',
   'gstglstereosplit.c',
   'gstgldeinterlace.c',
-  'gstglstereomix.c',
   'gltestsrc.c',
   'gstgltestsrc.c',
   'gstglutils.c'
@@ -50,9 +51,10 @@ if build_gstgl and gstgl_dep.found()
   opengl_defines = []
 
   if gl_dep.found() # have desktop GL
+    # These have to stay in -bad until we can move GstVideoAggregator to -base
+    # 'gstglmosaic.c',
     opengl_sources += [
       'gstglfilterglass.c',
-      'gstglmosaic.c',
     ]
   endif
 
@@ -103,16 +105,16 @@ if build_gstgl and gstgl_dep.found()
   endif
 
   if egl_dep.found() and cc.has_header('libdrm/drm_fourcc.h', required : false)
-    optional_deps += gstallocators_dep
+    optional_deps += allocators_dep
   endif
 
   gstopengl = library('gstopengl',
     opengl_sources,
-    c_args : gst_plugins_bad_args + opengl_defines,
+    c_args : gst_plugins_base_args + opengl_defines,
     link_args : noseh_link_args,
     include_directories : [configinc],
-    dependencies : [gstgl_dep, gstbadvideo_dep, gstvideo_dep,
-                    gstbase_dep, gstcontroller_dep, libm] + optional_deps,
+    dependencies : [gstgl_dep, video_dep,
+                    gst_base_dep, gst_controller_dep, libm] + optional_deps,
     install : true,
     install_dir : plugins_install_dir,
   )
index 2a9879a..31c016e 100644 (file)
@@ -1,5 +1,6 @@
 subdir('alsa')
 subdir('cdparanoia')
+subdir('gl')
 if cc.get_id() != 'msvc'
   # libvisual has MinGW-specific headers which are not compatible with MSVC
   # If we want to build this with MSVC, we must build libvisual with it too
index 55fefd8..416e42f 100644 (file)
@@ -1,3 +1,10 @@
+if USE_OPENGL
+GL_DIR = gl
+endif
+if USE_GLES2
+GL_DIR = gl
+endif
+
 SUBDIRS = \
        tag \
        fft \
@@ -9,7 +16,22 @@ SUBDIRS = \
        pbutils \
        riff \
        app \
-       allocators
+       allocators \
+       $(GL_DIR)
+
+DIST_SUBDIRS = \
+       tag \
+       fft \
+       audio \
+       rtp \
+       sdp \
+       rtsp \
+       video \
+       pbutils \
+       riff \
+       app \
+       allocators \
+       gl
 
 noinst_HEADERS = gettext.h gst-i18n-app.h gst-i18n-plugin.h glib-compat-private.h
 
@@ -26,6 +48,8 @@ rtp: audio
 
 sdp: rtp
 
+gl: video allocators
+
 INDEPENDENT_SUBDIRS = \
        tag audio fft video app
 
index 325cde9..cb2d8db 100644 (file)
@@ -80,13 +80,12 @@ noinst_HEADERS = \
 
 
 libgstgl_@GST_API_VERSION@_la_LIBADD = \
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(top_builddir)/gst-libs/gst/allocators/libgstallocators-@GST_API_VERSION@.la \
        $(GMODULE_NO_EXPORT_LIBS) \
-       $(GST_PLUGINS_BASE_LIBS) \
-       -lgstvideo-$(GST_API_VERSION) \
        $(GST_BASE_LIBS) \
        $(GST_LIBS) \
-       $(GL_LIBS) \
-       $(top_builddir)/gst-libs/gst/allocators/libgstbadallocators-@GST_API_VERSION@.la
+       $(GL_LIBS)
 
 if HAVE_WINDOW_WIN32
 SUBDIRS += win32
@@ -139,8 +138,6 @@ nodist_configexecinclude_HEADERS = $(built_sys_header_configure)
 
 libgstgl_@GST_API_VERSION@_la_CFLAGS = \
        -DGST_EXPORTS \
-       -I$(top_srcdir)/gst-libs \
-       -I$(top_builddir)/gst-libs \
        $(GST_PLUGINS_BASE_CFLAGS) \
        $(GST_BASE_CFLAGS) \
        $(GST_CFLAGS) \
index adb2236..9762a09 100644 (file)
@@ -433,7 +433,7 @@ if need_platform_egl != 'no'
     glconf.set10('GST_GL_HAVE_PLATFORM_EGL', 1)
 
     if cc.has_header('libdrm/drm_fourcc.h', required : false)
-      gl_misc_deps += gstallocators_dep
+      gl_misc_deps += allocators_dep
       glconf.set10('GST_GL_HAVE_DMABUF', 1)
     endif
 
@@ -669,12 +669,12 @@ if build_gstgl
 
   gstgl = library('gstgl-' + api_version,
     gl_sources,
-    c_args : gst_plugins_bad_args + gl_cpp_args,
+    c_args : gst_plugins_base_args + gl_cpp_args,
     include_directories : [configinc, libsinc],
     version : libversion,
     soversion : soversion,
     install : true,
-    dependencies : [gstbase_dep, gstvideo_dep, gstbadallocators_dep, gmodule_dep,
+    dependencies : [gst_base_dep, video_dep, allocators_dep, gmodule_dep,
                     gl_lib_deps, gl_platform_deps, gl_winsys_deps, gl_misc_deps])
   gen_sources = []
   if build_gir
@@ -688,7 +688,7 @@ if build_gstgl
       includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
       install : true,
       extra_args : gir_init_section + ['--c-include=gst/gl/gl.h'],
-      dependencies : [gst_dep, gstbase_dep, gstvideo_dep]
+      dependencies : [video_dep, gst_dep, gst_base_dep]
     )
     gen_sources += gl_gir
   endif
@@ -697,5 +697,5 @@ if build_gstgl
   gstgl_dep = declare_dependency(link_with : gstgl,
     include_directories : [libsinc],
     sources: gen_sources,
-    dependencies : [gstbase_dep, gstvideo_dep] + gl_winsys_deps)
+    dependencies : [video_dep, gst_base_dep] + gl_winsys_deps)
 endif
index dad943c..c38fe76 100644 (file)
@@ -9,3 +9,4 @@ subdir('pbutils')
 subdir('riff')
 subdir('app')
 subdir('allocators')
+subdir('gl')
diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
new file mode 100644 (file)
index 0000000..25cedb3
--- /dev/null
@@ -0,0 +1,1087 @@
+dnl --------------------------------------------------------------------------
+dnl GStreamer OpenGL library checks (gst-libs/gst/gl)
+dnl --------------------------------------------------------------------------
+AC_DEFUN([AG_GST_GL_CHECKS],
+[
+dnl define an ERROR_OBJCFLAGS Makefile variable
+dnl FIXME: make check conditional on Apple OS?
+AG_GST_SET_ERROR_OBJCFLAGS($FATAL_WARNINGS, [
+    -Wmissing-declarations -Wredundant-decls
+    -Wwrite-strings -Wformat-nonliteral -Wformat-security
+    -Winit-self -Wmissing-include-dirs -Wno-multichar $NO_WARNINGS])
+
+AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
+
+AM_CONDITIONAL(HAVE_IOS, test "x$HAVE_IOS" = "xyes")
+if test "x$HAVE_IOS" = "xyes"; then
+  AC_DEFINE(HAVE_IOS, 1, [Define if building for Apple iOS])
+fi
+
+dnl *** opengl ***
+AC_ARG_ENABLE([opengl],
+     [  --enable-opengl         Enable Desktop OpenGL support @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_GL=yes ;;
+       no)   NEED_GL=no ;;
+       auto) NEED_GL=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-opengl]) ;;
+     esac],[NEED_GL=auto])
+
+AC_ARG_WITH([opengl-module-name],
+  AS_HELP_STRING([--with-opengl-module-name],[library module name for OpenGL (default: libGL)]))
+if test x$with_opengl_module_name != x; then
+  AC_DEFINE_UNQUOTED(GST_GL_LIBGL_MODULE_NAME, "$with_opengl_module_name", [OpenGL module name])
+fi
+
+AC_ARG_ENABLE([gles2],
+     [  --enable-gles2          Enable OpenGL|ES 2.0 support @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_GLES2=yes ;;
+       no)   NEED_GLES2=no ;;
+       auto) NEED_GLES2=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-gles2]) ;;
+     esac],[NEED_GLES2=auto])
+
+AC_ARG_WITH([gles2-module-name],
+  AS_HELP_STRING([--with-gles2-module-name],[library module name for GLES2 (default: libGLESv2)]))
+if test x$with_gles2_module_name != x; then
+  AC_DEFINE_UNQUOTED(GST_GL_LIBGLESV2_MODULE_NAME, "$with_gles2_module_name", [GLES2 module name])
+fi
+
+AC_ARG_ENABLE([egl],
+     [  --enable-egl            Enable EGL support @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_EGL=yes ;;
+       no)   NEED_EGL=no ;;
+       auto) NEED_EGL=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-egl]) ;;
+     esac],[NEED_EGL=auto])
+
+AC_ARG_WITH([egl-module-name],
+  AS_HELP_STRING([--with-egl-module-name],[library module name for EGL (default: libEGL)]))
+if test x$with_egl_module_name != x; then
+  AC_DEFINE_UNQUOTED(GST_GL_LIBEGL_MODULE_NAME, "$with_egl_module_name", [EGL module name])
+fi
+
+AC_ARG_ENABLE([wgl],
+     [  --enable-wgl            Enable WGL support @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_WGL=yes ;;
+       no)   NEED_WGL=no ;;
+       auto) NEED_WGL=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-wgl]) ;;
+     esac],[NEED_WGL=auto])
+
+AC_ARG_ENABLE([glx],
+     [  --enable-glx            Enable GLX support @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_GLX=yes ;;
+       no)   NEED_GLX=no ;;
+       auto) NEED_GLX=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-glx]) ;;
+     esac],[NEED_GLX=auto])
+
+AC_ARG_ENABLE([cocoa],
+     [  --enable-cocoa          Enable Cocoa support @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_COCOA=yes ;;
+       no)   NEED_COCOA=no ;;
+       auto) NEED_COCOA=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-cocoa]) ;;
+     esac],[NEED_COCOA=auto])
+
+AC_ARG_ENABLE([x11],
+     [  --enable-x11            Enable x11 support @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_X11=yes ;;
+       no)   NEED_X11=no ;;
+       auto) NEED_X11=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-x11]) ;;
+     esac],[NEED_X11=auto])
+
+AC_ARG_ENABLE([wayland],
+     [  --enable-wayland        Enable Wayland support (requires EGL) @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_WAYLAND_EGL=yes ;;
+       no)   NEED_WAYLAND_EGL=no ;;
+       auto) NEED_WAYLAND_EGL=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-wayland]) ;;
+     esac],[NEED_WAYLAND_EGL=auto])
+
+AC_ARG_ENABLE([dispmanx],
+     [  --enable-dispmanx        Enable Dispmanx support (requires EGL) @<:@default=auto@:>@],
+     [case "${enableval}" in
+       yes)  NEED_DISPMANX=yes ;;
+       no)   NEED_DISPMANX=no ;;
+       auto) NEED_DISPMANX=auto ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-dispmanx]) ;;
+     esac],[NEED_DISPMANX=auto])
+
+AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
+save_CPPFLAGS="$CPPFLAGS"
+save_LIBS="$LIBS"
+
+HAVE_GL=no
+HAVE_GLES2=no
+HAVE_GLES3_H=no
+HAVE_WAYLAND_EGL=no
+HAVE_VIV_FB_EGL=no
+HAVE_EGL_RPI=no
+
+case $host in
+  *-mingw32* )
+    LIBS="$LIBS -lgdi32"
+    AG_GST_CHECK_LIBHEADER(GL, opengl32, glTexImage2D,, GL/gl.h)
+    AC_CHECK_HEADER(GL/wglext.h, HAVE_WGLEXT="yes", HAVE_WGLEXT="no", [#include <GL/gl.h>])
+    if test "x$HAVE_WGLEXT" = "xyes"; then
+      HAVE_WGL=yes
+      HAVE_GL=yes
+    fi
+  ;;
+  *)
+    if test "x$NEED_GL" != "xno"; then
+      AG_GST_PKG_CHECK_MODULES(GL, gl)
+      if test "x$HAVE_GL" != "xyes"; then
+        AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
+      fi
+    fi
+    if test "x$NEED_GLES2" != "xno"; then
+      AG_GST_PKG_CHECK_MODULES(GLES2, glesv2)
+      if test "x$HAVE_GLES2" != "xyes"; then
+        AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
+      fi
+      AC_CHECK_HEADER([GLES3/gl3.h], [HAVE_GLES3_H=yes])
+      AS_IF([test "x$HAVE_GLES3_H" == "xyes"],
+            [
+             AC_CHECK_HEADER([GLES3/gl3ext.h], [HAVE_GLES3EXT3_H=yes], [HAVE_GLES3EXT3_H=no], [#include <GLES3/gl3.h>])
+            ])
+    fi
+    if test "x$NEED_EGL" != "xno"; then
+      AG_GST_PKG_CHECK_MODULES(EGL, egl)
+      if test "x$HAVE_EGL" != "xyes"; then
+        AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
+      fi
+    fi
+
+    old_LIBS=$LIBS
+    old_CFLAGS=$CFLAGS
+
+    dnl imx6 / Vivante specifics
+    if test "x$HAVE_EGL" = "xyes"; then
+        AC_CHECK_LIB([EGL], [fbGetDisplay], [HAVE_VIV_FB_EGL=yes])
+    fi
+
+    dnl FIXME: Mali EGL depends on GLESv1 or GLESv2
+    AC_CHECK_HEADER([EGL/fbdev_window.h],
+      [
+        LIBS="$LIBS -lUMP"
+        AC_CHECK_LIB([Mali], [mali_image_create],
+          [
+            LIBS="$LIBS -lMali"
+            AC_CHECK_LIB([GLESv2], [glEnable],
+              [
+                AC_CHECK_HEADER([GLES2/gl2.h],
+                  [
+                    AC_CHECK_LIB([EGL], [eglGetProcAddress],
+                      [
+                        AC_CHECK_HEADER([EGL/egl.h],
+                          [
+                            HAVE_EGL=yes
+                            HAVE_GLES2=yes
+                            EGL_LIBS="-lMali -lUMP"
+                            EGL_CFLAGS=""
+                            AC_DEFINE(USE_EGL_MALI_FB, [1], [Use Mali FB EGL platform])
+                          ])
+                      ])
+                  ])
+              ])
+          ])
+      ])
+
+    dnl FIXME: EGL of RPi depends on GLESv1 or GLESv2
+    dnl FIXME: GLESv2 of RPi depends on EGL... WTF!
+    LIBS="$LIBS -lvcos -lvchiq_arm"
+    AC_CHECK_LIB([bcm_host], [bcm_host_init],
+      [
+        LIBS="$LIBS -lbcm_host"
+        AC_CHECK_HEADER(bcm_host.h,
+          [
+            LIBS="$LIBS -lGLESv2"
+            AC_CHECK_LIB([EGL], [eglGetProcAddress],
+              [
+                LIBS="$LIBS -lEGL"
+                AC_CHECK_HEADER([EGL/egl.h],
+                  [
+                    AC_CHECK_LIB([GLESv2], [glEnable],
+                      [
+                        AC_CHECK_HEADER([GLES2/gl2.h],
+                          [
+                            HAVE_EGL=yes
+                            HAVE_GLES2=yes
+                            HAVE_EGL_RPI=yes
+                            EGL_LIBS="-lbcm_host -lvcos -lvchiq_arm"
+                            EGL_CFLAGS=""
+                            AC_DEFINE(USE_EGL_RPI, [1], [Use RPi platform])
+                          ])
+                      ])
+                  ])
+              ])
+          ])
+      ])
+
+    LIBS=$old_LIBS
+    CFLAGS=$old_CFLAGS
+
+    PKG_CHECK_MODULES(WAYLAND_EGL, wayland-client >= 1.0 wayland-cursor >= 1.0 wayland-egl >= 9.0, HAVE_WAYLAND_EGL=yes, HAVE_WAYLAND_EGL=no)
+
+    # OS X and iOS always have GL available
+    case $host in
+      *-darwin*)
+        if test "x$HAVE_IOS" = "xyes"; then
+          HAVE_GLES2=yes
+        else
+          HAVE_GL=yes
+        fi
+      ;;
+    esac
+  ;;
+esac
+
+CPPFLAGS="$save_CPPFLAGS"
+LIBS="$save_LIBS"
+
+USE_OPENGL=no
+USE_GLES2=no
+USE_GLX=no
+USE_COCOA=no
+USE_WGL=no
+USE_X11=no
+USE_EAGL=no
+GL_LIBS=
+GL_CFLAGS=
+GL_OBJCFLAGS=
+
+dnl Check for what the user asked for and what we could find
+if test "x$HAVE_EGL" = "xno"; then
+  if test "x$NEED_EGL" = "xyes"; then
+    AC_MSG_ERROR([Could not find the required EGL libraries])
+  fi
+fi
+
+if test "x$HAVE_GL" = "xno"; then
+  if test "x$NEED_GL" = "xyes"; then
+    AC_MSG_ERROR([Could not find the required OpenGL libraries])
+  fi
+fi
+
+if test "x$HAVE_GLES2" = "xno"; then
+  if test "x$NEED_GLES2" = "xyes"; then
+    AC_MSG_ERROR([Could not find the required OpenGL|ES 2.0 libraries])
+  fi
+fi
+
+dnl X, GLX and OpenGL
+if test "x$HAVE_X11_XCB" = "xno"; then
+  if test "x$NEED_GLX" = "xyes"; then
+    AC_MSG_ERROR([Building the GLX backend without X11 is unsupported])
+  fi
+  if test "x$NEED_X11" = "xyes"; then
+    AC_MSG_ERROR([Could not find X11 development libraries])
+  fi
+else
+  if test "x$NEED_GL" != "xno"; then
+    if test "x$HAVE_GL" = "xno"; then
+      if test "x$NEED_GLX" = "xyes"; then
+        AC_MSG_ERROR([Building the GLX backend without the OpenGL backend is unsupported])
+      fi
+    else dnl HAVE_GL=yes
+      USE_OPENGL=yes
+      if test "x$NEED_GLX" != "xno"; then
+        USE_GLX=yes
+      fi
+    fi
+  fi
+fi
+
+dnl check for DMABUF support
+HAVE_DRM_FOURCC_HEADER=no
+AC_CHECK_HEADER(libdrm/drm_fourcc.h,
+  HAVE_DRM_FOURCC_HEADER=yes, )
+
+HAVE_GST_ALLOCATORS=no
+PKG_CHECK_MODULES(GST_ALLOCATORS, gstreamer-allocators-1.0,
+  HAVE_GST_ALLOCATORS=yes, )
+
+GST_GL_HAVE_DMABUF=0
+if test "x$HAVE_DRM_FOURCC_HEADER" = "xyes" -a \
+        "x$HAVE_GST_ALLOCATORS" = "xyes" -a \
+        "x$HAVE_EGL" = "xyes"; then
+          GST_GL_HAVE_DMABUF=1
+fi
+
+dnl check for Vivante DirectVIV support
+AC_CHECK_LIB(GLESv2, glTexDirectVIV, [HAVE_VIV_DIRECTVIV=yes], [HAVE_VIV_DIRECTVIV=no])
+
+GST_GL_HAVE_VIV_DIRECTVIV=0
+if test "x$HAVE_VIV_DIRECTVIV" = "xyes"; then
+          GST_GL_HAVE_VIV_DIRECTVIV=1
+fi
+
+dnl check if we can include both GL and GLES2 at the same time
+if test "x$HAVE_GL" = "xyes" -a "x$HAVE_GLES2" = "xyes"; then
+  GLES3_H_DEFINE=0
+  GLES3EXT3_H_DEFINE=0
+  if test "x$HAVE_GLES3_H" == "xyes"; then
+    GLES3_H_DEFINE=1
+  fi
+  if test "x$HAVE_GLES3EXT3_H" == "xyes"; then
+    GLES3EXT3_H_DEFINE=1
+  fi
+  GL_INCLUDES="
+#ifdef __GNUC__
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored \"-Wredundant-decls\"
+#endif
+#ifndef GL_GLEXT_PROTOTYPES
+#define GL_GLEXT_PROTOTYPES 1
+#endif
+# ifdef HAVE_IOS
+#  include <OpenGLES/ES2/gl.h>
+#  include <OpenGLES/ES2/glext.h>
+# else
+#  if $GLES3_H_DEFINE
+#   include <GLES3/gl3.h>
+#   if $GLES3EXT3_H_DEFINE
+#     include <GLES3/gl3ext.h>
+#   endif
+#   include <GLES2/gl2ext.h>
+#  else
+#   include <GLES2/gl2.h>
+#   include <GLES2/gl2ext.h>
+#  endif
+# endif
+# ifdef __APPLE__
+#  include <OpenGL/OpenGL.h>
+#  include <OpenGL/gl.h>
+#  if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+#   define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
+#   include <OpenGL/gl3.h>
+#  endif
+# else
+#  include <GL/gl.h>
+#  if __WIN32__ || _WIN32
+#   include <GL/glext.h>
+#  endif
+# endif
+int main (int argc, char **argv) { return 0; }
+"
+  AC_MSG_CHECKING([whether it is possible to include both GL and GLES2 headers])
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $GL_CFLAGS $GLES2_CFLAGS $WARNING_CFLAGS $ERROR_CFLAGS"
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$GL_INCLUDES]], [[
+    #if !defined(GL_FALSE)
+    #error Failed to include GL headers
+    #endif
+    ]])],[ AC_MSG_RESULT(yes)
+    ],[AC_MSG_RESULT(no)
+    if test "x$NEED_GLES2" = "xyes"; then
+      if test "x$NEED_GL" = "xyes"; then
+        AC_MSG_ERROR([Cannot seem to include both GL and GLES2 headers. Try disabling one API])
+      fi
+      AC_MSG_WARN([Disabling Desktop GL support])
+      HAVE_GL=no
+      USE_OPENGL=no
+    else
+      AC_MSG_WARN([Disabling GL|ES 2.0 support])
+      HAVE_GLES2=no
+      HAVE_GLES3_H=no
+    fi
+  ])
+  CFLAGS="$save_CFLAGS"
+fi
+
+#dnl Check for OpenGL
+echo host is $host
+case $host in
+  *-android*)
+    if test "x$NEED_WGL" = "xyes"; then
+      AC_MSG_ERROR([WGL is not available on Android])
+    fi
+    if test "x$NEED_GLX" = "xyes"; then
+      AC_MSG_ERROR([GLX is not available on Android])
+    fi
+    if test "x$NEED_GL" = "xyes"; then
+      AC_MSG_ERROR([GL is not available on Android])
+    fi
+    if test "x$NEED_X11" = "xyes"; then
+      AC_MSG_ERROR([X11 is not available on Android])
+    fi
+    if test "x$NEED_COCOA" = "xyes"; then
+      AC_MSG_ERROR([Cocoa is not available on Android])
+    fi
+
+    dnl OpenGL|ES 2.0
+    if test "x$HAVE_GLES2" = "xyes"; then
+      if test "x$NEED_GLES2" != "xno"; then
+        GL_LIBS="$GL_LIBS -lGLESv2"
+        USE_GLES2=yes
+      fi
+    fi
+
+    dnl EGL
+    if test "x$HAVE_EGL" = "xyes"; then
+      if test "x$NEED_EGL" != "xno"; then
+        GL_LIBS="$GL_LIBS -lEGL"
+        USE_EGL=yes
+      fi
+    fi
+
+    if test "x$USE_EGL" != "xyes"; then
+      AC_MSG_ERROR([Need EGL on Android])
+    fi
+
+    if test "x$USE_GLES2" != "xyes"; then
+      AC_MSG_ERROR([Need OpenGL|ES 2.0 on Android])
+    fi
+
+    HAVE_WINDOW_ANDROID=yes
+    ;;
+  *-linux* | *-cygwin* | *-solaris* | *-netbsd* | *-freebsd* | *-openbsd* | *-kfreebsd* | *-dragonflybsd* | *-gnu* )
+    if test "x$NEED_WGL" = "xyes"; then
+      AC_MSG_ERROR([WGL is not available on unix])
+    fi
+
+    if test "x$HAVE_X11_XCB" = "xno"; then
+      if test "x$HAVE_WAYLAND_EGL" = "xno"; then
+        AC_MSG_WARN([X or Wayland is required for OpenGL support])
+      fi
+    fi
+
+    dnl check Desktop OpenGL
+    if test "x$HAVE_GL" = "xyes"; then
+      if test "x$NEED_GL" != "xno"; then
+        GL_LIBS="$GL_LIBS -lGL"
+      fi
+    fi
+
+    dnl OpenGL|ES 2.0
+    if test "x$HAVE_GLES2" = "xyes"; then
+      if test "x$NEED_GLES2" != "xno"; then
+        GL_LIBS="$GL_LIBS -lGLESv2"
+        USE_GLES2=yes
+      fi
+    fi
+
+    if test "x$HAVE_X11_XCB" = "xyes" -a "x$HAVE_EGL_RPI" = "xno"; then
+      if test "x$NEED_X11" != "xno"; then
+        GL_LIBS="$GL_LIBS $X11_XCB_LIBS"
+        GL_CFLAGS="$GL_CFLAGS $X11_XCB_CFLAGS"
+        HAVE_WINDOW_X11=yes
+      fi
+    fi
+
+    if test "x$HAVE_WAYLAND_EGL" = "xyes"; then
+      if test "x$NEED_EGL" = "xno" -o "x$HAVE_EGL" = "xno"; then
+        AC_MSG_WARN([EGL is required by the Wayland backend for OpenGL support])
+      else
+        if test "x$NEED_WAYLAND_EGL" != "xno"; then
+          HAVE_WINDOW_WAYLAND=yes
+          GL_LIBS="$GL_LIBS $WAYLAND_EGL_LIBS"
+          GL_CFLAGS="$GL_CFLAGS $WAYLAND_EGL_CFLAGS"
+        fi
+      fi
+    fi
+
+    if test "x$HAVE_VIV_FB_EGL" = "xyes"; then
+      if test "x$NEED_EGL" = "xno" -o "x$HAVE_EGL" = "xno"; then
+        AC_MSG_WARN([EGL is required by the Vivante EGL FB backend])
+      else
+        HAVE_WINDOW_VIV_FB=yes
+        GL_LIBS="$GL_LIBS"
+        GL_CFLAGS="$GL_CFLAGS"
+      fi
+    fi
+
+    if test "x$HAVE_EGL_RPI" = "xyes"; then
+      if test "x$NEED_DISPMANX" != "xno"; then
+        HAVE_WINDOW_DISPMANX=yes
+        USE_EGL=yes
+      fi
+    fi
+
+    dnl EGL
+    if test "x$HAVE_EGL" = "xno"; then
+      if test "x$HAVE_GL" = "xno"; then
+        AC_MSG_WARN([Building requires either EGL or GLX for OpenGL support])
+      fi
+    else
+      if test "x$NEED_EGL" != "xno"; then
+        if test "x$HAVE_WINDOW_WAYLAND" = "xyes" -o "x$HAVE_WINDOW_X11" = "xyes" -o "x$HAVE_WINDOW_DISPMANX" = "xyes" -o "x$HAVE_WINDOW_VIV_FB" = "xyes"; then
+          GL_LIBS="$GL_LIBS -lEGL $EGL_LIBS"
+          GL_CFLAGS="$GL_CFLAGS $EGL_CFLAGS"
+          USE_EGL=yes
+        fi
+      fi
+    fi
+    ;;
+  *-darwin*)
+    if test "x$HAVE_IOS" = "xyes"; then
+      if test "x$NEED_WGL" = "xyes"; then
+        AC_MSG_ERROR([WGL is not available on iOS])
+      fi
+      if test "x$NEED_GLX" = "xyes"; then
+        AC_MSG_ERROR([GLX is not available on iOS])
+      fi
+      if test "x$NEED_GL" = "xyes"; then
+        AC_MSG_ERROR([GL is not available on iOS])
+      fi
+      if test "x$NEED_X11" = "xyes"; then
+        AC_MSG_ERROR([X11 is not available on iOS])
+      fi
+      if test "x$NEED_COCOA" = "xyes"; then
+        AC_MSG_ERROR([Cocoa is not available on iOS])
+      fi
+      if test "x$NEED_EGL" = "xyes"; then
+        AC_MSG_ERROR([EGL is not available on iOS])
+      fi
+
+      GL_LIBS="$LIBS -framework OpenGLES -framework QuartzCore -framework UIKit -framework CoreGraphics -framework CoreFoundation -framework Foundation"
+      GL_CFLAGS="$GL_CFLAGS"
+      USE_GLES2=yes
+      USE_EAGL=yes
+      HAVE_WINDOW_EAGL=yes
+
+      ac_cv_type_GLsizeiptr=yes
+      ac_cv_type_GLintptr=yes
+      ac_cv_type_GLchar=yes
+    else
+      dnl Only osx supports cocoa.
+      if test "x$NEED_WGL" = "xyes"; then
+        AC_MSG_ERROR([WGL is not available on Mac OS X])
+      fi
+
+      if test "x$NEED_COCOA" != "xno"; then
+        GL_LIBS="$LIBS -framework OpenGL -framework Cocoa -framework QuartzCore -framework CoreFoundation"
+        GL_CFLAGS="$GL_CFLAGS"
+        USE_COCOA=yes
+        HAVE_WINDOW_COCOA=yes
+        USE_OPENGL=yes
+      fi
+
+      if test "x$USE_GLX" = "xyes"; then
+        if test "x$HAVE_X11_XCB" = "xyes"; then
+          if test "x$NEED_X11" != "xno"; then
+            GL_LIBS="$GL_LIBS $X11_XCB_LIBS"
+            GL_CFLAGS="$GL_CFLAGS $X11_XCB_CFLAGS"
+            HAVE_WINDOW_X11=yes
+          fi
+        fi
+
+        if test "x$HAVE_GL" = "xyes"; then
+          if test "x$NEED_GL" != "xno"; then
+            GL_LIBS="$GL_LIBS -lGL"
+          fi
+          USE_OPENGL=yes
+        fi
+      fi
+
+      if test "x$HAVE_EGL" = "xyes"; then
+        if test "x$NEED_EGL" != "xno"; then
+          if test "x$HAVE_WINDOW_X11" = "xyes"; then
+            GL_LIBS="$GL_LIBS -lEGL $EGL_LIBS"
+            GL_CFLAGS="$GL_CFLAGS $EGL_CFLAGS"
+            USE_EGL=yes
+          fi
+        fi
+      fi
+
+      dnl OpenGL|ES 2.0
+      if test "x$HAVE_GLES2" = "xyes"; then
+        if test "x$NEED_GLES2" != "xno"; then
+          GL_LIBS="$GL_LIBS -lGLESv2"
+          USE_GLES2=yes
+        fi
+      fi
+    fi
+    ;;
+  *-mingw32*)
+    if test "x$NEED_GLX" = "xyes"; then
+      AC_MSG_ERROR([GLX is not available on Windows])
+    fi
+    if test "x$NEED_GLES2" = "xyes"; then
+      AC_MSG_ERROR([OpenGL|ES 2.0 is not supported on your platform yet])
+    fi
+
+    if test "x$HAVE_GL" = "xyes"; then
+      if test "x$NEED_GL" != "xno"; then
+        if test "x$HAVE_WGL" = "xyes"; then
+          if test "$NEED_WGL" != "xno"; then
+            GL_LIBS="$GL_LIBS -lgdi32 -lopengl32"
+            HAVE_WINDOW_WIN32=yes
+            USE_OPENGL=yes
+            USE_WGL=yes
+          fi
+        fi
+      fi
+    fi
+    ;;
+  *)
+    AC_MSG_WARN([Don't know how to check for OpenGL on your platform.])
+    ;;
+esac
+
+GL_PLATFORMS=
+GL_WINDOWS=
+GL_APIS=
+GL_CONFIG_DEFINES=
+
+dnl APIs
+
+GST_GL_HAVE_OPENGL=0
+GST_GL_HAVE_GLES2=0
+GST_GL_HAVE_GLES3=0
+GST_GL_HAVE_GLES3EXT3_H=0
+
+if test "x$USE_OPENGL" = "xyes"; then
+  GL_APIS="gl $GL_APIS"
+  GST_GL_HAVE_OPENGL=1
+fi
+if test "x$USE_GLES2" = "xyes"; then
+  GL_APIS="gles2 $GL_APIS"
+  GST_GL_HAVE_GLES2=1
+  if test "x$HAVE_GLES3_H" = "xyes"; then
+    GST_GL_HAVE_GLES3=1
+    if test "x$HAVE_GLES3EXT3_H" = "xyes"; then
+      GST_GL_HAVE_GLES3EXT3_H=1
+    fi
+  fi
+fi
+
+GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_OPENGL $GST_GL_HAVE_OPENGL
+#define GST_GL_HAVE_GLES2 $GST_GL_HAVE_GLES2
+#define GST_GL_HAVE_GLES3 $GST_GL_HAVE_GLES3
+#define GST_GL_HAVE_GLES3EXT3_H $GST_GL_HAVE_GLES3EXT3_H
+"
+
+dnl WINDOW's
+
+GST_GL_HAVE_WINDOW_X11=0
+GST_GL_HAVE_WINDOW_COCOA=0
+GST_GL_HAVE_WINDOW_WIN32=0
+GST_GL_HAVE_WINDOW_WAYLAND=0
+GST_GL_HAVE_WINDOW_ANDROID=0
+GST_GL_HAVE_WINDOW_DISPMANX=0
+GST_GL_HAVE_WINDOW_EAGL=0
+GST_GL_HAVE_WINDOW_VIV_FB=0
+
+if test "x$HAVE_WINDOW_X11" = "xyes"; then
+  GL_WINDOWS="x11 $GL_WINDOWS"
+  GST_GL_HAVE_WINDOW_X11=1
+fi
+if test "x$HAVE_WINDOW_COCOA" = "xyes"; then
+  GL_WINDOWS="cocoa $GL_WINDOWS"
+  GST_GL_HAVE_WINDOW_COCOA=1
+fi
+if test "x$HAVE_WINDOW_WIN32" = "xyes"; then
+  GL_WINDOWS="win32 $GL_WINDOWS"
+  GST_GL_HAVE_WINDOW_WIN32=1
+fi
+if test "x$HAVE_WINDOW_WAYLAND" = "xyes"; then
+  GL_WINDOWS="wayland $GL_WINDOWS"
+  GST_GL_HAVE_WINDOW_WAYLAND=1
+fi
+if test "x$HAVE_WINDOW_ANDROID" = "xyes"; then
+  GL_WINDOWS="android $GL_WINDOWS"
+  GST_GL_HAVE_WINDOW_ANDROID=1
+fi
+if test "x$HAVE_WINDOW_DISPMANX" = "xyes"; then
+  GL_WINDOWS="dispmanx $GL_WINDOWS"
+  GST_GL_HAVE_WINDOW_DISPMANX=1
+fi
+if test "x$HAVE_WINDOW_EAGL" = "xyes"; then
+  GL_WINDOWS="eagl $GL_WINDOWS"
+  GST_GL_HAVE_WINDOW_EAGL=1
+fi
+if test "x$HAVE_WINDOW_VIV_FB" = "xyes"; then
+  GL_WINDOWS="viv-fb $GL_WINDOWS"
+  GST_GL_HAVE_WINDOW_VIV_FB=1
+fi
+
+GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_WINDOW_X11 $GST_GL_HAVE_WINDOW_X11
+#define GST_GL_HAVE_WINDOW_COCOA $GST_GL_HAVE_WINDOW_COCOA
+#define GST_GL_HAVE_WINDOW_WIN32 $GST_GL_HAVE_WINDOW_WIN32
+#define GST_GL_HAVE_WINDOW_WAYLAND $GST_GL_HAVE_WINDOW_WAYLAND
+#define GST_GL_HAVE_WINDOW_ANDROID $GST_GL_HAVE_WINDOW_ANDROID
+#define GST_GL_HAVE_WINDOW_DISPMANX $GST_GL_HAVE_WINDOW_DISPMANX
+#define GST_GL_HAVE_WINDOW_EAGL $GST_GL_HAVE_WINDOW_EAGL
+#define GST_GL_HAVE_WINDOW_VIV_FB $GST_GL_HAVE_WINDOW_VIV_FB
+"
+
+dnl PLATFORM's
+
+GST_GL_HAVE_PLATFORM_EGL=0
+GST_GL_HAVE_PLATFORM_GLX=0
+GST_GL_HAVE_PLATFORM_WGL=0
+GST_GL_HAVE_PLATFORM_CGL=0
+GST_GL_HAVE_PLATFORM_EAGL=0
+
+if test "x$USE_EGL" = "xyes"; then
+  GL_PLATFORMS="egl $GL_PLATFORMS"
+  GST_GL_HAVE_PLATFORM_EGL=1
+fi
+if test "x$USE_GLX" = "xyes"; then
+  GL_PLATFORMS="glx $GL_PLATFORMS"
+  GST_GL_HAVE_PLATFORM_GLX=1
+fi
+if test "x$USE_WGL" = "xyes"; then
+  GL_PLATFORMS="wgl $GL_PLATFORMS"
+  GST_GL_HAVE_PLATFORM_WGL=1
+fi
+if test "x$USE_COCOA" = "xyes"; then
+  GL_PLATFORMS="cgl $GL_PLATFORMS"
+  GST_GL_HAVE_PLATFORM_CGL=1
+fi
+if test "x$USE_EAGL" = "xyes"; then
+  GL_PLATFORMS="eagl $GL_PLATFORMS"
+  GST_GL_HAVE_PLATFORM_EAGL=1
+fi
+
+GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_PLATFORM_EGL $GST_GL_HAVE_PLATFORM_EGL
+#define GST_GL_HAVE_PLATFORM_GLX $GST_GL_HAVE_PLATFORM_GLX
+#define GST_GL_HAVE_PLATFORM_WGL $GST_GL_HAVE_PLATFORM_WGL
+#define GST_GL_HAVE_PLATFORM_CGL $GST_GL_HAVE_PLATFORM_CGL
+#define GST_GL_HAVE_PLATFORM_EAGL $GST_GL_HAVE_PLATFORM_EAGL
+"
+
+GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_DMABUF $GST_GL_HAVE_DMABUF
+#define GST_GL_HAVE_VIV_DIRECTVIV $GST_GL_HAVE_VIV_DIRECTVIV
+"
+
+dnl Check for no platforms/window systems
+if test "x$GL_APIS" = "x"; then
+  AC_MSG_WARN([Either OpenGL or OpenGL|ES is required for OpenGL support])
+fi
+if test "x$GL_PLATFORMS" = "x"; then
+  AC_MSG_WARN([Could not find any OpenGL platforms to use such as CGL, WGL or GLX])
+fi
+if test "x$GL_WINDOWS" = "x"; then
+  AC_MSG_WARN([Could not find any window systems to use such as Cocoa, Win32API or X11])
+fi
+
+if test "x$GL_APIS" = "x" -o "x$GL_PLATFORMS" = "x" -o "x$GL_WINDOWS" = "x"; then
+  GL_LIBS=
+  GL_CFLAGS=
+  GL_OBJCFLAGS=
+  USE_OPENGL=no
+  USE_GLES2=no
+  USE_GLX=no
+  USE_EGL=no
+  USE_WGL=no
+  USE_COCOA=no
+  USE_EGL_MALI=no
+  USE_EGL_RPI=no
+  USE_EAGL=no
+
+  HAVE_WINDOW_X11=no
+  HAVE_WINDOW_WIN32=no
+  HAVE_WINDOW_DISPMANX=no
+  HAVE_WINDOW_WAYLAND=no
+  HAVE_WINDOW_ANDROID=no
+  HAVE_WINDOW_COCOA=no
+  HAVE_WINDOW_EAGL=no
+  HAVE_WINDOW_VIV_FB=no
+fi
+
+AC_SUBST(GL_APIS)
+AC_SUBST(GL_PLATFORMS)
+AC_SUBST(GL_WINDOWS)
+AC_SUBST(GL_LIBS)
+AC_SUBST(GL_CFLAGS)
+AC_SUBST(GL_OBJCFLAGS)
+AC_SUBST(USE_OPENGL)
+AC_SUBST(USE_GLES2)
+
+AM_CONDITIONAL(HAVE_WINDOW_X11, test "x$HAVE_WINDOW_X11" = "xyes")
+AM_CONDITIONAL(HAVE_WINDOW_COCOA, test "x$HAVE_WINDOW_COCOA" = "xyes")
+AM_CONDITIONAL(HAVE_WINDOW_WIN32, test "x$HAVE_WINDOW_WIN32" = "xyes")
+AM_CONDITIONAL(HAVE_WINDOW_DISPMANX, test "x$HAVE_WINDOW_DISPMANX" = "xyes")
+AM_CONDITIONAL(HAVE_WINDOW_WAYLAND, test "x$HAVE_WINDOW_WAYLAND" = "xyes")
+AM_CONDITIONAL(HAVE_WINDOW_ANDROID, test "x$HAVE_WINDOW_ANDROID" = "xyes")
+AM_CONDITIONAL(HAVE_WINDOW_EAGL, test "x$HAVE_WINDOW_EAGL" = "xyes")
+AM_CONDITIONAL(HAVE_WINDOW_VIV_FB, test "x$HAVE_WINDOW_VIV_FB" = "xyes")
+
+AM_CONDITIONAL(USE_OPENGL, test "x$USE_OPENGL" = "xyes")
+AM_CONDITIONAL(USE_GLES2, test "x$USE_GLES2" = "xyes")
+AM_CONDITIONAL(USE_GLX, test "x$USE_GLX" = "xyes")
+AM_CONDITIONAL(USE_EGL, test "x$USE_EGL" = "xyes")
+AM_CONDITIONAL(USE_WGL, test "x$USE_WGL" = "xyes")
+AM_CONDITIONAL(USE_COCOA, test "x$USE_COCOA" = "xyes")
+AM_CONDITIONAL(USE_EGL_MALI, test "x$USE_EGL_MALI" = "xyes")
+AM_CONDITIONAL(USE_EGL_RPI, test "x$USE_EGL_RPI" = "xyes")
+AM_CONDITIONAL(USE_EAGL, test "x$USE_EAGL" = "xyes")
+
+AM_CONDITIONAL(HAVE_GST_GL, test "x$USE_OPENGL" = "xyes" -o "x$USE_GLES2" = "xyes")
+
+dnl Check for some types that are not always present
+GL_INCLUDES=""
+if test "x$USE_GLES2" = "xyes"; then
+  GL_INCLUDES="$GL_INCLUDES
+#ifndef GL_GLEXT_PROTOTYPES
+#define GL_GLEXT_PROTOTYPES 1
+#endif
+# ifdef HAVE_IOS
+#  include <OpenGLES/ES2/gl.h>
+#  include <OpenGLES/ES2/glext.h>
+# else
+#  if $GST_GL_HAVE_GLES3
+#   include <GLES3/gl3.h>
+#   if $GST_GL_HAVE_GLES3EXT3_H
+#    include <GLES3/gl3ext.h>
+#   endif
+#   include <GLES2/gl2ext.h>
+#  else
+#   include <GLES2/gl2.h>
+#   include <GLES2/gl2ext.h>
+#  endif
+# endif
+"
+fi
+
+if test "x$USE_OPENGL" = "xyes"; then
+  GL_INCLUDES="$GL_INCLUDES
+# ifdef __APPLE__
+#  include <OpenGL/OpenGL.h>
+#  include <OpenGL/gl.h>
+# else
+#  include <GL/gl.h>
+#  if __WIN32__ || _WIN32
+#   include <GL/glext.h>
+#  endif
+# endif
+"
+fi
+
+GST_GL_HAVE_GLEGLIMAGEOES=0
+GST_GL_HAVE_GLCHAR=0
+GST_GL_HAVE_GLSIZEIPTR=0
+GST_GL_HAVE_GLINTPTR=0
+GST_GL_HAVE_GLSYNC=0
+GST_GL_HAVE_GLUINT64=0
+GST_GL_HAVE_GLINT64=0
+GST_GL_HAVE_EGLATTRIB=0
+
+old_CFLAGS=$CFLAGS
+CFLAGS="$GL_CFLAGS $CFLAGS"
+
+AC_CHECK_TYPES(GLeglImageOES, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLeglImageOES" = "xyes"; then
+  GST_GL_HAVE_GLEGLIMAGEOES=1
+fi
+
+AC_CHECK_TYPES(GLchar, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLchar" = "xyes"; then
+  GST_GL_HAVE_GLCHAR=1
+fi
+
+AC_CHECK_TYPES(GLsizeiptr, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLsizeiptr" = "xyes"; then
+  GST_GL_HAVE_GLSIZEIPTR=1
+fi
+
+AC_CHECK_TYPES(GLintptr, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLintptr" = "xyes"; then
+  GST_GL_HAVE_GLINTPTR=1
+fi
+
+AC_CHECK_TYPES(GLsync, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLsync" = "xyes"; then
+  GST_GL_HAVE_GLSYNC=1
+fi
+
+AC_CHECK_TYPES(GLuint64, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLuint64" = "xyes"; then
+  GST_GL_HAVE_GLUINT64=1
+fi
+
+AC_CHECK_TYPES(GLint64, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLint64" = "xyes"; then
+  GST_GL_HAVE_GLINT64=1
+fi
+
+if test "x$USE_EGL" = "xyes"; then
+  EGL_INCLUDES="$GL_INCLUDES
+  #include <EGL/egl.h>
+  #include <EGL/eglext.h>
+  "
+  AC_CHECK_TYPES(EGLAttrib, [], [], [[$EGL_INCLUDES]])
+  if test "x$ac_cv_type_EGLAttrib" = "xyes"; then
+    GST_GL_HAVE_EGLATTRIB=1
+  fi
+fi
+
+CFLAGS=$old_CFLAGS
+
+GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
+#define GST_GL_HAVE_GLEGLIMAGEOES $GST_GL_HAVE_GLEGLIMAGEOES
+#define GST_GL_HAVE_GLCHAR $GST_GL_HAVE_GLCHAR
+#define GST_GL_HAVE_GLSIZEIPTR $GST_GL_HAVE_GLSIZEIPTR
+#define GST_GL_HAVE_GLINTPTR $GST_GL_HAVE_GLINTPTR
+#define GST_GL_HAVE_GLSYNC $GST_GL_HAVE_GLSYNC
+#define GST_GL_HAVE_GLUINT64 $GST_GL_HAVE_GLUINT64
+#define GST_GL_HAVE_GLINT64 $GST_GL_HAVE_GLINT64
+#define GST_GL_HAVE_EGLATTRIB $GST_GL_HAVE_EGLATTRIB
+"
+
+AC_CONFIG_COMMANDS([gst-libs/gst/gl/gstglconfig.h], [
+       outfile=gstglconfig.h-tmp
+       cat > $outfile <<\_______EOF
+/* gstglconfig.h
+ *
+ * This is a generated file.  Please modify `configure.ac'
+ */
+
+#ifndef __GST_GL_CONFIG_H__
+#define __GST_GL_CONFIG_H__
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+_______EOF
+
+       cat >>$outfile <<_______EOF
+$gl_config_defines
+_______EOF
+
+       cat >>$outfile <<_______EOF
+
+G_END_DECLS
+
+#endif  /* __GST_GL_CONFIG_H__ */
+_______EOF
+
+
+       if cmp -s $outfile gst-libs/gst/gl/gstglconfig.h; then
+          AC_MSG_NOTICE([gst-libs/gst/gl/gstglconfig.h is unchanged])
+         rm -f $outfile
+       else
+         mv $outfile gst-libs/gst/gl/gstglconfig.h
+       fi
+],[
+gl_config_defines='$GL_CONFIG_DEFINES'
+])
+
+])
+
+dnl --------------------------------------------------------------------------
+dnl GStreamer OpenGL plugin-related checks (ext/opengl)
+dnl --------------------------------------------------------------------------
+dnl FIXME: make these checks conditional to the opengl plugin being enabled
+
+AC_DEFUN([AG_GST_GL_PLUGIN_CHECKS],
+[
+
+dnl graphene-1.0 is optional and used in gltransformation
+HAVE_GRAPHENE=NO
+PKG_CHECK_MODULES(GRAPHENE, graphene-1.0 >= 1.4.0, HAVE_GRAPHENE=yes, HAVE_GRAPHENE=no)
+if test "x$HAVE_GRAPHENE" = "xyes"; then
+  AC_DEFINE(HAVE_GRAPHENE, [1] , [Use graphene])
+fi
+AC_SUBST(HAVE_GRAPHENE)
+AC_SUBST(GRAPHENE_LIBS)
+AC_SUBST(GRAPHENE_CFLAGS)
+AM_CONDITIONAL(HAVE_GRAPHENE, test "x$HAVE_GRAPHENE" = "xyes")
+
+dnl Needed by plugins that use g_module_*() API
+dnl FIXME: probably not needed because AG_GST_CHECK_GLIB already includes it?
+PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
+
+dnl libpng is optional
+PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
+if test "x$HAVE_PNG" = "xyes"; then
+  AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
+fi
+AC_SUBST(HAVE_PNG)
+AC_SUBST(LIBPNG_LIBS)
+AC_SUBST(LIBPNG_CFLAGS)
+AM_CONDITIONAL(HAVE_PNG, test "x$HAVE_PNG" = "xyes")
+
+dnl libjpeg is optional
+AC_ARG_WITH(jpeg-mmx, [  --with-jpeg-mmx, path to MMX'ified JPEG library])
+OLD_LIBS="$LIBS"
+if test x$with_jpeg_mmx != x; then
+  LIBS="$LIBS -L$with_jpeg_mmx"
+fi
+AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
+JPEG_LIBS="$LIBS -ljpeg-mmx"
+LIBS="$OLD_LIBS"
+if test x$HAVE_JPEG != xyes; then
+  JPEG_LIBS="-ljpeg"
+  AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
+fi
+
+if test x$HAVE_JPEG = xyes; then
+  AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
+else
+  AC_DEFINE(HAVE_JPEG, [0], [Use libjpeg])
+  JPEG_LIBS=
+fi
+AC_SUBST(JPEG_LIBS)
+AC_SUBST(HAVE_JPEG)
+AM_CONDITIONAL(HAVE_JPEG, test "x$HAVE_JPEG" = "xyes")
+])
+
+dnl --------------------------------------------------------------------------
+dnl GStreamer OpenGL examples-related checks (tests/examples/gl)
+dnl --------------------------------------------------------------------------
+
+AC_DEFUN([AG_GST_GL_EXAMPLES_CHECKS],
+[
+
+dnl clutter is optional and used in examples
+HAVE_CLUTTER=no
+HAVE_CLUTTER_X11=no
+HAVE_CLUTTER_GLX=no
+if test "x$BUILD_EXAMPLES" = "xyes"; then
+  PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= 1.8, HAVE_CLUTTER=yes, HAVE_CLUTTER=no)
+  AC_SUBST(CLUTTER_LIBS)
+  AC_SUBST(CLUTTER_CFLAGS)
+  AC_SUBST(HAVE_CLUTTER)
+
+  PKG_CHECK_MODULES(CLUTTER_GLX, clutter-glx-1.0 >= 1.8, HAVE_CLUTTER_GLX=yes, HAVE_CLUTTER_GLX=no)
+  AC_SUBST(CLUTTER_GLX_LIBS)
+  AC_SUBST(CLUTTER_GLX_CFLAGS)
+  AC_SUBST(HAVE_CLUTTER_GLX)
+
+  PKG_CHECK_MODULES(CLUTTER_X11, clutter-x11-1.0 >= 1.8, HAVE_CLUTTER_X11=yes, HAVE_CLUTTER_X11=no)
+  AC_SUBST(CLUTTER_X11_LIBS)
+  AC_SUBST(CLUTTER_X11_CFLAGS)
+  AC_SUBST(HAVE_CLUTTER_X11)
+fi
+AM_CONDITIONAL(HAVE_CLUTTER, test "x$HAVE_CLUTTER" = "xyes")
+AM_CONDITIONAL(HAVE_CLUTTER_GLX, test "x$HAVE_CLUTTER_GLX" = "xyes")
+AM_CONDITIONAL(HAVE_CLUTTER_X11, test "x$HAVE_CLUTTER_X11" = "xyes")
+
+dnl used in the gl/clutteractor example
+if test "x$BUILD_EXAMPLES" = "xyes"; then
+  PKG_CHECK_MODULES(XCOMPOSITE, xcomposite, HAVE_XCOMPOSITE=yes, HAVE_XCOMPOSITE=no)
+  AC_SUBST(XCOMPOSITE_CFLAGS)
+  AC_SUBST(XCOMPOSITE_LIBS)
+fi
+AM_CONDITIONAL(HAVE_XCOMPOSITE, test "x$HAVE_XCOMPOSITE" = "xyes")
+
+dnl sdl is optional and used in examples
+HAVE_SDL=NO
+if test "x$BUILD_EXAMPLES" = "xyes"; then
+  PKG_CHECK_MODULES(SDL, sdl >= 1.2.0, HAVE_SDL=yes, HAVE_SDL=no)
+  AC_SUBST(SDL_LIBS)
+  AC_SUBST(SDL_CFLAGS)
+  AC_SUBST(SDL_CLUTTER)
+fi
+AM_CONDITIONAL(HAVE_SDL, test "x$HAVE_SDL" = "xyes")
+
+])
index 90cecd6..6bdda4c 100644 (file)
@@ -9,3 +9,10 @@ option('with-package-name', type : 'string',
        description : 'package name to use in plugins')
 option('with-package-origin', type : 'string', value : 'Unknown package origin',
        description : 'package origin URL to use in plugins')
+option('with_gl_api', type : 'string', value : 'auto', description : 'A comma separated list of opengl APIs to enable building against. Supported values are opengl and gles2.')
+option('with_gl_platform', type : 'string', value : 'auto', description : 'A comma separated list of opengl platforms to enable building against. Supported values are glx, egl, cgl, wgl and eagl')
+option('with_gl_winsys', type : 'string', value : 'auto', description : 'A comma separated list of opengl windows systems to enable building against. Supported values are x11, wayland, win32, cocoa, and dispmanx')
+option('with_egl_module_name', type : 'string', value : '', description : 'The file to pass to g_module_open to open the libEGL.so library (default: libEGL.so)')
+option('with_opengl_module_name', type : 'string', value : '', description : 'The file to pass to g_module_open to open the libGL.so library (default: libGL.so)')
+option('with_gles2_module_name', type : 'string', value : '', description : 'The file to pass to g_module_open to open the libGLESv2.so library (default: libGLESv2.so)')
+
index 7fa2365..804a8fd 100644 (file)
@@ -11,6 +11,7 @@ pcverfiles =  \
        gstreamer-sdp-@GST_API_VERSION@.pc \
        gstreamer-tag-@GST_API_VERSION@.pc \
        gstreamer-video-@GST_API_VERSION@.pc \
+       gstreamer-gl-@GST_API_VERSION@.pc \
        gstreamer-plugins-base-@GST_API_VERSION@.pc
 pcverfiles_uninstalled = \
        gstreamer-allocators-@GST_API_VERSION@-uninstalled.pc \
@@ -24,6 +25,7 @@ pcverfiles_uninstalled = \
        gstreamer-sdp-@GST_API_VERSION@-uninstalled.pc \
        gstreamer-tag-@GST_API_VERSION@-uninstalled.pc \
        gstreamer-video-@GST_API_VERSION@-uninstalled.pc \
+       gstreamer-gl-@GST_API_VERSION@-uninstalled.pc \
        gstreamer-plugins-base-@GST_API_VERSION@-uninstalled.pc
 
 all-local: $(pcverfiles) $(pcverfiles_uninstalled)
@@ -50,6 +52,7 @@ cp_verbose_0 = @echo "  CP     $@";
                -e "s|[@]sdplibdir[@]|$(abs_top_builddir)/gst-libs/gst/sdp/.libs|" \
                -e "s|[@]taglibdir[@]|$(abs_top_builddir)/gst-libs/gst/tag/.libs|" \
                -e "s|[@]videolibdir[@]|$(abs_top_builddir)/gst-libs/gst/video/.libs|" \
+               -e "s|[@]gllibdir[@]|$(abs_top_builddir)/gst-libs/gst/gl/.libs|" \
                $< > $@.tmp && mv $@.tmp $@
 
 pkgconfigdir = $(libdir)/pkgconfig
@@ -68,6 +71,7 @@ pcinfiles = \
            gstreamer-sdp.pc.in gstreamer-sdp-uninstalled.pc.in \
            gstreamer-tag.pc.in gstreamer-tag-uninstalled.pc.in \
            gstreamer-video.pc.in gstreamer-video-uninstalled.pc.in \
+           gstreamer-gl.pc.in gstreamer-gl-uninstalled.pc.in \
            gstreamer-plugins-base.pc.in gstreamer-plugins-base-uninstalled.pc.in
 
 DISTCLEANFILES = $(pcinfiles:.in=)
index a426eb4..69e37e3 100644 (file)
@@ -11,7 +11,7 @@ gl_apis=@GL_APIS@
 Name: GStreamer OpenGL Plugins Libraries, Uninstalled
 Description: Streaming media framework, OpenGL plugins libraries, uninstalled
 Version: @VERSION@
-Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
+Requires: gstreamer-video-@GST_API_VERSION@ gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
 
 Libs: -L${libdir} -lgstgl-@GST_API_VERSION@
 Cflags: -I@abs_top_srcdir@/gst-libs -I@abs_top_builddir@/gst-libs @GL_CFLAGS@
index 8e7a303..dc672a9 100644 (file)
@@ -10,7 +10,7 @@ gl_apis=@GL_APIS@
 Name: GStreamer OpenGL Plugins Libraries
 Description: Streaming media framework, OpenGL plugins libraries
 Version: @VERSION@
-Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
+Requires: gstreamer-video-@GST_API_VERSION@ gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
 
 Libs: -L${libdir} -lgstgl-@GST_API_VERSION@
 Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include @GL_CFLAGS@
index d9ff536..34c6181 100644 (file)
@@ -10,7 +10,7 @@ Name: GStreamer Base Plugins Libraries, Uninstalled
 Description: Streaming media framework, base plugins libraries, uninstalled
 Version: @VERSION@
 Requires: gstreamer-@GST_API_VERSION@
-Libs: -L@allocatorslibdir@ -L@applibdir@ -L@audiolibdir@ -L@fftlibdir@ -L@pbutilslibdir@ -L@rifflibdir@ -L@rtplibdir@ -L@rtsplibdir@ -L@sdplibdir@ -L@taglibdir@ -L@videolibdir@
+Libs: -L@allocatorslibdir@ -L@applibdir@ -L@audiolibdir@ -L@fftlibdir@ -L@pbutilslibdir@ -L@rifflibdir@ -L@rtplibdir@ -L@rtsplibdir@ -L@sdplibdir@ -L@taglibdir@ -L@videolibdir@ -L@gllibdir@
 Cflags: -I@abs_top_srcdir@/gst-libs -I@abs_top_builddir@/gst-libs
 
-libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video
+libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video gl
index e817746..a0f15be 100644 (file)
@@ -11,4 +11,4 @@ Version: @VERSION@
 Libs: -L${libdir}
 Cflags: -I${includedir}
 
-libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video
+libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video gl
index e878ad8..7e8dff8 100644 (file)
@@ -22,6 +22,7 @@ pkgconf.set('rtsplibdir', join_paths(meson.build_root(), gst_rtsp.outdir()))
 pkgconf.set('sdplibdir', join_paths(meson.build_root(), gstsdp.outdir()))
 pkgconf.set('taglibdir', join_paths(meson.build_root(), gsttag.outdir()))
 pkgconf.set('videolibdir', join_paths(meson.build_root(), gstvideo.outdir()))
+pkgconf.set('gllibdir', join_paths(meson.build_root(), gstgl.outdir()))
 
 pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
 
@@ -38,9 +39,9 @@ pkg_files = [
   'gstreamer-sdp',
   'gstreamer-tag',
   'gstreamer-video',
+  'gstreamer-gl',
 ]
 
-# FIXME: -uninstalled.pc files (if still needed?)
 foreach p : pkg_files
   infile = p + '.pc.in'
   outfile = p + '-1.0.pc'
index 98690d9..8300e60 100644 (file)
@@ -1,6 +1,7 @@
 ext/alsa/gstalsasink.c
 ext/alsa/gstalsasrc.c
 ext/cdparanoia/gstcdparanoiasrc.c
+ext/gl/gstgltestsrc.c
 ext/ogg/gstoggdemux.c
 gst/encoding/gstencodebin.c
 gst/playback/gstdecodebin2.c
index 5329226..9d5061b 100644 (file)
@@ -674,8 +674,8 @@ GIO_UNIX_2_0_DEFINED=-DHAVE_GIO_UNIX_2_0=1
 endif
 
 pipelines_tcp_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_NET_CFLAGS) $(GIO_CFLAGS) $(GIO_UNIX_2_0_CFLAGS) $(GIO_UNIX_2_0_DEFINED) $(AM_CFLAGS)
-pipelines_tcp_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_NET_LIBS) $(GIO_LIBS) $(LDADD) \
-    $(GIO_UNIX_2_0_LIBS) $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la
+pipelines_tcp_LDADD =  $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la \
+       $(GST_NET_LIBS) $(GIO_LIBS) $(GIO_UNIX_2_0_LIBS) $(LDADD)
 
 pipelines_gio_CFLAGS = $(GIO_CFLAGS) $(AM_CFLAGS)
 pipelines_gio_LDADD = $(GIO_LIBS) $(LDADD)
index 330ea8f..2ee7eb3 100644 (file)
@@ -2,8 +2,14 @@ if HAVE_GTK
 GTK_SUBDIRS = playback seek snapshot
 endif
 
-SUBDIRS = app audio decodebin_next dynamic fft $(GTK_SUBDIRS) gio overlay playrec encoding
-DIST_SUBDIRS = app audio dynamic decodebin_next fft gio playback overlay seek snapshot playrec encoding
+if USE_OPENGL
+GL_DIR=gl
+else
+GL_DIR=
+endif
+
+SUBDIRS = app audio decodebin_next dynamic fft gio $(GL_DIR) $(GTK_SUBDIRS) overlay playrec encoding
+DIST_SUBDIRS = app audio dynamic decodebin_next fft gio gl playback overlay seek snapshot playrec encoding
 
 include $(top_srcdir)/common/parallel-subdirs.mak
 
index b48d592..3acca8f 100644 (file)
@@ -17,7 +17,7 @@ if HAVE_SDL
 SUBDIRS += sdl
 endif
 
-if HAVE_GTK3
+if HAVE_GTK
 SUBDIRS += gtk
 endif
 
index a8e3115..347458f 100644 (file)
@@ -7,13 +7,13 @@ noinst_PROGRAMS += cluttershare
 
 cluttershare_SOURCES = cluttershare.c
 
-cluttershare_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
-    $(GST_CFLAGS) $(GL_CFLAGS) $(CLUTTER_CFLAGS)
-cluttershare_LDADD=$(CLUTTER_LIBS) $(GST_PLUGINS_BASE_LIBS) \
-    $(GST_LIBS) $(GL_LIBS) \
-    -lgstvideo-$(GST_API_VERSION) $(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la
-
+cluttershare_CFLAGS= \
+       $(GST_PLUGINS_BASE_CFLAGS) \
+       $(GST_CFLAGS) $(GL_CFLAGS) $(CLUTTER_CFLAGS)
+cluttershare_LDADD= \
+       $(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS) $(CLUTTER_LIBS)
 endif
 
 
@@ -25,23 +25,27 @@ noinst_PROGRAMS += clutteractor clutteractortee
 
 clutteractor_SOURCES = clutteractor.c
 
-clutteractor_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+clutteractor_CFLAGS= \
+       $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
        $(GL_CFLAGS) $(CLUTTER_CFLAGS) \
        $(CLUTTER_GLX_CFLAGS) $(CLUTTER_X11_CFLAGS) $(XCOMPOSITE_CFLAGS)
-clutteractor_LDADD=$(CLUTTER_LIBS) $(CLUTTER_GLX_LIBS) $(CLUTTER_X11_LIBS) \
-       $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
-       $(GL_LIBS) $(XCOMPOSITE_LIBS) -lgstvideo-$(GST_API_VERSION)
+clutteractor_LDADD= \
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS) \
+       $(CLUTTER_LIBS) $(CLUTTER_GLX_LIBS) $(CLUTTER_X11_LIBS) \
+       $(XCOMPOSITE_LIBS)
 
 clutteractortee_SOURCES = clutteractortee.c
 
-clutteractortee_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+clutteractortee_CFLAGS= \
+       $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
        $(GL_CFLAGS) $(CLUTTER_CFLAGS) \
        $(CLUTTER_GLX_CFLAGS) $(CLUTTER_X11_CFLAGS) $(XCOMPOSITE_CFLAGS)
-clutteractortee_LDADD=$(CLUTTER_LIBS) $(CLUTTER_GLX_LIBS) $(CLUTTER_X11_LIBS) \
-       $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
-       $(GL_LIBS) $(XCOMPOSITE_LIBS) -lgstvideo-$(GST_API_VERSION)
+clutteractortee_LDADD= \
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS) \
+       $(CLUTTER_LIBS) $(CLUTTER_GLX_LIBS) $(CLUTTER_X11_LIBS) \
+       $(XCOMPOSITE_LIBS)
 
 endif
 endif
index 9148f8a..539bece 100755 (executable)
@@ -6,11 +6,11 @@ cocoa_videooverlay_SOURCES = cocoa-videooverlay.m
 
 cocoa_videooverlay_OBJCFLAGS=-Wno-error=unused-command-line-argument \
     -fobjc-arc \
-    -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
     $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
     $(GL_CFLAGS) $(GL_OBJCFLAGS)
 
-cocoa_videooverlay_LDADD=$(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
-    $(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
+cocoa_videooverlay_LDADD= \
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS)
 
 endif
index e1b0cef..a715260 100644 (file)
@@ -3,7 +3,9 @@ noinst_PROGRAMS = cube
 
 cube_SOURCES = main.cpp
 
-cube_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+cube_CXXFLAGS=\
        $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-cube_LDADD=$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
+cube_LDADD=\
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS)
 
index b232871..3b2de1d 100644 (file)
@@ -3,6 +3,8 @@ noinst_PROGRAMS = cubeyuv
 
 cubeyuv_SOURCES = main.cpp
 
-cubeyuv_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+cubeyuv_CXXFLAGS=\
        $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-cubeyuv_LDADD=$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
+cubeyuv_LDADD=\
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS)
index 7f14895..be88856 100644 (file)
@@ -3,7 +3,9 @@ noinst_PROGRAMS = doublecube
 
 doublecube_SOURCES = main.cpp
 
-doublecube_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+doublecube_CXXFLAGS=\
        $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-doublecube_LDADD=$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
+doublecube_LDADD=\
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS)
 
index 6a25c28..23029b5 100644 (file)
@@ -3,7 +3,9 @@ noinst_PROGRAMS = recordgraphic
 
 recordgraphic_SOURCES = main.cpp
 
-recordgraphic_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-       $(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
-recordgraphic_LDADD=$(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_LIBS) $(GL_LIBS)
+recordgraphic_CXXFLAGS=\
+       $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
+recordgraphic_LDADD=\
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS)
 
index 94c8d16..5738e84 100644 (file)
@@ -5,12 +5,12 @@ noinst_HEADERS = mviewwidget.h
 3dvideo_SOURCES = mviewwidget.c main.cpp
 
 3dvideo_CXXFLAGS=$(GST_CXXFLAGS)
+3dvideo_CFLAGS=$(GST_CFLAGS)
 
-3dvideo_CPPFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+3dvideo_CPPFLAGS=\
        $(GST_PLUGINS_BASE_CFLAGS) \
-       $(GL_CFLAGS) $(GTK3_CFLAGS)
+       $(GL_CFLAGS) $(GTK_CFLAGS)
 3dvideo_LDADD=../libgstgtkhelper.la \
-       $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
-       $(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
-       $(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
-
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS) $(GTK_LIBS)
index 81e16a6..7436c3b 100644 (file)
@@ -70,7 +70,7 @@ struct _GstMViewWidgetClass {
   GtkGridClass parent;
 };
 
-GType gst_mview_widget_get_type ();
+GType gst_mview_widget_get_type (void);
 GtkWidget *gst_mview_widget_new (gboolean is_output);
 
 G_END_DECLS
index 5728905..96c6619 100644 (file)
@@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libgstgtkhelper.la
 
 libgstgtkhelper_la_SOURCES = gstgtk.c gstgtk.h
 libgstgtkhelper_la_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-       $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GTK3_CFLAGS)
+       $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
 
 if HAVE_WINDOW_COCOA
 libgstgtkhelper_la_CFLAGS += -x objective-c
index 61526c5..5714774 100644 (file)
@@ -3,16 +3,13 @@ noinst_PROGRAMS = filternovideooverlay
 filternovideooverlay_SOURCES = main.cpp
 
 filternovideooverlay_CXXFLAGS= \
-       -I$(top_srcdir)/gst-libs \
-       -I$(top_builddir)/gst-libs \
        $(GST_PLUGINS_BASE_CFLAGS) \
        $(GST_CXXFLAGS) \
        $(GL_CFLAGS) \
-       $(GTK3_CFLAGS)
+       $(GTK_CFLAGS)
 
 filternovideooverlay_LDADD= \
-       $(GTK3_LIBS) \
-       $(GST_PLUGINS_BASE_LIBS) \
        $(GST_LIBS)  \
-       $(GL_LIBS)
+       $(GL_LIBS) \
+       $(GTK_LIBS)
 
index 301b2aa..975359d 100644 (file)
@@ -2,10 +2,9 @@ noinst_PROGRAMS = filtervideooverlay
 
 filtervideooverlay_SOURCES = main.cpp
 
-filtervideooverlay_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-    $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
-       $(GL_CFLAGS) $(GTK3_CFLAGS)  $(X11_CFLAGS)
+filtervideooverlay_CXXFLAGS=\
+       $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
+       $(GL_CFLAGS) $(GTK_CFLAGS) $(X11_CFLAGS)
 filtervideooverlay_LDADD=../libgstgtkhelper.la \
-       $(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
-       $(GL_LIBS) -lgstvideo-$(GST_API_VERSION) $(X11_LIBS)
-
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS) $(GTK_LIBS) $(X11_LIBS)
index e078906..ff0d3f6 100644 (file)
@@ -3,18 +3,18 @@ noinst_PROGRAMS += pixbufdrop
 
 fxtest_SOURCES = fxtest.c
 
-fxtest_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+fxtest_CFLAGS=\
        $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
-       $(GL_CFLAGS) $(GTK3_CFLAGS) $(X11_CFLAGS)
+       $(GL_CFLAGS) $(GTK_CFLAGS) $(X11_CFLAGS)
 fxtest_LDADD=../libgstgtkhelper.la \
-       $(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)  \
-       $(GL_LIBS) -lgstvideo-$(GST_API_VERSION) $(X11_LIBS)
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS) $(GTK_LIBS) $(X11_LIBS)
 
 pixbufdrop_SOURCES = pixbufdrop.c
 
-pixbufdrop_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+pixbufdrop_CFLAGS=\
        $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
-       $(GL_CFLAGS) $(GTK3_CFLAGS) $(X11_CFLAGS)
+       $(GL_CFLAGS) $(GTK_CFLAGS) $(X11_CFLAGS)
 pixbufdrop_LDADD=../libgstgtkhelper.la \
-       $(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
-       $(GL_LIBS) -lgstvideo-$(GST_API_VERSION) $(X11_LIBS)
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS) $(GTK_LIBS) $(X11_LIBS)
index e6ebf70..94017c3 100644 (file)
@@ -2,10 +2,11 @@ noinst_PROGRAMS = switchvideooverlay
 
 switchvideooverlay_SOURCES = main.cpp
 
-switchvideooverlay_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+switchvideooverlay_CXXFLAGS=\
        $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
-       $(GL_CFLAGS) $(GTK3_CFLAGS) $(X_CFLAGS)
+       $(GL_CFLAGS) $(GTK_CFLAGS) $(X_CFLAGS)
 switchvideooverlay_LDADD=../libgstgtkhelper.la \
-       $(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
-       $(GL_LIBS) -lgstvideo-$(GST_API_VERSION) $(X_LIBS)
+       $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
+       $(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+       $(GST_LIBS) $(GL_LIBS) $(GTK_LIBS) $(X_LIBS)
 
index 49f8ea0..4262210 100644 (file)
@@ -3,10 +3,10 @@ if sdl_dep.found() and build_gstgl
   executable('sdlshare',
     'sdlshare.c',
     install: false,
-    dependencies : [gstbase_dep, gstgl_dep, sdl_dep, gl_dep])
+    dependencies : [gst_base_dep, gstgl_dep, sdl_dep, gl_dep])
 
   executable('sdlshare2',
     'sdlshare2.c',
     install: false,
-    dependencies : [gstbase_dep, gstgl_dep, sdl_dep, gl_dep])
+    dependencies : [gst_base_dep, gstgl_dep, sdl_dep, gl_dep])
 endif
index 58a512d..a3f3f0b 100644 (file)
@@ -11,6 +11,7 @@ subdir('decodebin_next')
 subdir('encoding')
 subdir('fft')
 subdir('gio')
+subdir('gl')
 subdir('overlay')
 subdir('playback')
 subdir('playrec')