summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-08-12 21:21:45 +0530
committerTim-Philipp Müller <tim@centricular.com>2016-08-20 11:35:54 +0100
commit42af2d66d8e4aa73c38be07c8460397adf21ce30 (patch)
tree59b54f11f5aacc7ca331b913a6e2c30260865873 /ext
parent7e2b68fe2f22b4f12d876aa9385f594244a631b8 (diff)
downloadgstreamer-plugins-bad-42af2d66d8e4aa73c38be07c8460397adf21ce30.tar.gz
Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson With contributions from: Tim-Philipp Müller <tim@centricular.com> Matej Knopp <matej.knopp@gmail.com> Jussi Pakkanen <jpakkane@gmail.com> (original port) Highlights of the features provided are: * Faster builds on Linux (~40-50% faster) * The ability to build with MSVC on Windows * Generate Visual Studio project files * Generate XCode project files * Much faster builds on Windows (on-par with Linux) * Seriously fast configure and building on embedded ... and many more. For more details see: http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html Building with Meson should work on both Linux and Windows, but may need a few more tweaks on other operating systems.
Diffstat (limited to 'ext')
-rw-r--r--ext/assrender/meson.build13
-rw-r--r--ext/bz2/meson.build18
-rw-r--r--ext/chromaprint/meson.build12
-rw-r--r--ext/curl/meson.build24
-rw-r--r--ext/dash/meson.build20
-rw-r--r--ext/directfb/meson.build12
-rw-r--r--ext/dtls/meson.build25
-rw-r--r--ext/dts/meson.build17
-rw-r--r--ext/faac/meson.build12
-rw-r--r--ext/faad/meson.build21
-rw-r--r--ext/flite/meson.build30
-rw-r--r--ext/fluidsynth/meson.build12
-rw-r--r--ext/hls/meson.build38
-rw-r--r--ext/kate/meson.build24
-rw-r--r--ext/libde265/meson.build17
-rw-r--r--ext/libmms/meson.build13
-rw-r--r--ext/meson.build72
-rw-r--r--ext/mpg123/meson.build16
-rw-r--r--ext/openh264/meson.build20
-rw-r--r--ext/openjpeg/meson.build33
-rw-r--r--ext/opus/meson.build20
-rw-r--r--ext/resindvd/meson.build27
-rw-r--r--ext/rsvg/meson.build18
-rw-r--r--ext/rtmp/meson.build18
-rw-r--r--ext/sbc/meson.build18
-rw-r--r--ext/schroedinger/meson.build20
-rw-r--r--ext/smoothstreaming/meson.build20
-rw-r--r--ext/soundtouch/meson.build32
-rw-r--r--ext/spandsp/meson.build22
-rw-r--r--ext/srtp/meson.build34
-rwxr-xr-xext/srtp/srtp_mkenum.py55
-rw-r--r--ext/voaacenc/meson.build15
-rw-r--r--ext/webp/meson.build18
-rw-r--r--ext/x265/meson.build11
-rw-r--r--ext/zbar/meson.build11
35 files changed, 788 insertions, 0 deletions
diff --git a/ext/assrender/meson.build b/ext/assrender/meson.build
new file mode 100644
index 000000000..7db70adf5
--- /dev/null
+++ b/ext/assrender/meson.build
@@ -0,0 +1,13 @@
+ass_dep = dependency('libass', version : '>= 0.10.2', required : false)
+
+if ass_dep.found()
+ gstassrender = library('gstassrender',
+ 'gstassrender.c',
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, ass_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/bz2/meson.build b/ext/bz2/meson.build
new file mode 100644
index 000000000..f80d787e5
--- /dev/null
+++ b/ext/bz2/meson.build
@@ -0,0 +1,18 @@
+bz2_sources = [
+ 'gstbz2.c',
+ 'gstbz2dec.c',
+ 'gstbz2enc.c',
+]
+
+bz2_dep = cc.find_library('bz2', required : false)
+
+if bz2_dep.found() and cc.has_header_symbol('bzlib.h', 'BZ2_bzlibVersion')
+ gstbz2 = library('gstbz2',
+ bz2_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, bz2_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/chromaprint/meson.build b/ext/chromaprint/meson.build
new file mode 100644
index 000000000..265f4a630
--- /dev/null
+++ b/ext/chromaprint/meson.build
@@ -0,0 +1,12 @@
+chromaprint_dep = dependency('libchromaprint', required : false)
+
+if chromaprint_dep.found()
+ gstchromaprint = library('gstchromaprint',
+ 'gstchromaprint.c',
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep, chromaprint_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/curl/meson.build b/ext/curl/meson.build
new file mode 100644
index 000000000..bf9eb7e8d
--- /dev/null
+++ b/ext/curl/meson.build
@@ -0,0 +1,24 @@
+curl_sources = [
+ 'gstcurlbasesink.c',
+ 'gstcurl.c',
+ 'gstcurlfilesink.c',
+ 'gstcurlftpsink.c',
+ 'gstcurlhttpsink.c',
+ 'gstcurlsftpsink.c',
+ 'gstcurlsmtpsink.c',
+ 'gstcurlsshsink.c',
+ 'gstcurltlssink.c',
+]
+
+curl_dep = dependency('libcurl', version : '>= 7.35.0', required : false)
+
+if curl_dep.found()
+ gstcurl = library('gstcurl',
+ curl_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstbase_dep, curl_dep] + winsock2,
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/dash/meson.build b/ext/dash/meson.build
new file mode 100644
index 000000000..8d31bc375
--- /dev/null
+++ b/ext/dash/meson.build
@@ -0,0 +1,20 @@
+dash_sources = [
+ 'gstdashdemux.c',
+ 'gstisoff.c',
+ 'gstmpdparser.c',
+ 'gstplugin.c',
+]
+
+xml2_dep = dependency('libxml-2.0', version : '>= 2.8', required : false)
+if xml2_dep.found()
+ gstsouphttpsrc = library('gstdashdemux',
+ dash_sources,
+ c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
+ link_args : noseh_link_args,
+ include_directories : [configinc, libsinc],
+ dependencies : [gstadaptivedemux_dep, gsturidownloader_dep, gsttag_dep,
+ gstnet_dep, gstbase_dep, gio_dep, xml2_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/directfb/meson.build b/ext/directfb/meson.build
new file mode 100644
index 000000000..6f110207e
--- /dev/null
+++ b/ext/directfb/meson.build
@@ -0,0 +1,12 @@
+directfb_dep = dependency('directfb', version : '>= 0.9.24', required : false)
+
+if directfb_dep.found()
+ gstdirectfb = library('gstdirectfb',
+ 'dfbvideosink.c',
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, directfb_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/dtls/meson.build b/ext/dtls/meson.build
new file mode 100644
index 000000000..1ce99dcbd
--- /dev/null
+++ b/ext/dtls/meson.build
@@ -0,0 +1,25 @@
+dtls_sources = [
+ 'gstdtlsagent.c',
+ 'gstdtlscertificate.c',
+ 'gstdtlsconnection.c',
+ 'gstdtlsdec.c',
+ 'gstdtlsenc.c',
+ 'gstdtlssrtpbin.c',
+ 'gstdtlssrtpdec.c',
+ 'gstdtlssrtpdemux.c',
+ 'gstdtlssrtpenc.c',
+ 'plugin.c',
+]
+
+libcrypto_dep = dependency('libcrypto', required : false)
+
+if openssl_dep.found() and libcrypto_dep.found()
+ gstdtls = library('gstdtls',
+ dtls_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gst_dep, libcrypto_dep, openssl_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/dts/meson.build b/ext/dts/meson.build
new file mode 100644
index 000000000..882a6aa89
--- /dev/null
+++ b/ext/dts/meson.build
@@ -0,0 +1,17 @@
+dca_dep = dependency('libdca', required : false)
+
+if not dca_dep.found() and cc.has_header_symbol('dca.h', 'dca_init')
+ dca_dep = cc.find_library('dca', required : false)
+endif
+
+if dca_dep.found()
+ gstdtsdec = library('gstdtsdec',
+ 'gstdtsdec.c',
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc, libsinc],
+ dependencies : [gstaudio_dep, orc_dep, dca_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/faac/meson.build b/ext/faac/meson.build
new file mode 100644
index 000000000..f9f3cad64
--- /dev/null
+++ b/ext/faac/meson.build
@@ -0,0 +1,12 @@
+faac_dep = cc.find_library('faac', required : false)
+
+if faac_dep.found() and cc.has_header_symbol('faac.h', 'faacEncOpen')
+ gstfaac = library('gstfaac',
+ 'gstfaac.c',
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep, gstpbutils_dep, gsttag_dep, faac_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/faad/meson.build b/ext/faad/meson.build
new file mode 100644
index 000000000..2d3ff9ada
--- /dev/null
+++ b/ext/faad/meson.build
@@ -0,0 +1,21 @@
+faad_args = [ ]
+
+have_faad = cc.has_header_symbol('neaacdec.h', 'NeAACDecOpen')
+have_faad_2_7 = have_faad and cc.has_header_symbol('neaacdec.h', 'LATM')
+if have_faad and not have_faad_2_7
+ message('Found faad2, but too old (< v2.7.0)')
+endif
+
+faad_dep = cc.find_library('faad', required : false)
+
+if faad_dep.found() and have_faad_2_7
+ gstfaad = library('gstfaad',
+ 'gstfaad.c',
+ c_args : gst_plugins_bad_args + [ '-DFAAD2_MINOR_VERSION=7', '-DFAAD_IS_NEAAC' ],
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep, gstpbutils_dep, gsttag_dep, faad_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/flite/meson.build b/ext/flite/meson.build
new file mode 100644
index 000000000..6d1226f52
--- /dev/null
+++ b/ext/flite/meson.build
@@ -0,0 +1,30 @@
+flite_sources = [
+ 'gstflite.c',
+ 'gstflitetestsrc.c',
+]
+
+flite_libs = [
+ 'flite',
+ 'flite_cmu_us_kal',
+ 'flite_usenglish',
+ 'flite_cmulex'
+]
+
+flite_deps = [ ]
+foreach flite_lib : flite_libs
+ flite_lib_dep = cc.find_library(flite_lib, required : false)
+ if flite_lib_dep.found()
+ flite_deps += [flite_lib_dep]
+ endif
+endforeach
+
+if flite_deps.length() == flite_libs.length() and cc.has_header_symbol('flite/flite.h', 'flite_init')
+ gstflite = library('gstflite',
+ flite_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep] + flite_deps,
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/fluidsynth/meson.build b/ext/fluidsynth/meson.build
new file mode 100644
index 000000000..d732b93d1
--- /dev/null
+++ b/ext/fluidsynth/meson.build
@@ -0,0 +1,12 @@
+fluidsynth_dep = dependency('fluidsynth', version : '>= 1.0', required : false)
+
+if fluidsynth_dep.found()
+ gstfluidsynth = library('gstfluidsynth',
+ 'gstfluiddec.c',
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep, gst_dep, fluidsynth_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/hls/meson.build b/ext/hls/meson.build
new file mode 100644
index 000000000..081a0968a
--- /dev/null
+++ b/ext/hls/meson.build
@@ -0,0 +1,38 @@
+hls_sources = [
+ 'gsthlsdemux.c',
+ 'gsthlsdemux-util.c',
+ 'gsthlsplugin.c',
+ 'gsthlssink.c',
+ 'gstm3u8playlist.c',
+ 'm3u8.c',
+]
+
+hls_cargs = ['-DGST_USE_UNSTABLE_API']
+
+# FIXME: Add an option for selecting the library, and fail if it's not found
+hls_crypto_dep = dependency('nettle', required : false)
+if hls_crypto_dep.found()
+ hls_cargs += ['-DHAVE_NETTLE']
+else
+ hls_crypto_dep = cc.find_library('gcrypt', required : false)
+ if hls_crypto_dep.found()
+ hls_cargs += ['-DHAVE_LIBGCRYPT']
+ else
+ hls_crypto_dep = openssl_dep
+ if hls_crypto_dep.found()
+ hls_cargs += ['-DHAVE_OPENSSL']
+ endif
+ endif
+endif
+
+gsthls = library('gsthls',
+ hls_sources,
+ c_args : gst_plugins_bad_args + hls_cargs,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstpbutils_dep, gsttag_dep, gstvideo_dep,
+ gstadaptivedemux_dep, gsturidownloader_dep,
+ hls_crypto_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/ext/kate/meson.build b/ext/kate/meson.build
new file mode 100644
index 000000000..ac055f2be
--- /dev/null
+++ b/ext/kate/meson.build
@@ -0,0 +1,24 @@
+kate_sources = [
+ 'gstkate.c',
+ 'gstkatedec.c',
+ 'gstkateenc.c',
+ 'gstkateparse.c',
+ 'gstkatetag.c',
+ 'gstkateutil.c',
+ 'gstkatespu.c',
+]
+
+kate_dep = dependency('kate', version : '>=0.1.7', required : false)
+# Not used
+#tiger_dep = dependency('tiger', version : '>=0.3.2', required : false)
+
+if kate_dep.found()
+ gstkate = library('gstkate',
+ kate_sources,
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstbase_dep, gstvideo_dep, gsttag_dep, kate_dep],
+ install : true,
+ install_dir : plugins_install_dir)
+endif
diff --git a/ext/libde265/meson.build b/ext/libde265/meson.build
new file mode 100644
index 000000000..b8dd98110
--- /dev/null
+++ b/ext/libde265/meson.build
@@ -0,0 +1,17 @@
+de265_sources = [
+ 'gstlibde265.c',
+ 'libde265-dec.c',
+]
+
+de265_dep = dependency('libde265', version : '>= 0.9', required : false)
+
+if de265_dep.found()
+ gstde265 = library('gstde265',
+ de265_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, de265_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/libmms/meson.build b/ext/libmms/meson.build
new file mode 100644
index 000000000..23b00b5c5
--- /dev/null
+++ b/ext/libmms/meson.build
@@ -0,0 +1,13 @@
+mms_dep = dependency('libmms', version : '>= 0.4', required : false)
+
+if mms_dep.found()
+ gstmms = library('gstmms',
+ 'gstmms.c',
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstbase_dep, mms_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/meson.build b/ext/meson.build
new file mode 100644
index 000000000..1809645b9
--- /dev/null
+++ b/ext/meson.build
@@ -0,0 +1,72 @@
+#subdir('apexsink')
+subdir('assrender')
+#subdir('bs2b')
+subdir('bz2')
+subdir('chromaprint')
+subdir('curl')
+#subdir('daala')
+subdir('dash')
+#subdir('dc1394')
+subdir('directfb')
+subdir('dtls')
+subdir('dts')
+subdir('faac')
+subdir('faad')
+subdir('flite')
+subdir('fluidsynth')
+#subdir('gl')
+#subdir('gme')
+#subdir('gsm')
+#subdir('gtk')
+subdir('hls')
+subdir('kate')
+#subdir('ladspa')
+subdir('libde265')
+subdir('libmms')
+#subdir('libvisual')
+#subdir('lv2')
+#subdir('mimic')
+#subdir('modplug')
+#subdir('mpeg2enc')
+#subdir('mplex')
+#subdir('musepack')
+#subdir('nas')
+#subdir('neon')
+#subdir('ofa')
+#subdir('openal')
+#subdir('opencv')
+#subdir('openexr')
+subdir('openh264')
+subdir('openjpeg')
+#subdir('openni2')
+subdir('opus')
+#subdir('qt')
+subdir('resindvd')
+subdir('rsvg')
+subdir('rtmp')
+subdir('sbc')
+subdir('schroedinger')
+#subdir('sdl')
+subdir('smoothstreaming')
+#subdir('sndfile')
+#subdir('sndio')
+if cc.get_id() != 'msvc'
+ # soundtouch doesn't do exporting of symbols for DLLs and I'm not sure how to
+ # do that for C++ classes. -- Nirbheek
+ subdir('soundtouch')
+ # libspandsp has a bunch of portability issues in the headers
+ # If someone really wants to use this, it shouldn't be hard to port
+ subdir('spandsp')
+endif
+#subdir('spc')
+subdir('srtp')
+#subdir('teletextdec')
+#subdir('timidity')
+subdir('voaacenc')
+#subdir('voamrwbenc')
+#subdir('wayland')
+#subdir('webrtcdsp')
+subdir('webp')
+subdir('x265')
+#subdir('xvid')
+subdir('zbar')
diff --git a/ext/mpg123/meson.build b/ext/mpg123/meson.build
new file mode 100644
index 000000000..d4e16c9e7
--- /dev/null
+++ b/ext/mpg123/meson.build
@@ -0,0 +1,16 @@
+mpg123_sources = [
+ 'gstmpg123audiodec.c',
+]
+
+mpg123_dep = dependency('libmpg123', version : '>= 1.3', required : false)
+
+if mpg123_dep.found()
+ gstmpg123 = library('gstmpg123',
+ mpg123_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep, mpg123_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/openh264/meson.build b/ext/openh264/meson.build
new file mode 100644
index 000000000..666887afe
--- /dev/null
+++ b/ext/openh264/meson.build
@@ -0,0 +1,20 @@
+openh264_sources = [
+ 'gstopenh264dec.cpp',
+ 'gstopenh264enc.cpp',
+ 'gstopenh264plugin.c',
+]
+
+openh264_dep = dependency('openh264', version : '>= 1.3.0', required : false)
+
+# FIXME: check if C++ compiler is available via new add_languages() semantics in meson git (~v30)
+if openh264_dep.found()
+ gstopenh264 = library('gstopenh264',
+ openh264_sources,
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, openh264_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/openjpeg/meson.build b/ext/openjpeg/meson.build
new file mode 100644
index 000000000..d60974ce7
--- /dev/null
+++ b/ext/openjpeg/meson.build
@@ -0,0 +1,33 @@
+openjpeg_sources = [
+ 'gstopenjpeg.c',
+ 'gstopenjpegdec.c',
+ 'gstopenjpegenc.c',
+]
+
+openjpeg_cargs = []
+
+# Check for 2.1, then 2.0
+openjpeg_dep = dependency('libopenjp2', version : '>=2.1', required : false)
+if openjpeg_dep.found()
+ openjpeg_cargs += ['-DHAVE_OPENJPEG_2_1']
+else
+ openjpeg_dep = dependency('libopenjp2', required : false)
+ # Fallback to 1.5
+ if not openjpeg_dep.found()
+ openjpeg_dep = dependency('libopenjpeg1', required : false)
+ openjpeg_cargs += ['-DHAVE_OPENJPEG_1']
+ endif
+endif
+
+if openjpeg_dep.found()
+ gstopenjpeg = library('gstopenjpeg',
+ openjpeg_sources,
+ c_args : gst_plugins_bad_args + openjpeg_cargs,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gst_dep, gstvideo_dep, openjpeg_dep,
+ gstcodecparsers_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/opus/meson.build b/ext/opus/meson.build
new file mode 100644
index 000000000..22ee796e2
--- /dev/null
+++ b/ext/opus/meson.build
@@ -0,0 +1,20 @@
+opus_sources = [
+ 'gstopus.c',
+ 'gstopusheader.c',
+ 'gstopusparse.c',
+]
+
+opus_dep = dependency('opus', version : '>= 0.9.4', required : false)
+
+if opus_dep.found()
+ gstopus = library('gstopusparse',
+ opus_sources,
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstrtp_dep, gstpbutils_dep, gstaudio_dep,
+ gsttag_dep, opus_dep, libm],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/resindvd/meson.build b/ext/resindvd/meson.build
new file mode 100644
index 000000000..7c5ef963f
--- /dev/null
+++ b/ext/resindvd/meson.build
@@ -0,0 +1,27 @@
+resindvd_sources = [
+ 'gstmpegdemux.c',
+ 'gstmpegdesc.c',
+ 'gstpesfilter.c',
+ 'plugin.c',
+ 'resindvdbin.c',
+ 'resindvdsrc.c',
+ 'rsndec.c',
+ 'rsninputselector.c',
+ 'rsnparsetter.c',
+]
+
+dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : false)
+dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : false)
+
+if dvdnav_dep.found() and dvdread_dep.found()
+ gstresindvd = library('gstresindvd',
+ resindvd_sources,
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc, libsinc],
+ dependencies : [gstvideo_dep, gstpbutils_dep, gsttag_dep,
+ dvdnav_dep, dvdread_dep, gmodule_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/rsvg/meson.build b/ext/rsvg/meson.build
new file mode 100644
index 000000000..a78deb4ac
--- /dev/null
+++ b/ext/rsvg/meson.build
@@ -0,0 +1,18 @@
+rsvg_sources = [
+ 'gstrsvg.c',
+ 'gstrsvgdec.c',
+ 'gstrsvgoverlay.c',
+]
+
+rsvg_dep = dependency('librsvg-2.0', version : '>= 2.36.2', required : false)
+if rsvg_dep.found()
+ gstrsvg = library('gstrsvg',
+ rsvg_sources,
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, rsvg_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/rtmp/meson.build b/ext/rtmp/meson.build
new file mode 100644
index 000000000..2c7cce22a
--- /dev/null
+++ b/ext/rtmp/meson.build
@@ -0,0 +1,18 @@
+rtmp_sources = [
+ 'gstrtmp.c',
+ 'gstrtmpsink.c',
+ 'gstrtmpsrc.c',
+]
+
+rtmp_dep = dependency('librtmp', required : false)
+
+if rtmp_dep.found()
+ gstrtmp = library('gstrtmp',
+ rtmp_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstbase_dep, rtmp_dep] + winsock2,
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/sbc/meson.build b/ext/sbc/meson.build
new file mode 100644
index 000000000..e20d8ed5f
--- /dev/null
+++ b/ext/sbc/meson.build
@@ -0,0 +1,18 @@
+sbc_sources = [
+ 'sbc-plugin.c',
+ 'gstsbcdec.c',
+ 'gstsbcenc.c',
+]
+
+sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
+
+if sbc_dep.found()
+ gstsbc = library('gstsbc',
+ sbc_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep, sbc_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/schroedinger/meson.build b/ext/schroedinger/meson.build
new file mode 100644
index 000000000..d37b70fd5
--- /dev/null
+++ b/ext/schroedinger/meson.build
@@ -0,0 +1,20 @@
+schro_sources = [
+ 'gstschro.c',
+ 'gstschrodec.c',
+ 'gstschroenc.c',
+ 'gstschroutils.c',
+]
+
+schro_dep = dependency('schroedinger-1.0', version : '>= 1.0.10', required : false)
+
+if schro_dep.found()
+ gstschro = library('gstschro',
+ schro_sources,
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, schro_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/smoothstreaming/meson.build b/ext/smoothstreaming/meson.build
new file mode 100644
index 000000000..00afda948
--- /dev/null
+++ b/ext/smoothstreaming/meson.build
@@ -0,0 +1,20 @@
+smoothstreaming_sources = [
+ 'gstmssdemux.c',
+ 'gstmssmanifest.c',
+ 'gstsmoothstreaming-plugin.c',
+]
+
+xml28_dep = dependency('libxml-2.0', version : '>= 2.8', required : false)
+
+if xml28_dep.found()
+ gstmss = library('gstsmoothstreaming',
+ smoothstreaming_sources,
+ c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
+ link_args : noseh_link_args,
+ include_directories : [configinc, libsinc],
+ dependencies : [gst_dep, gstadaptivedemux_dep, gstcodecparsers_dep,
+ gsturidownloader_dep, xml28_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/soundtouch/meson.build b/ext/soundtouch/meson.build
new file mode 100644
index 000000000..e4143d8a4
--- /dev/null
+++ b/ext/soundtouch/meson.build
@@ -0,0 +1,32 @@
+soundtouch_sources = [
+ 'plugin.c',
+ 'gstpitch.cc',
+ 'gstbpmdetect.cc',
+]
+
+soundtouch_cargs = ['-DHAVE_SOUNDTOUCH']
+
+soundtouch_dep = dependency('soundtouch', required : false)
+if soundtouch_dep.found()
+ soundtouch_cargs += ['-DHAVE_SOUNDTOUCH_1_4']
+else
+ soundtouch_dep = dependency('soundtouch-1.4', required : false)
+ if soundtouch_dep.found()
+ soundtouch_cargs += ['-DHAVE_SOUNDTOUCH_1_4']
+ else
+ soundtouch_dep = dependency('soundtouch-1.0', required : false)
+ # NOTE: I removed the checks for libSoundTouch.pc and so on.
+ # Add them back once we know which distros use them.
+ endif
+endif
+
+if soundtouch_dep.found()
+ gstsoundtouch = library('gstsoundtouch',
+ soundtouch_sources,
+ c_args : gst_plugins_bad_args + soundtouch_cargs,
+ cpp_args : gst_plugins_bad_args + soundtouch_cargs,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep, soundtouch_dep],
+ install : true,
+ install_dir : plugins_install_dir)
+endif
diff --git a/ext/spandsp/meson.build b/ext/spandsp/meson.build
new file mode 100644
index 000000000..34c9bc841
--- /dev/null
+++ b/ext/spandsp/meson.build
@@ -0,0 +1,22 @@
+spandsp_sources = [
+ 'gstdtmfdetect.c',
+ 'gstdtmfdetect.h',
+ 'gstspandsp.c',
+ 'gstspanplc.c',
+ 'gstspanplc.h',
+ 'gsttonegeneratesrc.c',
+ 'gsttonegeneratesrc.h',
+]
+
+spandsp_dep = dependency('spandsp', version : '>= 0.0.6', required : false)
+
+if spandsp_dep.found()
+ gstspandsp = library('gstspandsp',
+ spandsp_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, spandsp_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/srtp/meson.build b/ext/srtp/meson.build
new file mode 100644
index 000000000..09f511118
--- /dev/null
+++ b/ext/srtp/meson.build
@@ -0,0 +1,34 @@
+srtp_sources = [
+ 'gstsrtp.c',
+ 'gstsrtpdec.c',
+ 'gstsrtpenc.c',
+]
+
+srtp_dep = dependency('libsrtp', required : false)
+if not srtp_dep.found() and cc.has_header_symbol('srtp/srtp.h', 'srtp_init')
+ srtp_dep = cc.find_library('srtp', required : false)
+endif
+
+if srtp_dep.found()
+ mkenums = find_program('srtp_mkenum.py')
+ gstsrtp_h = custom_target('gstsrtpenum_h',
+ output : 'gstsrtp-enumtypes.h',
+ input : 'gstsrtp.h',
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+ gstsrtp_c = custom_target('gstsrtpenum_c',
+ output : 'gstsrtp-enumtypes.c',
+ input : 'gstsrtp.h',
+ depends : [gstsrtp_h],
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+ gstsrtp = library('gstsrtp',
+ srtp_sources, gstsrtp_c, gstsrtp_h,
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstrtp_dep, gstvideo_dep, srtp_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/srtp/srtp_mkenum.py b/ext/srtp/srtp_mkenum.py
new file mode 100755
index 000000000..031c1b958
--- /dev/null
+++ b/ext/srtp/srtp_mkenum.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python3
+
+# This is in its own file rather than inside meson.build
+# because a) mixing the two is ugly and b) trying to
+# make special characters such as \n go through all
+# backends is a fool's errand.
+
+import sys, os, shutil, subprocess
+
+h_array = ['--fhead',
+ "#ifndef __GST_SRTP_ENUM_TYPES_H__\n#define __GST_SRTP_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n",
+ '--fprod',
+ "\n/* enumerations from \"@filename@\" */\n",
+ '--vhead',
+ 'GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
+ '--ftail',
+ 'G_END_DECLS\n\n#endif /* __GST_SRTP_ENUM_TYPES_H__ */',
+ ]
+
+c_array = ['--fhead',
+ "#include \"gstsrtp-enumtypes.h\"\n\n#include \"gstsrtp.h\"",
+ '--fprod',
+ "\n/* enumerations from \"@filename@\" */",
+ '--vhead',
+ "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
+ '--vprod',
+ " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },",
+ '--vtail',
+ " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n",
+ ]
+
+cmd = []
+argn = 1
+# Find the full command needed to run glib-mkenums
+# On UNIX-like, this is just the full path to glib-mkenums
+# On Windows, this is the full path to interpreter + full path to glib-mkenums
+for arg in sys.argv[1:]:
+ cmd.append(arg)
+ argn += 1
+ if arg.endswith('glib-mkenums'):
+ break
+ofilename = sys.argv[argn]
+headers = sys.argv[argn + 1:]
+
+if ofilename.endswith('.h'):
+ arg_array = h_array
+else:
+ arg_array = c_array
+
+cmd_array = cmd + arg_array + headers
+pc = subprocess.Popen(cmd_array, stdout=subprocess.PIPE)
+(stdo, _) = pc.communicate()
+if pc.returncode != 0:
+ sys.exit(pc.returncode)
+open(ofilename, 'wb').write(stdo)
diff --git a/ext/voaacenc/meson.build b/ext/voaacenc/meson.build
new file mode 100644
index 000000000..0f2eec38c
--- /dev/null
+++ b/ext/voaacenc/meson.build
@@ -0,0 +1,15 @@
+voaac_sources = ['gstvoaac.c', 'gstvoaacenc.c']
+
+voaac_dep = dependency('vo-aacenc', required : false)
+
+if voaac_dep.found()
+ gstbz2 = library('gstvoaacenc',
+ voaac_sources,
+ c_args : gst_plugins_bad_args,
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstbase_dep, gstpbutils_dep, gstaudio_dep, voaac_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/webp/meson.build b/ext/webp/meson.build
new file mode 100644
index 000000000..a809e8826
--- /dev/null
+++ b/ext/webp/meson.build
@@ -0,0 +1,18 @@
+webp_sources = [
+ 'gstwebp.c',
+ 'gstwebpdec.c',
+ 'gstwebpenc.c',
+]
+
+webp_dep = dependency('libwebp', version : '>= 0.2.1', required : false)
+
+if webp_dep.found()
+ gstwebp = library('gstwebp',
+ webp_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, webp_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/x265/meson.build b/ext/x265/meson.build
new file mode 100644
index 000000000..10740981f
--- /dev/null
+++ b/ext/x265/meson.build
@@ -0,0 +1,11 @@
+x265_dep = dependency('x265', required: false)
+if x265_dep.found()
+ gstx265 = library('gstx265',
+ 'gstx265enc.c',
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstpbutils_dep, gstvideo_dep, x265_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/zbar/meson.build b/ext/zbar/meson.build
new file mode 100644
index 000000000..738e6d0e7
--- /dev/null
+++ b/ext/zbar/meson.build
@@ -0,0 +1,11 @@
+zbar_dep = dependency('zbar', version : '>= 0.9', required : false)
+if zbar_dep.found()
+ gstzbar = library('gstzbar',
+ 'gstzbar.c',
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [ gstvideo_dep, zbar_dep ],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif