From: Nirbheek Chauhan Date: Fri, 12 Aug 2016 15:42:30 +0000 (+0530) Subject: Add support for Meson as alternative/parallel build system X-Git-Tag: 1.19.3~509^2~2596 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b09f478e80d55265f48d7e575e0791c46c2699cd;p=platform%2Fupstream%2Fgstreamer.git Add support for Meson as alternative/parallel build system https://github.com/mesonbuild/meson With contributions from: Tim-Philipp Müller Jussi Pakkanen (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. --- diff --git a/.gitignore b/.gitignore index 81ca9d7..4f84416 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ aclocal.m4 autom4te.cache -config.h* +config.h +config.h.in +config.h-new config.log config.status config.guess @@ -61,3 +63,6 @@ Build /test-driver *.log *.trs + +/build +/subprojects diff --git a/config.h.meson b/config.h.meson new file mode 100644 index 0000000..0e1748b --- /dev/null +++ b/config.h.meson @@ -0,0 +1,427 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#mesondefine AC_APPLE_UNIVERSAL_BUILD + +/* Default audio sink */ +#mesondefine DEFAULT_AUDIOSINK + +/* Default audio source */ +#mesondefine DEFAULT_AUDIOSRC + +/* Default video sink */ +#mesondefine DEFAULT_VIDEOSINK + +/* Default video source */ +#mesondefine DEFAULT_VIDEOSRC + +/* Default visualizer */ +#mesondefine DEFAULT_VISUALIZER + +/* Disable Orc */ +#mesondefine DISABLE_ORC + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#mesondefine ENABLE_NLS + +/* gettext package name */ +#mesondefine GETTEXT_PACKAGE + +/* The GIO library directory. */ +#mesondefine GIO_LIBDIR + +/* The GIO modules directory. */ +#mesondefine GIO_MODULE_DIR + +/* GStreamer API Version */ +#mesondefine GST_API_VERSION + +/* Defined if gcov is enabled to force a rebuild due to config.h changing */ +#mesondefine GST_GCOV_ENABLED + +/* Default errorlevel to use */ +#mesondefine GST_LEVEL_DEFAULT + +/* GStreamer license */ +#mesondefine GST_LICENSE + +/* package name in plugins */ +#mesondefine GST_PACKAGE_NAME + +/* package origin */ +#mesondefine GST_PACKAGE_ORIGIN + +/* GStreamer package release date/time for plugins as YYYY-MM-DD */ +#mesondefine GST_PACKAGE_RELEASE_DATETIME + +/* Define if static plugins should be built */ +#mesondefine GST_PLUGIN_BUILD_STATIC + +/* Define to enable aalib ASCII Art library (used by aasink). */ +#mesondefine HAVE_AALIB + +/* Define to 1 if you have the `asinh' function. */ +#mesondefine HAVE_ASINH + +/* Define to enable bz2 library for matroska . */ +#mesondefine HAVE_BZ2 + +/* Define to enable Cairo graphics rendering and gobject bindings (used by + cairo). */ +#mesondefine HAVE_CAIRO + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#mesondefine HAVE_CFLOCALECOPYCURRENT + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#mesondefine HAVE_CFPREFERENCESCOPYAPPVALUE + +/* Define to 1 if you have the `clock_gettime' function. */ +#mesondefine HAVE_CLOCK_GETTIME + +/* Define to 1 if you have the `cosh' function. */ +#mesondefine HAVE_COSH + +/* Define if the target CPU is an Alpha */ +#mesondefine HAVE_CPU_ALPHA + +/* Define if the target CPU is an ARM */ +#mesondefine HAVE_CPU_ARM + +/* Define if the target CPU is a CRIS */ +#mesondefine HAVE_CPU_CRIS + +/* Define if the target CPU is a CRISv32 */ +#mesondefine HAVE_CPU_CRISV32 + +/* Define if the target CPU is a HPPA */ +#mesondefine HAVE_CPU_HPPA + +/* Define if the target CPU is an x86 */ +#mesondefine HAVE_CPU_I386 + +/* Define if the target CPU is a IA64 */ +#mesondefine HAVE_CPU_IA64 + +/* Define if the target CPU is a M68K */ +#mesondefine HAVE_CPU_M68K + +/* Define if the target CPU is a MIPS */ +#mesondefine HAVE_CPU_MIPS + +/* Define if the target CPU is a PowerPC */ +#mesondefine HAVE_CPU_PPC + +/* Define if the target CPU is a 64 bit PowerPC */ +#mesondefine HAVE_CPU_PPC64 + +/* Define if the target CPU is a S390 */ +#mesondefine HAVE_CPU_S390 + +/* Define if the target CPU is a SPARC */ +#mesondefine HAVE_CPU_SPARC + +/* Define if the target CPU is a x86_64 */ +#mesondefine HAVE_CPU_X86_64 + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#mesondefine HAVE_DCGETTEXT + +/* Define to enable DirectSound plug-in (used by directsoundsink). */ +#mesondefine HAVE_DIRECTSOUND + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_DLFCN_H + +/* define for working do while(0) macros */ +#mesondefine HAVE_DOWHILE_MACROS + +/* Define to enable raw1394 and avc1394 library (used by 1394). */ +#mesondefine HAVE_DV1394 + +/* Define to enable building of experimental plug-ins. */ +#mesondefine HAVE_EXPERIMENTAL + +/* Define to enable building of plug-ins with external deps. */ +#mesondefine HAVE_EXTERNAL + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_FCNTL_H + +/* FIONREAD ioctl found in sys/filio.h */ +#mesondefine HAVE_FIONREAD_IN_SYS_FILIO + +/* FIONREAD ioctl found in sys/ioclt.h */ +#mesondefine HAVE_FIONREAD_IN_SYS_IOCTL + +/* Define to enable FLAC lossless audio (used by flac). */ +#mesondefine HAVE_FLAC + +/* Define to 1 if you have the `fpclass' function. */ +#mesondefine HAVE_FPCLASS + +/* Define if compiler supports gcc inline assembly */ +#mesondefine HAVE_GCC_ASM + +/* Define to enable GDK pixbuf (used by gdkpixbuf). */ +#mesondefine HAVE_GDK_PIXBUF + +/* Define to 1 if you have the `getpagesize' function. */ +#mesondefine HAVE_GETPAGESIZE + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#mesondefine HAVE_GETTEXT + +/* Define to enable Video 4 Linux 2 (used by video4linux2). */ +#mesondefine HAVE_GST_V4L2 + +/* Whether gudev is available for device detection */ +#mesondefine HAVE_GUDEV + +/* Define if you have the iconv() function and it works. */ +#mesondefine HAVE_ICONV + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_INTTYPES_H + +/* building for iOS platofrm */ +#mesondefine HAVE_IOS + +/* Define if we have struct ip_mreqn */ +#mesondefine HAVE_IP_MREQN + +/* Define to 1 if you have the `isinf' function. */ +#mesondefine HAVE_ISINF + +/* Define to enable Jack (used by jack). */ +#mesondefine HAVE_JACK + +/* defined if jack >= 0.120.1 is available */ +#mesondefine HAVE_JACK_0_120_1 + +/* defined if jack >= 1.9.7 is available */ +#mesondefine HAVE_JACK_1_9_7 + +/* Define to enable jpeg library (used by jpeg). */ +#mesondefine HAVE_JPEG + +/* Define to enable libcaca coloured ASCII art (used by cacasink). */ +#mesondefine HAVE_LIBCACA + +/* Define to enable libdv DV demuxer/decoder (used by dv). */ +#mesondefine HAVE_LIBDV + +/* Define to enable Portable Network Graphics library (used by png). */ +#mesondefine HAVE_LIBPNG + +/* Whether libv4l2 is available for video buffer conversion */ +#mesondefine HAVE_LIBV4L2 + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#mesondefine HAVE_MMAP + +/* Use Orc */ +#mesondefine HAVE_ORC + +/* Define to enable OSS audio (used by ossaudio). */ +#mesondefine HAVE_OSS + +/* Define to enable Open Sound System 4 (used by oss4). */ +#mesondefine HAVE_OSS4 + +/* Define if OSS includes are in /machine/ */ +#mesondefine HAVE_OSS_INCLUDE_IN_MACHINE + +/* Define if OSS includes are in / */ +#mesondefine HAVE_OSS_INCLUDE_IN_ROOT + +/* Define if OSS includes are in /sys/ */ +#mesondefine HAVE_OSS_INCLUDE_IN_SYS + +/* Define to enable OSX audio (used by osxaudio). */ +#mesondefine HAVE_OSX_AUDIO + +/* Define to enable OSX video (used by osxvideosink). */ +#mesondefine HAVE_OSX_VIDEO + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_PROCESS_H + +/* Define to enable pulseaudio plug-in (used by pulseaudio). */ +#mesondefine HAVE_PULSE + +/* Define if RDTSC is available */ +#mesondefine HAVE_RDTSC + +/* Define to 1 if you have the `rint' function. */ +#mesondefine HAVE_RINT + +/* Define to enable Shoutcast/Icecast client library (used by shout2). */ +#mesondefine HAVE_SHOUT2 + +/* Define to 1 if you have the `sinh' function. */ +#mesondefine HAVE_SINH + +/* Define to enable soup http client plugin (2.4) (used by souphttpsrc). */ +#mesondefine HAVE_SOUP + +/* Define to enable speex speech codec (used by speex). */ +#mesondefine HAVE_SPEEX + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_STRING_H + +/* Define to enable Sun Audio (used by sunaudio). */ +#mesondefine HAVE_SUNAUDIO + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_SYS_TYPES_H + +/* Define to enable taglib tagging library (used by taglib). */ +#mesondefine HAVE_TAGLIB + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_UNISTD_H + +/* Define if valgrind should be used */ +#mesondefine HAVE_VALGRIND + +/* Defined if the VP8 decoder is available */ +#mesondefine HAVE_VP8_DECODER + +/* Defined if the VP8 encoder is available */ +#mesondefine HAVE_VP8_ENCODER + +/* Defined if the VP9 decoder is available */ +#mesondefine HAVE_VP9_DECODER + +/* Defined if the VP9 encoder is available */ +#mesondefine HAVE_VP9_ENCODER + +/* Define to enable VPX decoder (used by vpx). */ +#mesondefine HAVE_VPX + +/* Define to enable Win32 WaveForm (used by waveformsink). */ +#mesondefine HAVE_WAVEFORM + +/* Define to enable wavpack plug-in (used by wavpack). */ +#mesondefine HAVE_WAVPACK + +/* Define to enable X libraries and plugins (used by ximagesrc). */ +#mesondefine HAVE_X + +/* Define to enable X Shared Memory extension. */ +#mesondefine HAVE_XSHM + +/* Define to enable zlib support for qtdemux/matroska. */ +#mesondefine HAVE_ZLIB + +/* the host CPU */ +#mesondefine HOST_CPU + +/* gettext locale dir */ +#mesondefine LOCALEDIR + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#mesondefine LT_OBJDIR + +/* Name of package */ +#mesondefine PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#mesondefine PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#mesondefine PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#mesondefine PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#mesondefine PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#mesondefine PACKAGE_URL + +/* Define to the version of this package. */ +#mesondefine PACKAGE_VERSION + +/* directory where plugins are located */ +#mesondefine PLUGINDIR + +/* The size of `char', as computed by sizeof. */ +#mesondefine SIZEOF_CHAR + +/* The size of `int', as computed by sizeof. */ +#mesondefine SIZEOF_INT + +/* The size of `long', as computed by sizeof. */ +#mesondefine SIZEOF_LONG + +/* The size of `short', as computed by sizeof. */ +#mesondefine SIZEOF_SHORT + +/* The size of `void*', as computed by sizeof. */ +#mesondefine SIZEOF_VOIDP + +/* defined if speex 1.0.x API detected */ +#mesondefine SPEEX_1_0 + +/* Define to 1 if you have the ANSI C header files. */ +#mesondefine STDC_HEADERS + +/* the target CPU */ +#mesondefine TARGET_CPU + +/* Version number of package */ +#mesondefine VERSION + +/* old wavpack API */ +#mesondefine WAVPACK_OLD_API + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define to 1 if the X Window System is missing or not being used. */ +#mesondefine X_DISPLAY_MISSING diff --git a/ext/cairo/meson.build b/ext/cairo/meson.build new file mode 100644 index 0000000..9601bc7 --- /dev/null +++ b/ext/cairo/meson.build @@ -0,0 +1,13 @@ +cairo_dep = dependency('cairo-gobject', version : '>=1.10.0', required : false) + +if cairo_dep.found() + gstcairo = library('gstcairo', + 'gstcairo.c', 'gstcairooverlay.c', + c_args : gst_plugins_good_args, + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstvideo_dep, cairo_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/dv/meson.build b/ext/dv/meson.build new file mode 100644 index 0000000..dd0aa08 --- /dev/null +++ b/ext/dv/meson.build @@ -0,0 +1,25 @@ +dv_sources = [ + 'gstdv.c', + 'gstdvdec.c', + 'gstdvdemux.c', + 'gstsmptetimecode.c', + 'smpte_test.c', +] + +dv_dep = dependency('libdv', version : '>= 0.100', required : false) + +if dv_dep.found() + gstdv = library('gstdv', + dv_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gsttag_dep, gstaudio_dep, gstvideo_dep, dv_dep], + install : true, + install_dir : plugins_install_dir, + ) + + #executable('smpte_test', + # 'smpte_test.c', 'gstsmptetimecode.c', + # dependencies : [gstbase_dep, gsttag_dep, gstaudio_dep, gstvideo_dep, dv_dep], + # install : false) +endif diff --git a/ext/flac/meson.build b/ext/flac/meson.build new file mode 100644 index 0000000..9b66d16 --- /dev/null +++ b/ext/flac/meson.build @@ -0,0 +1,20 @@ +flac_sources = [ + 'gstflac.c', + 'gstflacdec.c', + 'gstflacenc.c', + 'gstflactag.c', +] + +flac_dep = dependency('flac', version : '>=1.1.4', required : false) + +if flac_dep.found() + gstflac = library('gstflac', + flac_sources, + c_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'], + link_args : noseh_link_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gsttag_dep, gstaudio_dep, flac_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/gdk_pixbuf/meson.build b/ext/gdk_pixbuf/meson.build new file mode 100644 index 0000000..0079a9d --- /dev/null +++ b/ext/gdk_pixbuf/meson.build @@ -0,0 +1,20 @@ +pixbuf_sources = [ + 'gstgdkpixbufdec.c', + 'gstgdkpixbufoverlay.c', + 'gstgdkpixbufplugin.c', + 'gstgdkpixbufsink.c', +] + +gdkpixbuf_dep = dependency('gdk-pixbuf-2.0', version : '>=2.8.0', required : false) + +if gdkpixbuf_dep.found() + gstgdkpixbuf = library('gstgdkpixbuf', + pixbuf_sources, + c_args : gst_plugins_good_args, + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstvideo_dep, gstcontroller_dep, gdkpixbuf_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/jack/meson.build b/ext/jack/meson.build new file mode 100644 index 0000000..1a98a05 --- /dev/null +++ b/ext/jack/meson.build @@ -0,0 +1,20 @@ +jack_sources = [ + 'gstjackaudioclient.c', + 'gstjackaudiosink.c', + 'gstjackaudiosrc.c', + 'gstjack.c', + 'gstjackutil.c', +] + +libjack_dep = dependency('jack', version : '>= 1.9.7', required : false) + +if libjack_dep.found() + gstjack = library('gstjack', + jack_sources, + c_args : gst_plugins_good_args + ['-DHAVE_JACK_1_9_7'], + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstbase_dep, gstaudio_dep, libjack_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/jpeg/meson.build b/ext/jpeg/meson.build new file mode 100644 index 0000000..e3628cb --- /dev/null +++ b/ext/jpeg/meson.build @@ -0,0 +1,19 @@ +jpeg_sources = [ + 'gstjpeg.c', + 'gstjpegenc.c', + 'gstjpegdec.c', +] + +jpeglib = cc.find_library('jpeg', required : false) + +if jpeglib.found() + gstjpeg = library('gstjpeg', + jpeg_sources, + c_args : gst_plugins_good_args, + link_args : noseh_link_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstbase_dep, gstvideo_dep, jpeglib, libm], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/libpng/meson.build b/ext/libpng/meson.build new file mode 100644 index 0000000..7e01e9f --- /dev/null +++ b/ext/libpng/meson.build @@ -0,0 +1,19 @@ +png_sources = [ + 'gstpng.c', + 'gstpngenc.c', + 'gstpngdec.c', +] + +libpng_dep = dependency('libpng', version : '>=1.2', required : false) + +if libpng_dep.found() + gstpng = library('gstpng', + png_sources, + c_args : gst_plugins_good_args, + link_args : noseh_link_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gstvideo_dep, libpng_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/meson.build b/ext/meson.build new file mode 100644 index 0000000..d60e70b --- /dev/null +++ b/ext/meson.build @@ -0,0 +1,23 @@ +# subdir('aalib') +subdir('cairo') +subdir('flac') +subdir('gdk_pixbuf') +subdir('jack') +subdir('jpeg') +# subdir('libcaca') +# FIXME: dv plugin fails to link with msvc, wants pthread.lib +if cc.get_id() != 'msvc' + subdir('dv') +endif +subdir('libpng') +# subdir('raw1394') +subdir('pulse') +subdir('shout2') +subdir('soup') +subdir('speex') +# FIXME: taglib fails to compile and link with msvc +if cc.get_id() != 'msvc' + subdir('taglib') +endif +subdir('vpx') +subdir('wavpack') diff --git a/ext/pulse/meson.build b/ext/pulse/meson.build new file mode 100644 index 0000000..afc95dd --- /dev/null +++ b/ext/pulse/meson.build @@ -0,0 +1,20 @@ +pulse_sources = [ + 'plugin.c', + 'pulsesink.c', + 'pulsesrc.c', + 'pulsedeviceprovider.c', + 'pulseutil.c', +] + +libpulse_dep = dependency('libpulse', version : '>=2.0', required : false) + +if libpulse_dep.found() + gstpulse = library('gstpulse', + pulse_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstbase_dep, gstaudio_dep, gstpbutils_dep, libpulse_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/shout2/meson.build b/ext/shout2/meson.build new file mode 100644 index 0000000..ae77958 --- /dev/null +++ b/ext/shout2/meson.build @@ -0,0 +1,14 @@ +shout2_sources = ['gstshout2.c'] + +shout2_dep = dependency('shout', version : '>= 2.0', required : false) + +if shout2_dep.found() + gstshout2 = library('gstshout2', + shout2_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, shout2_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/soup/meson.build b/ext/soup/meson.build new file mode 100644 index 0000000..ebd7100 --- /dev/null +++ b/ext/soup/meson.build @@ -0,0 +1,25 @@ +soup_sources = [ + 'gstsouphttpsrc.c', + 'gstsouphttpclientsink.c', + 'gstsouputils.c', + 'gstsoup.c', +] + +soup_args = [ + '-DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_48', + '-DSOUP_VERSION_MAX_ALLOWED=SOUP_DEPRECATED_IN_2_48', +] + +libsoup_dep = dependency('libsoup-2.4', version : '>=2.48', required : false) + +if libsoup_dep.found() + gstsouphttpsrc = library('gstsouphttpsrc', + soup_sources, + c_args : gst_plugins_good_args + soup_args, + link_args : noseh_link_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstbase_dep, gsttag_dep, libsoup_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/speex/meson.build b/ext/speex/meson.build new file mode 100644 index 0000000..b682f08 --- /dev/null +++ b/ext/speex/meson.build @@ -0,0 +1,19 @@ +speex_sources = [ + 'gstspeex.c', + 'gstspeexdec.c', + 'gstspeexenc.c', +] + +speex_dep = dependency('speex', version : '>=1.1.6', required : false) + +if speex_dep.found() + gstspeex = library('gstspeex', + speex_sources, + c_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'], + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gsttag_dep, gstaudio_dep, speex_dep, libm], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/taglib/meson.build b/ext/taglib/meson.build new file mode 100644 index 0000000..c0b6a50 --- /dev/null +++ b/ext/taglib/meson.build @@ -0,0 +1,18 @@ +taglib_sources = [ + 'gstapev2mux.cc', + 'gstid3v2mux.cc', + 'gsttaglibplugin.c', +] + +taglib_dep = dependency('taglib', version : '>= 1.5', required : false) + +if taglib_dep.found() and add_languages('cpp') + gsttaglib = library('gsttaglib', + taglib_sources, + c_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'], + include_directories : [configinc, libsinc], + dependencies : [gsttag_dep, taglib_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/vpx/meson.build b/ext/vpx/meson.build new file mode 100644 index 0000000..6a5cc31 --- /dev/null +++ b/ext/vpx/meson.build @@ -0,0 +1,57 @@ +vpx_sources = [ + 'gstvp8dec.c', + 'gstvp8enc.c', + 'gstvp8utils.c', + 'gstvp9dec.c', + 'gstvp9enc.c', + 'gstvpxdec.c', + 'gstvpxenc.c', + 'plugin.c', +] + +vpx_features = [ + [ 'vpx/vp8cx.h', 'vpx_codec_vp8_cx_algo', '-DHAVE_VP8_ENCODER', 'VP8 encoder' ], + [ 'vpx/vp8dx.h', 'vpx_codec_vp8_dx_algo', '-DHAVE_VP8_DECODER', 'VP8 decoder' ], + [ 'vpx/vp8cx.h', 'vpx_codec_vp9_cx_algo', '-DHAVE_VP9_ENCODER', 'VP9 encoder' ], + [ 'vpx/vp8dx.h', 'vpx_codec_vp9_dx_algo', '-DHAVE_VP9_DECODER', 'VP9 decoder' ], +] + +vpx_dep = dependency('vpx', version : '>=1.3.0', required : false) + +if vpx_dep.found() + vpx_args = [] + foreach f : vpx_features + header = f.get(0) + codec_iface = f.get(1) + extra_define = f.get(2) + link_code = '''#include <@0@> + int main (int a, char ** g) { + const vpx_codec_iface_t *c = &@1@; + return c != 0; + }'''.format(header,codec_iface) + # FIXME: should take dependencies : vpx_dep argument + if cc.links(link_code, args : ['-lvpx']) + vpx_args += extra_define + message('libvpx provides @0@ interface (@1@)'.format(f.get(3),f.get(1))) + else + message('libvpx does not provide @0@ interface (@1@)'.format(f.get(3),f.get(1))) + endif + endforeach + + if vpx_args.length() == 0 + message('WARNING: libvpx was built without any encoder or decoder features!') + endif + + if dependency('vpx', version : '>=1.4.0').found() + vpx_args += '-DHAVE_VPX_1_4' + endif + + gstvpx = library('gstvpx', + vpx_sources, + c_args : gst_plugins_good_args + vpx_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gsttag_dep, gstvideo_dep, vpx_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/ext/wavpack/meson.build b/ext/wavpack/meson.build new file mode 100644 index 0000000..c4c9071 --- /dev/null +++ b/ext/wavpack/meson.build @@ -0,0 +1,21 @@ +wavpack_sources = [ + 'gstwavpack.c', + 'gstwavpackcommon.c', + 'gstwavpackdec.c', + 'gstwavpackenc.c', + 'gstwavpackstreamreader.c', +] + +wavpack_dep = dependency('wavpack', version : '>= 4.60.0', required : false) + +if wavpack_dep.found() + gstwavpack = library('gstwavpack', + wavpack_sources, + c_args : gst_plugins_good_args, + link_args : noseh_link_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gstaudio_dep, wavpack_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/gst/alpha/meson.build b/gst/alpha/meson.build new file mode 100644 index 0000000..265525e --- /dev/null +++ b/gst/alpha/meson.build @@ -0,0 +1,15 @@ +gstalpha = library('gstalpha', 'gstalpha.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstvideo_dep, gst_dep, libm], + install : true, + install_dir : plugins_install_dir, +) + +gstalphacolor = library('gstalphacolor', 'gstalphacolor.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstvideo_dep, gst_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/apetag/meson.build b/gst/apetag/meson.build new file mode 100644 index 0000000..568c645 --- /dev/null +++ b/gst/apetag/meson.build @@ -0,0 +1,7 @@ +gstapetag = library('gstapetag', 'gstapedemux.c', + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstpbutils_dep, gsttag_dep, gst_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/audiofx/meson.build b/gst/audiofx/meson.build new file mode 100644 index 0000000..b355044 --- /dev/null +++ b/gst/audiofx/meson.build @@ -0,0 +1,46 @@ +audiofx_sources = [ + 'audiofx.c', + 'audiopanorama.c', + 'audioinvert.c', + 'audioamplify.c', + 'audiodynamic.c', + 'audiokaraoke.c', + 'audiofxbaseiirfilter.c', + 'audiocheblimit.c', + 'audiochebband.c', + 'audioiirfilter.c', + 'audiofxbasefirfilter.c', + 'audiowsincband.c', + 'audiowsinclimit.c', + 'audiofirfilter.c', + 'audioecho.c', + 'gstscaletempo.c' +] + +orcsrc = 'audiopanoramaorc' +if have_orcc + orc_h = custom_target(orcsrc + '.h', + input : orcsrc + '.orc', + output : orcsrc + '.h', + command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']) + orc_c = custom_target(orcsrc + '.c', + input : orcsrc + '.orc', + output : orcsrc + '.c', + command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']) +else + orc_h = configure_file(input : orcsrc + '-dist.h', + output : orcsrc + '.h', + configuration : configuration_data()) + orc_c = configure_file(input : orcsrc + '-dist.c', + output : orcsrc + '.c', + configuration : configuration_data()) +endif + +gstaudiofx = library('gstaudiofx', + audiofx_sources, orc_c, orc_h, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [orc_dep, gstaudio_dep, gstfft_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/audioparsers/meson.build b/gst/audioparsers/meson.build new file mode 100644 index 0000000..9a5bf87 --- /dev/null +++ b/gst/audioparsers/meson.build @@ -0,0 +1,21 @@ +audioparsers_src = [ + 'gstaacparse.c', + 'gstamrparse.c', + 'gstac3parse.c', + 'gstdcaparse.c', + 'gstflacparse.c', + 'gstmpegaudioparse.c', + 'gstsbcparse.c', + 'gstwavpackparse.c', + 'plugin.c', +] + +gstaudioparsers = library('gstaudioparsers', + audioparsers_src, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gst_dep, gstbase_dep, gstpbutils_dep, + gstaudio_dep, gsttag_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/auparse/meson.build b/gst/auparse/meson.build new file mode 100644 index 0000000..5d308d2 --- /dev/null +++ b/gst/auparse/meson.build @@ -0,0 +1,8 @@ +gstauparse = library('gstauparse', + 'gstauparse.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstaudio_dep, gstbase_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/autodetect/meson.build b/gst/autodetect/meson.build new file mode 100644 index 0000000..4512d2b --- /dev/null +++ b/gst/autodetect/meson.build @@ -0,0 +1,16 @@ +autodetect_sources = [ + 'gstautoaudiosink.c', + 'gstautoaudiosrc.c', + 'gstautodetect.c', + 'gstautovideosink.c', + 'gstautovideosrc.c', +] + +gstautodetect = library('gstautodetect', + autodetect_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gst_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/avi/meson.build b/gst/avi/meson.build new file mode 100644 index 0000000..64fd1c4 --- /dev/null +++ b/gst/avi/meson.build @@ -0,0 +1,15 @@ +avi_sources = [ + 'gstavi.c', + 'gstavimux.c', + 'gstavidemux.c', + 'gstavisubtitle.c' +] + +gstavi = library('gstavi', + avi_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstriff_dep, gstaudio_dep, gstvideo_dep, gsttag_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/cutter/meson.build b/gst/cutter/meson.build new file mode 100644 index 0000000..3f580bd --- /dev/null +++ b/gst/cutter/meson.build @@ -0,0 +1,7 @@ +gstcutter = library('gstcutter', 'gstcutter.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstaudio_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/debugutils/meson.build b/gst/debugutils/meson.build new file mode 100644 index 0000000..d180577 --- /dev/null +++ b/gst/debugutils/meson.build @@ -0,0 +1,27 @@ +gstnavigationtest = library('gstnavigationtest', + 'gstnavigationtest.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstvideo_dep, libm], + install : true, + install_dir : plugins_install_dir, +) + +gstdebug = library('gstdebug', + 'gstdebug.c', + 'breakmydata.c', + 'gstcapssetter.c', + 'gstnavseek.c', + 'gstpushfilesrc.c', + 'gsttaginject.c', + 'rndbuffersize.c', + 'progressreport.c', + 'tests.c', + 'cpureport.c', + 'testplugin.c', + c_args: gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gst_dep, gstbase_dep, gstvideo_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/deinterlace/meson.build b/gst/deinterlace/meson.build new file mode 100644 index 0000000..11e6c53 --- /dev/null +++ b/gst/deinterlace/meson.build @@ -0,0 +1,43 @@ +interlace_sources = [ + 'gstdeinterlace.c', + 'gstdeinterlacemethod.c', + 'tvtime/tomsmocomp.c', + 'tvtime/greedy.c', + 'tvtime/greedyh.c', + 'tvtime/vfir.c', + 'tvtime/weavetff.c', + 'tvtime/weavebff.c', + 'tvtime/weave.c', + 'tvtime/linear.c', + 'tvtime/linearblend.c', + 'tvtime/scalerbob.c' +] + +orcsrc = 'tvtime' +if have_orcc + orc_h = custom_target(orcsrc + '.h', + input : orcsrc + '.orc', + output : orcsrc + '.h', + command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']) + orc_c = custom_target(orcsrc + '.c', + input : orcsrc + '.orc', + output : orcsrc + '.c', + command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']) +else + orc_h = configure_file(input : orcsrc + '-dist.h', + output : orcsrc + '.h', + configuration : configuration_data()) + orc_c = configure_file(input : orcsrc + '-dist.c', + output : orcsrc + '.c', + configuration : configuration_data()) +endif + +gstdeinterlace = library('gstdeinterlace', + interlace_sources, orc_c, orc_h, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [orc_dep, gstbase_dep, gstvideo_dep], + install : true, + install_dir : plugins_install_dir, +) + diff --git a/gst/dtmf/meson.build b/gst/dtmf/meson.build new file mode 100644 index 0000000..2b7201f --- /dev/null +++ b/gst/dtmf/meson.build @@ -0,0 +1,16 @@ +dtmf_sources = [ + 'gstdtmfsrc.c', + 'gstrtpdtmfsrc.c', + 'gstrtpdtmfdepay.c', + 'gstdtmf.c' +] + +gstdtmf = library('gstdtmf', + dtmf_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstrtp_dep, libm], + install : true, + install_dir : plugins_install_dir, +) + diff --git a/gst/effectv/meson.build b/gst/effectv/meson.build new file mode 100644 index 0000000..69d97e0 --- /dev/null +++ b/gst/effectv/meson.build @@ -0,0 +1,14 @@ +effect_sources = [ + 'gsteffectv.c', 'gstedge.c', 'gstaging.c', 'gstdice.c', 'gstwarp.c', + 'gstshagadelic.c', 'gstvertigo.c', 'gstrev.c', 'gstquark.c', 'gstop.c', + 'gstradioac.c', 'gststreak.c', 'gstripple.c' +] + +gsteffectv = library('gsteffectv', + effect_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gst_dep, gstbase_dep, gstvideo_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/equalizer/meson.build b/gst/equalizer/meson.build new file mode 100644 index 0000000..35d10b7 --- /dev/null +++ b/gst/equalizer/meson.build @@ -0,0 +1,15 @@ +eq_sources = [ + 'gstiirequalizer.c', + 'gstiirequalizernbands.c', + 'gstiirequalizer3bands.c', + 'gstiirequalizer10bands.c', +] + +gstequalizer = library('gstequalizer', + eq_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gstaudio_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/flv/meson.build b/gst/flv/meson.build new file mode 100644 index 0000000..b9190d3 --- /dev/null +++ b/gst/flv/meson.build @@ -0,0 +1,8 @@ +gstflv = library('gstflv', + 'gstflvdemux.c', 'gstflvmux.c', + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstpbutils_dep, gstvideo_dep, gsttag_dep, gstaudio_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/flx/meson.build b/gst/flx/meson.build new file mode 100644 index 0000000..bb7c9f5 --- /dev/null +++ b/gst/flx/meson.build @@ -0,0 +1,8 @@ +flxdec = library('gstflxdec', + 'gstflxdec.c', 'flx_color.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstvideo_dep, gst_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/goom/meson.build b/gst/goom/meson.build new file mode 100644 index 0000000..07d83a3 --- /dev/null +++ b/gst/goom/meson.build @@ -0,0 +1,29 @@ +goom_sources = [ + 'gstgoom.c', + 'drawmethods.c', + 'sound_tester.c', + 'mathtools.c', + 'lines.c', + 'ifs.c', + 'surf3d.c', + 'tentacle3d.c', + 'v3d.c', + 'convolve_fx.c', + 'flying_stars_fx.c', + 'plugin_info.c', + 'goom_tools.c', + 'config_param.c', + 'filters.c', + 'goom_core.c', + 'graphic.c', +] + + +gstgoom = library('gstgoom', + goom_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gst_dep, gstpbutils_dep, gstbase_dep, orc_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/goom2k1/meson.build b/gst/goom2k1/meson.build new file mode 100644 index 0000000..6460bd8 --- /dev/null +++ b/gst/goom2k1/meson.build @@ -0,0 +1,39 @@ +goom2k1_args = [ + '-Dgst_goom_get_type=gst_goom2k1_get_type', + '-Dgoom_init=goom2k1_init', + '-Dgoom_close=goom2k1_close', + '-Dgoom_update=goom2k1_update', + '-Dgoom_set_resolution=goom2k1_set_resolution', + '-Dgoom_lines=goom2k1_lines', + '-DBLACK=GOOM2K1_BLACK', + '-DWHITE=GOOM2K1_WHITE', + '-DRED=GOOM2K1_RED', + '-DBLUE=GOOM2K1_BLUE', + '-DGREEN=GOOM2K1_GREEN', + '-DYELLOW=GOOM2K1_YELLOW', + '-DORANGE=GOOM2K1_ORANGE', + '-DVIOLET=GOOM2K1_VIOLET', + '-DzoomFilterFastRGB=zoomFilterFastRGB2k1', + '-DpointFilter=pointFilter2k1', + '-DzoomFilterDestroy=zoomFilterDestroy2k1', + '-DzoomFilterNew=zoomFilterNew2k1' +] + +filter_args = ['-UMMX', '-UUSE_ASM'] + +goom2k1_sources = [ + 'gstgoom.c', + 'goom_core.c', + 'filters.c', + 'graphic.c', + 'lines.c' +] + +gstgoom2k1 = library('gstgoom2k1', + goom2k1_sources, + c_args : gst_plugins_good_args + goom2k1_args + filter_args, + include_directories : [configinc], + dependencies : [gstpbutils_dep, gstbase_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/icydemux/meson.build b/gst/icydemux/meson.build new file mode 100644 index 0000000..5c5f857 --- /dev/null +++ b/gst/icydemux/meson.build @@ -0,0 +1,8 @@ +gsticydemux = library('gsticydemux', + 'gsticydemux.c', + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstbase_dep, gsttag_dep, zlib_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/id3demux/meson.build b/gst/id3demux/meson.build new file mode 100644 index 0000000..38ea56e --- /dev/null +++ b/gst/id3demux/meson.build @@ -0,0 +1,8 @@ +gstid3demux = library('gstid3demux', + 'gstid3demux.c', + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstbase_dep, gsttag_dep, gstpbutils_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/imagefreeze/meson.build b/gst/imagefreeze/meson.build new file mode 100644 index 0000000..7af6a03 --- /dev/null +++ b/gst/imagefreeze/meson.build @@ -0,0 +1,8 @@ +gstimagefreeze = library('gstimagefreeze', + 'gstimagefreeze.c', + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : glib_deps + [gst_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/interleave/meson.build b/gst/interleave/meson.build new file mode 100644 index 0000000..428b36a --- /dev/null +++ b/gst/interleave/meson.build @@ -0,0 +1,8 @@ +gstinterleave = library('gstinterleave', + 'plugin.c', 'interleave.c', 'deinterleave.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstaudio_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/isomp4/meson.build b/gst/isomp4/meson.build new file mode 100644 index 0000000..4d0baaf --- /dev/null +++ b/gst/isomp4/meson.build @@ -0,0 +1,27 @@ +mp4_sources = [ + 'isomp4-plugin.c', + 'gstrtpxqtdepay.c', + 'qtdemux.c', + 'qtdemux_types.c', + 'qtdemux_dump.c', + 'qtdemux_lang.c', + 'gstisoff.c', + 'gstqtmux.c', + 'gstqtmoovrecover.c', + 'atoms.c', + 'atomsrecovery.c', + 'descriptors.c', + 'properties.c', + 'gstqtmuxmap.c' +] + +gstisomp4 = library('gstisomp4', + mp4_sources, + c_args : gst_plugins_good_args, + link_args : noseh_link_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstriff_dep, gstaudio_dep, gstvideo_dep, + gstrtp_dep, gsttag_dep, gstpbutils_dep, zlib_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/law/meson.build b/gst/law/meson.build new file mode 100644 index 0000000..661810d --- /dev/null +++ b/gst/law/meson.build @@ -0,0 +1,17 @@ +gstalaw = library('gstalaw', + 'alaw-encode.c', 'alaw-decode.c', 'alaw.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstaudio_dep], + install : true, + install_dir : plugins_install_dir, +) + +gstmulaw = library('gstmulaw', + 'mulaw-encode.c', 'mulaw-conversion.c', 'mulaw-decode.c', 'mulaw.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstaudio_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/level/meson.build b/gst/level/meson.build new file mode 100644 index 0000000..24ac4c9 --- /dev/null +++ b/gst/level/meson.build @@ -0,0 +1,8 @@ +gstlevel = library('gstlevel', + 'gstlevel.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstaudio_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/matroska/meson.build b/gst/matroska/meson.build new file mode 100644 index 0000000..a5386cf --- /dev/null +++ b/gst/matroska/meson.build @@ -0,0 +1,24 @@ +matroska_sources = [ + 'ebml-read.c', + 'ebml-write.c', + 'matroska.c', + 'matroska-demux.c', + 'matroska-parse.c', + 'matroska-ids.c', + 'matroska-mux.c', + 'matroska-read-common.c', + 'webm-mux.c', + 'lzo.c', +] + +gstmatroska = library('gstmatroska', + matroska_sources, + c_args : gst_plugins_good_args, + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [gstpbutils_dep, gstaudio_dep, gstriff_dep, + gstvideo_dep, gsttag_dep, gstbase_dep, + gst_dep, zlib_dep, bz2lib, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/meson.build b/gst/meson.build new file mode 100644 index 0000000..61df5f5 --- /dev/null +++ b/gst/meson.build @@ -0,0 +1,43 @@ +subdir('alpha') +subdir('apetag') +subdir('audiofx') +subdir('audioparsers') +subdir('auparse') +subdir('autodetect') +subdir('avi') +subdir('cutter') +subdir('debugutils') +subdir('deinterlace') +subdir('dtmf') +subdir('effectv') +subdir('equalizer') +subdir('flv') +subdir('flx') +subdir('goom') +subdir('goom2k1') +subdir('icydemux') +subdir('id3demux') +subdir('imagefreeze') +subdir('interleave') +subdir('isomp4') +subdir('law') +subdir('level') +subdir('matroska') +subdir('monoscope') +subdir('multifile') +subdir('multipart') +subdir('replaygain') +subdir('rtp') +subdir('rtpmanager') +subdir('rtsp') +subdir('shapewipe') +subdir('smpte') +subdir('spectrum') +subdir('udp') +subdir('videobox') +subdir('videocrop') +subdir('videofilter') +subdir('videomixer') +subdir('wavenc') +subdir('wavparse') +subdir('y4m') diff --git a/gst/monoscope/meson.build b/gst/monoscope/meson.build new file mode 100644 index 0000000..7374719 --- /dev/null +++ b/gst/monoscope/meson.build @@ -0,0 +1,10 @@ +gstmonoscope = library('gstmonoscope', + 'gstmonoscope.c', + 'monoscope.c', + 'convolve.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstvideo_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/multifile/meson.build b/gst/multifile/meson.build new file mode 100644 index 0000000..6ec260d --- /dev/null +++ b/gst/multifile/meson.build @@ -0,0 +1,36 @@ +multifile_sources = [ + 'gstmultifilesink.c', + 'gstmultifilesrc.c', + 'gstmultifile.c', + 'gstsplitfilesrc.c', + 'gstsplitmuxpartreader.c', + 'gstsplitmuxsink.c', + 'gstsplitmuxsrc.c', + 'gstsplitutils.c', + 'patternspec.c', +] + +gstmultifile = library('gstmultifile', + multifile_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstvideo_dep, gstbase_dep, gio_dep], + install : true, + install_dir : plugins_install_dir, +) + +test_splitmuxpartreader_sources = [ + 'test-splitmuxpartreader.c', + 'gstsplitmuxpartreader.c', + 'gstsplitmuxsrc.c', + 'gstsplitutils.c', + 'patternspec.c', +] + +executable('test-splitmuxpartreader', + test_splitmuxpartreader_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gsttag_dep, gstbase_dep], + install : false, +) diff --git a/gst/multipart/meson.build b/gst/multipart/meson.build new file mode 100644 index 0000000..61aca62 --- /dev/null +++ b/gst/multipart/meson.build @@ -0,0 +1,10 @@ +gstmultipart = library('gstmultipart', + 'multipart.c', + 'multipartdemux.c', + 'multipartmux.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/replaygain/meson.build b/gst/replaygain/meson.build new file mode 100644 index 0000000..34437a2 --- /dev/null +++ b/gst/replaygain/meson.build @@ -0,0 +1,17 @@ +replaygain_sources = [ + 'gstrganalysis.c', + 'gstrglimiter.c', + 'gstrgvolume.c', + 'replaygain.c', + 'rganalysis.c', +] + +gstreplaygain = library('gstreplaygain', + replaygain_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gst_dep, gstbase_dep, gstpbutils_dep, gstaudio_dep, libm], + install : true, + install_dir : plugins_install_dir, +) + diff --git a/gst/rtp/meson.build b/gst/rtp/meson.build new file mode 100644 index 0000000..4696633 --- /dev/null +++ b/gst/rtp/meson.build @@ -0,0 +1,109 @@ +rtp_sources = [ + 'dboolhuff.c', + 'fnv1hash.c', + 'gstrtp.c', + 'gstrtpchannels.c', + 'gstrtpac3depay.c', + 'gstrtpac3pay.c', + 'gstrtpbvdepay.c', + 'gstrtpbvpay.c', + 'gstrtpceltdepay.c', + 'gstrtpceltpay.c', + 'gstrtpdvdepay.c', + 'gstrtpdvpay.c', + 'gstrtpgstdepay.c', + 'gstrtpgstpay.c', + 'gstrtpilbcdepay.c', + 'gstrtpilbcpay.c', + 'gstrtpklvdepay.c', + 'gstrtpklvpay.c', + 'gstrtpmpadepay.c', + 'gstrtpmpapay.c', + 'gstrtpmparobustdepay.c', + 'gstrtpmpvdepay.c', + 'gstrtpmpvpay.c', + 'gstrtpopuspay.c', + 'gstrtpopusdepay.c', + 'gstrtppcmadepay.c', + 'gstrtppcmudepay.c', + 'gstrtppcmupay.c', + 'gstrtppcmapay.c', + 'gstrtpg722depay.c', + 'gstrtpg722pay.c', + 'gstrtpg723depay.c', + 'gstrtpg723pay.c', + 'gstrtpg726pay.c', + 'gstrtpg726depay.c', + 'gstrtpg729pay.c', + 'gstrtpg729depay.c', + 'gstrtpgsmdepay.c', + 'gstrtpgsmpay.c', + 'gstrtpamrdepay.c', + 'gstrtpamrpay.c', + 'gstrtph261depay.c', + 'gstrtph261pay.c', + 'gstrtph263pdepay.c', + 'gstrtph263ppay.c', + 'gstrtph263depay.c', + 'gstrtph263pay.c', + 'gstrtph264depay.c', + 'gstrtph264pay.c', + 'gstrtph265depay.c', + 'gstrtph265pay.c', + 'gstrtpj2kdepay.c', + 'gstrtpj2kpay.c', + 'gstrtpjpegdepay.c', + 'gstrtpjpegpay.c', + 'gstrtpL16depay.c', + 'gstrtpL16pay.c', + 'gstrtpL24depay.c', + 'gstrtpL24pay.c', + 'gstasteriskh263.c', + 'gstrtpmp1sdepay.c', + 'gstrtpmp2tdepay.c', + 'gstrtpmp2tpay.c', + 'gstrtpmp4vdepay.c', + 'gstrtpmp4vpay.c', + 'gstrtpmp4gdepay.c', + 'gstrtpmp4gpay.c', + 'gstrtpmp4adepay.c', + 'gstrtpmp4apay.c', + 'gstrtpqcelpdepay.c', + 'gstrtpqdmdepay.c', + 'gstrtpsbcdepay.c', + 'gstrtpsbcpay.c', + 'gstrtpsirenpay.c', + 'gstrtpsirendepay.c', + 'gstrtpspeexdepay.c', + 'gstrtpspeexpay.c', + 'gstrtpsv3vdepay.c', + 'gstrtptheoradepay.c', + 'gstrtptheorapay.c', + 'gstrtpvorbisdepay.c', + 'gstrtpvorbispay.c', + 'gstrtpvp8depay.c', + 'gstrtpvp8pay.c', + 'gstrtpvp9depay.c', + 'gstrtpvp9pay.c', + 'gstrtpvrawdepay.c', + 'gstrtpvrawpay.c', + 'gstrtpstreampay.c', + 'gstrtpstreamdepay.c', + 'gstrtputils.c', +] + +rtp_args = [ + '-Dvp8_norm=gst_rtpvp8_vp8_norm', + '-Dvp8dx_start_decode=gst_rtpvp8_vp8dx_start_decode', + '-Dvp8dx_bool_decoder_fill=gst_rtpvp8_vp8dx_bool_decoder_fill', +] + +gstrtp = library('gstrtp', + rtp_sources, + c_args : gst_plugins_good_args + rtp_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstaudio_dep, gstvideo_dep, gsttag_dep, + gstrtp_dep, gstpbutils_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/rtpmanager/meson.build b/gst/rtpmanager/meson.build new file mode 100644 index 0000000..2a56f37 --- /dev/null +++ b/gst/rtpmanager/meson.build @@ -0,0 +1,26 @@ +rtpmanager_sources = [ + 'gstrtpmanager.c', + 'gstrtpbin.c', + 'gstrtpdtmfmux.c', + 'gstrtpjitterbuffer.c', + 'gstrtpmux.c', + 'gstrtpptdemux.c', + 'gstrtprtxqueue.c', + 'gstrtprtxreceive.c', + 'gstrtprtxsend.c', + 'gstrtpssrcdemux.c', + 'rtpjitterbuffer.c', + 'rtpsession.c', + 'rtpsource.c', + 'rtpstats.c', + 'gstrtpsession.c', +] + +gstrtpmanager = library('gstrtpmanager', + rtpmanager_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gstnet_dep, gstrtp_dep, gio_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/rtsp/meson.build b/gst/rtsp/meson.build new file mode 100644 index 0000000..1fe8a7b --- /dev/null +++ b/gst/rtsp/meson.build @@ -0,0 +1,15 @@ +rtsp_sources = [ + 'gstrtsp.c', + 'gstrtspsrc.c', + 'gstrtpdec.c', + 'gstrtspext.c', +] + +gstrtsp = library('gstrtsp', + rtsp_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gio_dep, gstrtp_dep, gstrtsp_dep, gstsdp_dep, gstnet_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/shapewipe/meson.build b/gst/shapewipe/meson.build new file mode 100644 index 0000000..ecb3cdf --- /dev/null +++ b/gst/shapewipe/meson.build @@ -0,0 +1,8 @@ +gstshapewipe = library('gstshapewipe', + 'gstshapewipe.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gio_dep, gst_dep, gstvideo_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/smpte/meson.build b/gst/smpte/meson.build new file mode 100644 index 0000000..45539d3 --- /dev/null +++ b/gst/smpte/meson.build @@ -0,0 +1,17 @@ +smpte_sources = [ + 'gstsmpte.c', + 'gstmask.c', + 'barboxwipes.c', + 'paint.c', + 'gstsmptealpha.c', + 'plugin.c', +] + +gstsmpte = library('gstsmpte', + smpte_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstvideo_dep, gst_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/spectrum/meson.build b/gst/spectrum/meson.build new file mode 100644 index 0000000..4dd5e97 --- /dev/null +++ b/gst/spectrum/meson.build @@ -0,0 +1,8 @@ +gstspectrum = library('gstspectrum', + 'gstspectrum.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstfft_dep, gstaudio_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/udp/meson.build b/gst/udp/meson.build new file mode 100644 index 0000000..2fc576d --- /dev/null +++ b/gst/udp/meson.build @@ -0,0 +1,17 @@ +udp_sources = [ + 'gstudp.c', + 'gstudpsrc.c', + 'gstudpsink.c', + 'gstmultiudpsink.c', + 'gstdynudpsink.c', + 'gstudpnetutils.c' +] + +gstudp = library('gstudp', + udp_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstbase_dep, gstnet_dep, gio_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/videobox/meson.build b/gst/videobox/meson.build new file mode 100644 index 0000000..430ede0 --- /dev/null +++ b/gst/videobox/meson.build @@ -0,0 +1,27 @@ +orcsrc = 'gstvideoboxorc' +if have_orcc + orc_h = custom_target(orcsrc + '.h', + input : orcsrc + '.orc', + output : orcsrc + '.h', + command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']) + orc_c = custom_target(orcsrc + '.c', + input : orcsrc + '.orc', + output : orcsrc + '.c', + command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']) +else + orc_h = configure_file(input : orcsrc + '-dist.h', + output : orcsrc + '.h', + configuration : configuration_data()) + orc_c = configure_file(input : orcsrc + '-dist.c', + output : orcsrc + '.c', + configuration : configuration_data()) +endif + +gstvideobox = library('gstvideobox', + 'gstvideobox.c', orc_c, orc_h, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [orc_dep, gstbase_dep, gstvideo_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/videocrop/meson.build b/gst/videocrop/meson.build new file mode 100644 index 0000000..606b7be --- /dev/null +++ b/gst/videocrop/meson.build @@ -0,0 +1,8 @@ +gstvideocrop = library('gstvideocrop', + 'gstvideocrop.c', 'gstaspectratiocrop.c', + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gst_dep, gstbase_dep, gstvideo_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/videofilter/meson.build b/gst/videofilter/meson.build new file mode 100644 index 0000000..8fac1d5 --- /dev/null +++ b/gst/videofilter/meson.build @@ -0,0 +1,16 @@ +vfilter_sources = [ + 'plugin.c', + 'gstvideoflip.c', + 'gstvideobalance.c', + 'gstgamma.c', + 'gstvideomedian.c', +] + +gstvideofilter = library('gstvideofilter', + vfilter_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstvideo_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/videomixer/meson.build b/gst/videomixer/meson.build new file mode 100644 index 0000000..1425a43 --- /dev/null +++ b/gst/videomixer/meson.build @@ -0,0 +1,32 @@ +vmixer_sources = [ + 'blend.c', + 'videomixer2.c', +] + +orcsrc = 'videomixerorc' +if have_orcc + orc_h = custom_target(orcsrc + '.h', + input : orcsrc + '.orc', + output : orcsrc + '.h', + command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']) + orc_c = custom_target(orcsrc + '.c', + input : orcsrc + '.orc', + output : orcsrc + '.c', + command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']) +else + orc_h = configure_file(input : orcsrc + '-dist.h', + output : orcsrc + '.h', + configuration : configuration_data()) + orc_c = configure_file(input : orcsrc + '-dist.c', + output : orcsrc + '.c', + configuration : configuration_data()) +endif + +gstvideomixer = library('gstvideomixer', + vmixer_sources, orc_c, orc_h, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [orc_dep, gstvideo_dep, gstbase_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/wavenc/meson.build b/gst/wavenc/meson.build new file mode 100644 index 0000000..98a9299 --- /dev/null +++ b/gst/wavenc/meson.build @@ -0,0 +1,8 @@ +gstwavenc = library('gstwavenc', + 'gstwavenc.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstaudio_dep, gstriff_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/wavparse/meson.build b/gst/wavparse/meson.build new file mode 100644 index 0000000..dceba34 --- /dev/null +++ b/gst/wavparse/meson.build @@ -0,0 +1,9 @@ +gstwawparse = library('gstwavparse', + 'gstwavparse.c', + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gstpbutils_dep, gstriff_dep, gstaudio_dep, + gsttag_dep, libm], + install : true, + install_dir : plugins_install_dir, +) diff --git a/gst/y4m/meson.build b/gst/y4m/meson.build new file mode 100644 index 0000000..d680e7e --- /dev/null +++ b/gst/y4m/meson.build @@ -0,0 +1,8 @@ +gsty4menc = library('gsty4menc', + 'gsty4mencode.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstvideo_dep], + install : true, + install_dir : plugins_install_dir, +) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..51d330a --- /dev/null +++ b/meson.build @@ -0,0 +1,248 @@ +project('gst-plugins-good', 'c', 'cpp', + version : '1.9.1.1', + meson_version : '>= 0.32.0', + default_options : [ 'warning_level=1', + 'c_std=gnu99', + 'buildtype=debugoptimized' ]) + +gst_version = meson.project_version() +version_arr = gst_version.split('.') +gst_version_major = version_arr[0] +gst_version_minor = version_arr[1] +gst_version_micro = version_arr[2] +if version_arr.length() == 4 + gst_version_nano = version_arr[3] +else + gst_version_nano = 0 +endif + +glib_req = '>= 2.40.0' +gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) + +api_version = '1.0' + +plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir')) + +cc = meson.get_compiler('c') + +if cc.get_id() == 'msvc' + # Ignore several spurious warnings for things gstreamer does very commonly + # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it + # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once + # NOTE: Only add warnings here if you are sure they're spurious + add_global_arguments('/wd4018', '/wd4244', '/wd4996', language : 'c') + # Disable SAFESEH with MSVC for plugins and libs that use external deps that + # are built with MinGW + noseh_link_args = ['/SAFESEH:NO'] +else + noseh_link_args = [] +endif + +cdata = configuration_data() + +check_headers = [ + ['HAVE_DLFCN_H', 'dlfcn.h'], + ['HAVE_FCNTL_H', 'fcntl.h'], + ['HAVE_INTTYPES_H', 'inttypes.h'], + ['HAVE_MEMORY_H', 'memory.h'], + ['HAVE_PROCESS_H', 'process.h'], + ['HAVE_STDINT_H', 'stdint.h'], + ['HAVE_STDLIB_H', 'stdlib.h'], + ['HAVE_STRINGS_H', 'strings.h'], + ['HAVE_STRING_H', 'string.h'], + ['HAVE_SYS_IOCTL_H', 'sys/ioctl.h'], + ['HAVE_SYS_PARAM_H', 'sys/param.h'], + ['HAVE_SYS_SOCKET_H', 'sys/socket.h'], + ['HAVE_SYS_STAT_H', 'sys/stat.h'], + ['HAVE_SYS_TIME_H', 'sys/time.h'], + ['HAVE_SYS_TYPES_H', 'sys/types.h'], + ['HAVE_UNISTD_H', 'unistd.h'], +] + +foreach h : check_headers + if cc.has_header(h.get(1)) + cdata.set(h.get(0), 1) + endif +endforeach + +check_functions = [ + ['HAVE_ASINH', 'asinh', '#include'], + ['HAVE_CLOCK_GETTIME', 'clock_gettime', '#include'], + ['HAVE_COSH', 'cosh', '#include'], +# check token HAVE_CPU_ALPHA +# check token HAVE_CPU_ARM +# check token HAVE_CPU_CRIS +# check token HAVE_CPU_CRISV32 +# check token HAVE_CPU_HPPA +# check token HAVE_CPU_I386 +# check token HAVE_CPU_IA64 +# check token HAVE_CPU_M68K +# check token HAVE_CPU_MIPS +# check token HAVE_CPU_PPC +# check token HAVE_CPU_PPC64 +# check token HAVE_CPU_S390 +# check token HAVE_CPU_SPARC +# check token HAVE_CPU_X86_64 + ['HAVE_DCGETTEXT', 'dcgettext', '#include'], +# check token HAVE_DIRECTSOUND +# check token HAVE_EXPERIMENTAL +# check token HAVE_EXTERNAL +# check token HAVE_FPCLASS +# check token HAVE_GCC_ASM + ['HAVE_GETPAGESIZE', 'getpagesize', '#include'], +# check token HAVE_GETTEXT +# check token HAVE_GST_V4L2 +# check token HAVE_IOS + ['HAVE_ISINF', 'isinf', '#include'], +# check token HAVE_LIBV4L2 + ['HAVE_MMAP', 'mmap', '#include'], +# check token HAVE_OSS +# check token HAVE_OSS4 +# check token HAVE_OSS_INCLUDE_IN_MACHINE +# check token HAVE_OSS_INCLUDE_IN_ROOT +# check token HAVE_OSS_INCLUDE_IN_SYS +# check token HAVE_OSX_AUDIO +# check token HAVE_OSX_VIDEO +# check token HAVE_RDTSC + ['HAVE_SINH', 'sinh', '#include'], +# check token HAVE_SUNAUDIO +# check token HAVE_WAVEFORM +] + +foreach f : check_functions + if cc.has_function(f.get(1), prefix : f.get(2)) + cdata.set(f.get(0), 1) + endif +endforeach + +cdata.set('SIZEOF_CHAR', cc.sizeof('char')) +cdata.set('SIZEOF_INT', cc.sizeof('int')) +cdata.set('SIZEOF_LONG', cc.sizeof('long')) +cdata.set('SIZEOF_SHORT', cc.sizeof('short')) +cdata.set('SIZEOF_VOIDP', cc.sizeof('void*')) + +# Here be fixmes. +# FIXME: check if this is correct +cdata.set('HAVE_CPU_X86_64', host_machine.cpu() == 'amd64') +cdata.set('HAVE_GCC_ASM', cc.get_id() != 'msvc') +cdata.set('VERSION', '"@0@"'.format(gst_version)) +cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version)) +cdata.set('GST_LICENSE', '"LGPL"') +cdata.set('PACKAGE', '"gst-plugins-good"') +cdata.set('GETTEXT_PACKAGE', '"gst-plugins-good-1.0"') +cdata.set('GST_PACKAGE_NAME', '"GStreamer Good Plug-ins"') +cdata.set('GST_PACKAGE_ORIGIN', '"Unknown package origin"') # FIXME: make configurable + +# Mandatory GST deps +gst_dep = dependency('gstreamer-1.0', version : gst_req, + fallback : ['gstreamer', 'gst_dep']) +gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req, + fallback : ['gstreamer', 'gst_base_dep']) +gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req, + fallback : ['gstreamer', 'gst_net_dep']) +gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req, + fallback : ['gstreamer', 'gst_check_dep']) +gstcontroller_dep = dependency('gstreamer-controller-1.0', version : gst_req, + fallback : ['gstreamer', 'gst_controller_dep']) + +gstpbutils_dep = dependency('gstreamer-pbutils-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'pbutils_dep']) +gstallocators_dep = dependency('gstreamer-allocators-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'allocators_dep']) +gstaudio_dep = dependency('gstreamer-audio-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'audio_dep']) +gstfft_dep = dependency('gstreamer-fft-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'fft_dep']) +gstriff_dep = dependency('gstreamer-riff-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'riff_dep']) +gstrtp_dep = dependency('gstreamer-rtp-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'rtp_dep']) +gstrtsp_dep = dependency('gstreamer-rtsp-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'rtsp_dep']) +gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'sdp_dep']) +gsttag_dep = dependency('gstreamer-tag-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'tag_dep']) +gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'video_dep']) + +libm = cc.find_library('m', required : false) +zlib_dep = dependency('zlib') +bz2lib = cc.find_library('bz2', required : false) +gio_dep = dependency('gio-2.0', version : glib_req) +glib_deps = [dependency('glib-2.0', version : glib_req), + dependency('gobject-2.0', version : glib_req)] + +cdata.set('HAVE_ZLIB', 1) +if bz2lib.found() + cdata.set('HAVE_BZ2', 1) +endif + +# Check all of the things. +# TODO: None of these are actually used yet because +# the build files haven't been written +deps = [ + ['gtk_dep','gtk+-3.0', '', ''], + ['gtkx_dep','gtk+-x11-3.0', '', ''], + ['jack_dep','jack', '>=1.9.7', 'HAVE_JACK_1_9_7'], + ['caca_dep','caca', '', ''], + ['libdv_dep','libdv', '>=0.100', ''], + ['libraw1394_dep','libraw1394', '>=2.0.0', ''], + ['libiec61883_dep','libiec61883', '>=1.0.0', ''], + ['libraw1394_dep','libraw1394', '>=1.1.0', ''], + ['shout_dep','shout', '>=2.0', ''], + ['taglib_dep','taglib', '>=1.5', ''], + ['wavpack_dep','wavpack', '>= 4.20', 'HAVE_WAVPACK'], +] + +foreach d : deps + varname = d[0] + depname = d[1] + version = d[2] + confhname = d[3] + if version == '' + curdep = dependency(depname, required : false) + else + curdep = dependency(depname, required : false, version : version) + endif + set_variable(varname, curdep) + if curdep.found() and confhname != '' + cdata.set(confhname, 1) + endif +endforeach + +if cc.has_header('valgrind.h') + cdata.set('HAVE_VALGRIND', 1) +endif + +gst_plugins_good_args = ['-DHAVE_CONFIG_H'] +configinc = include_directories('.') +libsinc = include_directories('gst-libs') + +have_orcc = false +orcc_args = [] +if get_option('use_orc') != 'no' + need_orc = get_option('use_orc') == 'yes' + # Used by various libraries/elements that use Orc code + orc_dep = dependency('orc-0.4', version : '>= 0.4.17', required : need_orc) + orcc = find_program('orcc', required : need_orc) + if orc_dep.found() and orcc.found() + have_orcc = true + orcc_args = [orcc, '--include', 'glib.h'] + cdata.set('HAVE_ORC', 1) + else + message('Orc Compiler not found, will use backup C code') + cdata.set('DISABLE_ORC', 1) + endif +else + cdata.set('DISABLE_ORC', 1) +endif + +subdir('gst') +subdir('sys') +subdir('ext') +subdir('tests') + +configure_file(input : 'config.h.meson', + output : 'config.h', + configuration : cdata) diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..c8117cc --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,6 @@ +# Enable V4L2 plugin to probe devices at plugin load +option('v4l2-probe', type : 'boolean', value : true) +# Use libv4l2 for some obscure format conversions +option('with-libv4l2', type : 'boolean', value : true) +# Whether to use orc or not (auto will autodetect, yes will error out if not found) +option('use_orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto') diff --git a/sys/directsound/meson.build b/sys/directsound/meson.build new file mode 100644 index 0000000..d8a75a3 --- /dev/null +++ b/sys/directsound/meson.build @@ -0,0 +1,16 @@ +directsoundsink_sources = [ + 'gstdirectsoundsink.c', + 'gstdirectsoundplugin.c', +] + +if host_machine.system() == 'windows' and cc.has_header('dsound.h') + directsoundsink_dep = [cc.find_library('dsound'), cc.find_library('winmm')] + + gstdirectsoundsink = library('gstdirectsoundsink', + directsoundsink_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstaudio_dep] + directsoundsink_dep, + install : true, + install_dir : plugins_install_dir) +endif diff --git a/sys/meson.build b/sys/meson.build new file mode 100644 index 0000000..30761f0 --- /dev/null +++ b/sys/meson.build @@ -0,0 +1,11 @@ +subdir('v4l2') +subdir('ximage') +subdir('directsound') + +# FIXME: Implement these +#subdir('oss') +#subdir('oss4') +#subdir('osxaudio') +#subdir('osxvideo') +#subdir('sunaudio') +#subdir('waveform') diff --git a/sys/v4l2/meson.build b/sys/v4l2/meson.build new file mode 100644 index 0000000..199710e --- /dev/null +++ b/sys/v4l2/meson.build @@ -0,0 +1,48 @@ +v4l2_sources = [ + 'gstv4l2.c', + 'gstv4l2allocator.c', + 'gstv4l2colorbalance.c', + 'gstv4l2deviceprovider.c', + 'gstv4l2object.c', + 'gstv4l2bufferpool.c', + 'gstv4l2sink.c', + 'gstv4l2src.c', + 'gstv4l2radio.c', + 'gstv4l2tuner.c', + 'gstv4l2transform.c', + 'gstv4l2videodec.c', + 'gstv4l2vidorient.c', + 'v4l2_calls.c', + 'v4l2-utils.c', + 'tuner.c', + 'tunerchannel.c', + 'tunernorm.c' +] + +cdata.set('GST_V4L2_ENABLE_PROBE', get_option('v4l2-probe')) + +if cc.has_header('linux/videodev2.h') or cc.has_header('sys/videodev2.h') or cc.has_header('sys/videoio.h') + message('building v4l2 plugin') + cdata.set('HAVE_GST_V4L2', true) + gudev_dep = dependency('gudev-1.0', version : '>=147', required : false) + cdata.set('HAVE_GUDEV', gudev_dep.found()) + + # libv4l2 is only needed for converting some obscure formats + # FIXME: Add a full list of the formats here + if get_option('with-libv4l2') + libv4l2_dep = dependency('libv4l2', required : false) + cdata.set('HAVE_LIBV4L2', libv4l2_dep.found()) + libv4l2_deps = [libv4l2_dep] + else + libv4l2_deps = [] + endif + + gstv4l2 = library('gstv4l2', + v4l2_sources, + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gstvideo_dep, gstallocators_dep, gudev_dep] + libv4l2_deps, + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/sys/ximage/meson.build b/sys/ximage/meson.build new file mode 100644 index 0000000..36ec21e --- /dev/null +++ b/sys/ximage/meson.build @@ -0,0 +1,30 @@ +x11_dep = dependency('x11', required : false) + +if x11_dep.found() + x_args = [] + # FIXME: Need to check for XShmAttach inside libXext + xshm_dep = dependency('xext', required : false) + if xshm_dep.found() + x_args += ['-DHAVE_XSHM'] + endif + + xfixes_dep = dependency('xfixes', required : false) + if xfixes_dep.found() + x_args += ['-DHAVE_XFIXES'] + endif + + xdamage_dep = dependency('xdamage', required : false) + if xdamage_dep.found() + x_args += ['-DHAVE_XDAMAGE'] + endif + + gstximagesrc = library('gstximagesrc', + 'gstximagesrc.c', 'ximageutil.c', + c_args : gst_plugins_good_args + x_args, + include_directories : [configinc, libsinc], + dependencies : [gstbase_dep, gstvideo_dep, x11_dep, + xshm_dep, xfixes_dep, xdamage_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/tests/check/meson.build b/tests/check/meson.build new file mode 100644 index 0000000..1030cc1 --- /dev/null +++ b/tests/check/meson.build @@ -0,0 +1,21 @@ +libparser = library('libparser', + 'elements/parser.c', + c_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'], + include_directories : [configinc], + dependencies : [gstcheck_dep], +) + +# Only a few so far to sketch the waters. + +test('generic/states', executable('states', + 'generic/states.c', + c_args : gst_plugins_good_args, + include_directories : [configinc], + dependencies : [gstcheck_dep],) +) + +# FIXME, set up registry and envvars +test('alphacolor', + executable('alphacolor', 'elements/alphacolor.c', + dependencies : [gstcheck_dep, gstvideo_dep]) +) diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000..2d750d7 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,6 @@ +# FIXME: make check work on windows +if host_machine.system() != 'windows' +subdir('check') +endif + +# TODO: Implement examples etc