Build gst-libav if libav is on the system
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Mon, 29 Aug 2016 14:21:41 +0000 (11:21 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Fri, 9 Sep 2016 11:30:01 +0000 (08:30 -0300)
meson.build
subprojects/gst-libav.wrap [new file with mode: 0644]

index b5c1de2..9709864 100644 (file)
@@ -15,6 +15,29 @@ subprojects = [
     'gst-editing-services'
 ]
 
+# FIXME Remove that check once we have ffmpeg as a gst-libav subproject
+libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100', required: false)
+gst_libav = []
+if libavfilter_dep.found()
+    cc = meson.get_compiler('c')
+    check_ffmpeg_src = '''#include <libavcodec/avcodec.h>
+    #if LIBAVCODEC_VERSION_MICRO >= 100
+    /* FFmpeg uses 100+ as its micro version */
+    #else
+    #error libav provider should be FFmpeg
+    #endif'''
+    if cc.compiles(check_ffmpeg_src, name : 'whether libav is provided by FFmpeg')
+        gst_libav = ['gst-libav']
+    endif
+endif
+
+if gst_libav.length() == 0
+    message('WARNING: gst-libav not built as ffmpeg >= n3.1.2 not found on the system')
+else
+    subprojects += gst_libav
+endif
+
+
 foreach subproj: subprojects
     subproject(subproj, version: gst_version)
 endforeach
diff --git a/subprojects/gst-libav.wrap b/subprojects/gst-libav.wrap
new file mode 100644 (file)
index 0000000..c81501b
--- /dev/null
@@ -0,0 +1,4 @@
+[wrap-git]
+directory=gst-libav
+url=git://anongit.freedesktop.org/gstreamer/gst-libav
+revision=master