summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--config.h.meson405
-rw-r--r--ext/alsa/meson.build21
-rw-r--r--ext/cdparanoia/meson.build32
-rw-r--r--ext/libvisual/meson.build23
-rw-r--r--ext/meson.build12
-rw-r--r--ext/ogg/meson.build26
-rw-r--r--ext/opus/meson.build21
-rw-r--r--ext/pango/meson.build21
-rw-r--r--ext/theora/meson.build29
-rw-r--r--ext/vorbis/meson.build54
-rw-r--r--gst-libs/gst/allocators/meson.build22
-rw-r--r--gst-libs/gst/app/meson.build20
-rwxr-xr-xgst-libs/gst/audio/audio_mkenum.py55
-rw-r--r--gst-libs/gst/audio/meson.build103
-rw-r--r--gst-libs/gst/fft/meson.build41
-rw-r--r--gst-libs/gst/meson.build11
-rw-r--r--gst-libs/gst/pbutils/meson.build69
-rwxr-xr-xgst-libs/gst/pbutils/pbutils_mkenum.py55
-rw-r--r--gst-libs/gst/riff/meson.build29
-rw-r--r--gst-libs/gst/rtp/meson.build54
-rwxr-xr-xgst-libs/gst/rtp/rtp_mkenum.py55
-rw-r--r--gst-libs/gst/rtsp/meson.build57
-rwxr-xr-xgst-libs/gst/rtsp/rtsp_mkenum.py57
-rw-r--r--gst-libs/gst/sdp/meson.build23
-rw-r--r--gst-libs/gst/tag/meson.build54
-rw-r--r--gst-libs/gst/video/meson.build132
-rwxr-xr-xgst-libs/gst/video/video_mkenum.py55
-rw-r--r--gst-libs/meson.build1
-rw-r--r--gst/adder/meson.build27
-rw-r--r--gst/app/meson.build8
-rw-r--r--gst/audioconvert/meson.build13
-rw-r--r--gst/audiorate/meson.build8
-rw-r--r--gst/audioresample/meson.build10
-rw-r--r--gst/audiotestsrc/meson.build8
-rw-r--r--gst/encoding/meson.build14
-rw-r--r--gst/gio/meson.build17
-rw-r--r--gst/meson.build17
-rw-r--r--gst/playback/meson.build27
-rw-r--r--gst/subparse/meson.build17
-rw-r--r--gst/tcp/meson.build23
-rw-r--r--gst/typefind/meson.build8
-rw-r--r--gst/videoconvert/meson.build12
-rw-r--r--gst/videorate/meson.build8
-rw-r--r--gst/videoscale/meson.build12
-rw-r--r--gst/videotestsrc/meson.build27
-rw-r--r--gst/volume/meson.build26
-rw-r--r--meson.build185
-rw-r--r--meson_options.txt2
-rw-r--r--pkgconfig/meson.build35
-rw-r--r--sys/meson.build9
-rw-r--r--sys/ximage/meson.build8
-rw-r--r--sys/xvimage/meson.build21
-rw-r--r--tests/check/meson.build137
-rw-r--r--tests/meson.build4
-rw-r--r--tools/meson.build25
56 files changed, 2248 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 74c865c15..6d3465624 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
aclocal.m4
autom4te.cache
-config.h*
config.h.in
config.log
config.status
@@ -69,3 +68,6 @@ Build
/test-driver
*.trs
*.log
+
+/build
+/subprojects
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 000000000..8e38a525c
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,405 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+#mesondefine AC_APPLE_UNIVERSAL_BUILD
+
+/* The implementation that should be used for integer audio resampling witll
+ be benchmarked at runtime */
+#mesondefine AUDIORESAMPLE_FORMAT_AUTO
+
+/* The float implementation should be used for integer audio resampling */
+#mesondefine AUDIORESAMPLE_FORMAT_FLOAT
+
+/* The int implementation should be used for integer audio resampling */
+#mesondefine AUDIORESAMPLE_FORMAT_INT
+
+/* defined if cdda headers are in a cdda/ directory */
+#mesondefine CDPARANOIA_HEADERS_IN_DIR
+
+/* 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
+
+/* The GIO install prefix. */
+#mesondefine GIO_PREFIX
+
+/* major/minor version */
+#mesondefine GST_API_VERSION
+
+/* system wide data directory */
+#mesondefine GST_DATADIR
+
+/* Extra platform specific plugin suffix */
+#mesondefine GST_EXTRA_MODULE_SUFFIX
+
+/* macro to use to show function name */
+#mesondefine GST_FUNCTION
+
+/* Defined if gcov is enabled to force a rebuild due to config.h changing */
+#mesondefine GST_GCOV_ENABLED
+
+/* Defined when registry scanning through fork is unsafe */
+#mesondefine GST_HAVE_UNSAFE_FORK
+
+/* plugin install helper script */
+#mesondefine GST_INSTALL_PLUGINS_HELPER
+
+/* 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 ALSA (used by alsa). */
+#mesondefine HAVE_ALSA
+
+/* ARM NEON support is enabled */
+#mesondefine HAVE_ARM_NEON
+
+/* Define to enable CDParanoia (used by cdparanoia). */
+#mesondefine HAVE_CDPARANOIA
+
+/* 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 if the target CPU is AARCH64 */
+#mesondefine HAVE_CPU_AARCH64
+
+/* Define if the target CPU is an Alpha */
+#mesondefine HAVE_CPU_ALPHA
+
+/* Define if the target CPU is an ARC */
+#mesondefine HAVE_CPU_ARC
+
+/* 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 1 if you have the <dlfcn.h> header file. */
+#mesondefine HAVE_DLFCN_H
+
+/* Define to 1 if you have the <emmintrin.h> header file. */
+#mesondefine HAVE_EMMINTRIN_H
+
+/* 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 fseeko (and presumably ftello) exists and is declared. */
+#mesondefine HAVE_FSEEKO
+
+/* defined if the compiler implements __func__ */
+#mesondefine HAVE_FUNC
+
+/* defined if the compiler implements __FUNCTION__ */
+#mesondefine HAVE_FUNCTION
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#mesondefine HAVE_GETTEXT
+
+/* Define to enable glib GIO unix (used by gio-unix-2.0). */
+#mesondefine HAVE_GIO_UNIX_2_0
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#mesondefine HAVE_GMTIME_R
+
+/* Define if you have the iconv() function and it works. */
+#mesondefine HAVE_ICONV
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#mesondefine HAVE_INTTYPES_H
+
+/* make use of iso-codes for ISO-639 */
+#mesondefine HAVE_ISO_CODES
+
+/* Define to enable integer vorbis plug-in (used by ivorbisdec). */
+#mesondefine HAVE_IVORBIS
+
+/* Define to 1 if you have the `asound' library (-lasound). */
+#mesondefine HAVE_LIBASOUND
+
+/* Define to enable libvisual visualization library (used by libvisual). */
+#mesondefine HAVE_LIBVISUAL
+
+/* Define to 1 if you have the `localtime_r' function. */
+#mesondefine HAVE_LOCALTIME_R
+
+/* Define to 1 if you have the `log2' function. */
+#mesondefine HAVE_LOG2
+
+/* Define if you have C99's lrint function. */
+#mesondefine HAVE_LRINT
+
+/* Define if you have C99's lrintf function. */
+#mesondefine HAVE_LRINTF
+
+/* Define to 1 if you have the <memory.h> header file. */
+#mesondefine HAVE_MEMORY_H
+
+/* Defined if mmap is supported */
+#mesondefine HAVE_MMAP
+
+/* Define to enable Xiph Ogg library (used by ogg). */
+#mesondefine HAVE_OGG
+
+/* Use Orc */
+#mesondefine HAVE_ORC
+
+/* Defined if compiling for OSX */
+#mesondefine HAVE_OSX
+
+/* Define to enable Pango font rendering (used by pango). */
+#mesondefine HAVE_PANGO
+
+/* defined if the compiler implements __PRETTY_FUNCTION__ */
+#mesondefine HAVE_PRETTY_FUNCTION
+
+/* Define to 1 if you have the <process.h> header file. */
+#mesondefine HAVE_PROCESS_H
+
+/* Define if RDTSC is available */
+#mesondefine HAVE_RDTSC
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#mesondefine HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#mesondefine HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#mesondefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#mesondefine HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#mesondefine HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#mesondefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#mesondefine HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#mesondefine HAVE_SYS_WAIT_H
+
+/* Define to enable Xiph Theora video codec (used by theora). */
+#mesondefine HAVE_THEORA
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#mesondefine HAVE_UNISTD_H
+
+/* Define if valgrind should be used */
+#mesondefine HAVE_VALGRIND
+
+/* Define to enable Xiph Vorbis audio codec (used by vorbis). */
+#mesondefine HAVE_VORBIS
+
+/* defined if vorbis_synthesis_restart is present */
+#mesondefine HAVE_VORBIS_SYNTHESIS_RESTART
+
+/* Defined if compiling for Windows */
+#mesondefine HAVE_WIN32
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#mesondefine HAVE_WINSOCK2_H
+
+/* Define to enable X libraries and plugins (used by ximagesink). */
+#mesondefine HAVE_X
+
+/* Define to 1 if you have the <xmmintrin.h> header file. */
+#mesondefine HAVE_XMMINTRIN_H
+
+/* Define to enable X Shared Memory extension. */
+#mesondefine HAVE_XSHM
+
+/* Define to enable X11 XVideo extensions (used by xvimagesink). */
+#mesondefine HAVE_XVIDEO
+
+/* Define to enable zlib support for ID3 parsing in libgsttag. */
+#mesondefine HAVE_ZLIB
+
+/* the host CPU */
+#mesondefine HOST_CPU
+
+/* prefix */
+#mesondefine ISO_CODES_PREFIX
+
+/* */
+#mesondefine ISO_CODES_VERSION
+
+/* directory in which the detected libvisual's plugins are located */
+#mesondefine LIBVISUAL_PLUGINSBASEDIR
+
+/* 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
+
+/* Define to 1 if you have the ANSI C header files. */
+#mesondefine STDC_HEADERS
+
+/* the target CPU */
+#mesondefine TARGET_CPU
+
+/* "Define if building for android" */
+#mesondefine USE_TREMOLO
+
+/* Version number of package */
+#mesondefine VERSION
+
+/* 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
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#mesondefine _FILE_OFFSET_BITS
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#mesondefine _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#mesondefine _LARGE_FILES
+
+/* We need at least WinXP SP2 for __stat64 */
+#mesondefine __MSVCRT_VERSION__
diff --git a/ext/alsa/meson.build b/ext/alsa/meson.build
new file mode 100644
index 000000000..06d65bda2
--- /dev/null
+++ b/ext/alsa/meson.build
@@ -0,0 +1,21 @@
+alsa_sources = [
+ 'gstalsa.c',
+ 'gstalsadeviceprobe.c',
+ 'gstalsamidisrc.c',
+ 'gstalsaplugin.c',
+ 'gstalsasink.c',
+ 'gstalsasrc.c',
+]
+
+alsa_dep = dependency('alsa', version : '>=0.9.1', required : false)
+
+if alsa_dep.found()
+ gstalsa = library('gstalsa',
+ alsa_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [alsa_dep, audio_dep, tag_dep, gst_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/cdparanoia/meson.build b/ext/cdparanoia/meson.build
new file mode 100644
index 000000000..42dc8049a
--- /dev/null
+++ b/ext/cdparanoia/meson.build
@@ -0,0 +1,32 @@
+cdparanoia_deps = []
+cdparanoia_found = false
+
+# cdparanoia upstream has a pkg-config file only in post-10.2 SVN so far, no release yet
+cdparanoia_dep = dependency('cdparanoia-3', version : '>=10.2', required : false)
+if cdparanoia_dep.found()
+ cdparanoia_deps = [cdparanoia_dep]
+ cdparanoia_found = true
+else
+ cdparanoia_dep = cc.find_library('cdda_paranoia', required : false)
+ cdinterface_dep = cc.find_library('cdda_interface', required : false)
+ if cdparanoia_dep.found() and cdinterface_dep.found()
+ cdparanoia_deps = [cdparanoia_dep, cdinterface_dep]
+ cdparanoia_found = true
+ if cc.has_header_symbol('cdda/cdda_interface.h', 'cdda_open')
+ core_conf.set('CDPARANOIA_HEADERS_IN_DIR', true)
+ elif cc.has_header_symbol('cdda_interface.h', 'cdda_open')
+ core_conf.set('CDPARANOIA_HEADERS_IN_DIR', false)
+ endif
+ endif
+endif
+
+if cdparanoia_found
+ gstcdparanoia = library('gstcdparanoia',
+ ['gstcdparanoiasrc.c'],
+ include_directories: [configinc, libsinc],
+ c_args : gst_plugins_base_args,
+ dependencies : cdparanoia_deps + glib_deps + [audio_dep, gst_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/libvisual/meson.build b/ext/libvisual/meson.build
new file mode 100644
index 000000000..197475153
--- /dev/null
+++ b/ext/libvisual/meson.build
@@ -0,0 +1,23 @@
+libvisual_sources = [
+ 'visual.c',
+ 'plugin.c',
+]
+
+libvisual_dep = dependency('libvisual-0.4', version : '>= 0.4.0', required : false)
+if libvisual_dep.found()
+ runcmd = run_command('pkg-config', '--variable=pluginsbasedir', 'libvisual-0.4')
+ if runcmd.returncode() == 0
+ core_conf.set('LIBVISUAL_PLUGINSBASEDIR', '"@0@"'.format(runcmd.stdout().strip()))
+ endif
+endif
+
+if libvisual_dep.found()
+ gstlibvisual = library('gstlibvisual',
+ libvisual_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [libvisual_dep, audio_dep, video_dep, pbutils_dep, gst_dep, gst_base_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..2a9879a84
--- /dev/null
+++ b/ext/meson.build
@@ -0,0 +1,12 @@
+subdir('alsa')
+subdir('cdparanoia')
+if cc.get_id() != 'msvc'
+ # libvisual has MinGW-specific headers which are not compatible with MSVC
+ # If we want to build this with MSVC, we must build libvisual with it too
+ subdir('libvisual')
+endif
+subdir('ogg')
+subdir('opus')
+subdir('pango')
+subdir('theora')
+subdir('vorbis')
diff --git a/ext/ogg/meson.build b/ext/ogg/meson.build
new file mode 100644
index 000000000..2bb0f6178
--- /dev/null
+++ b/ext/ogg/meson.build
@@ -0,0 +1,26 @@
+ogg_sources = [
+ 'dirac_parse.c',
+ 'gstoggaviparse.c',
+ 'gstogg.c',
+ 'gstoggdemux.c',
+ 'gstoggmux.c',
+ 'gstoggparse.c',
+ 'gstoggstream.c',
+ 'gstogmparse.c',
+ 'vorbis_parse.c',
+]
+
+ogg_dep = dependency('ogg', version : '>=1.0', required : false)
+core_conf.set('HAVE_OGG', ogg_dep.found())
+
+if ogg_dep.found()
+ gstogg = library('gstogg',
+ ogg_sources,
+ c_args : gst_plugins_base_args,
+ link_args : noseh_link_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [ogg_dep, audio_dep, pbutils_dep, tag_dep, riff_dep, gst_dep, gst_base_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..e0def6b98
--- /dev/null
+++ b/ext/opus/meson.build
@@ -0,0 +1,21 @@
+opus_sources = [
+ 'gstopus.c',
+ 'gstopuscommon.c',
+ 'gstopusdec.c',
+ 'gstopusenc.c',
+ 'gstopusheader.c',
+]
+
+opus_dep = dependency('opus', version : '>= 0.9.4', required : false)
+
+if opus_dep.found()
+ gstopus = library('gstopus',
+ opus_sources,
+ c_args : gst_plugins_base_args,
+ link_args : noseh_link_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [pbutils_dep, tag_dep, audio_dep, gst_dep, gst_base_dep, opus_dep, libm],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/pango/meson.build b/ext/pango/meson.build
new file mode 100644
index 000000000..89dd68aba
--- /dev/null
+++ b/ext/pango/meson.build
@@ -0,0 +1,21 @@
+pango_sources = [
+ 'gstbasetextoverlay.c',
+ 'gstclockoverlay.c',
+ 'gsttextoverlay.c',
+ 'gsttextrender.c',
+ 'gsttimeoverlay.c',
+]
+
+pango_dep = dependency('pangocairo', version : '>=1.22.0', required : false)
+
+if pango_dep.found()
+ gstpango = library('gstpango',
+ pango_sources,
+ c_args : gst_plugins_base_args,
+ link_args : noseh_link_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [pango_dep, video_dep, gst_dep, gst_base_dep, libm],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/theora/meson.build b/ext/theora/meson.build
new file mode 100644
index 000000000..1b5327edf
--- /dev/null
+++ b/ext/theora/meson.build
@@ -0,0 +1,29 @@
+theora_sources = [
+ 'gsttheora.c',
+ 'gsttheoraparse.c',
+]
+
+theoradec_dep = dependency('theoradec', version : '>=1.1', required : false)
+theoraenc_dep = dependency('theoraenc', version : '>=1.1', required : false)
+core_conf.set('HAVE_THEORA', theoradec_dep.found() and theoraenc_dep.found())
+theora_deps = []
+
+if theoradec_dep.found() or theoraenc_dep.found()
+ if theoradec_dep.found()
+ theora_sources += [ 'gsttheoradec.c' ]
+ theora_deps += theoradec_dep
+ endif
+ if theoraenc_dep.found()
+ theora_sources += [ 'gsttheoraenc.c' ]
+ theora_deps += theoraenc_dep
+ endif
+ gsttheora = library('gsttheora',
+ theora_sources,
+ c_args : gst_plugins_base_args,
+ link_args : noseh_link_args,
+ include_directories: [configinc, libsinc],
+ dependencies : theora_deps + glib_deps + [video_dep, tag_dep, gst_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/ext/vorbis/meson.build b/ext/vorbis/meson.build
new file mode 100644
index 000000000..c0390bace
--- /dev/null
+++ b/ext/vorbis/meson.build
@@ -0,0 +1,54 @@
+vorbis_sources = [
+ 'gstvorbis.c',
+ 'gstvorbisdec.c',
+ 'gstvorbisdeclib.c',
+ 'gstvorbisenc.c',
+ 'gstvorbisparse.c',
+ 'gstvorbistag.c',
+ 'gstvorbiscommon.c',
+]
+
+vorbisidec_sources = [
+ 'gstivorbisdec.c',
+ 'gstvorbisdec.c',
+ 'gstvorbisdeclib.c',
+ 'gstvorbiscommon.c',
+]
+
+vorbis_dep = dependency('vorbis', version : '>=1.0', required : false)
+vorbisenc_dep = dependency('vorbisenc', version : '>=1.0', required : false)
+vorbisidec_dep = dependency('vorbisidec', required : false)
+
+if vorbis_dep.found() or vorbisidec_dep.found()
+ if cc.has_header_symbol('vorbis/codec.h', 'vorbis_synthesis_restart')
+ core_conf.set('HAVE_VORBIS_SYNTHESIS_RESTART', true)
+ endif
+endif
+
+if vorbis_dep.found()
+ vorbis_deps = [vorbis_dep]
+ if vorbisenc_dep.found()
+ vorbis_deps += vorbisenc_dep
+ endif
+ gstvorbis = library('gstvorbis',
+ vorbis_sources,
+ c_args : gst_plugins_base_args,
+ link_args : noseh_link_args,
+ include_directories: [configinc, libsinc],
+ dependencies : vorbis_deps + glib_deps + [audio_dep, tag_dep, gst_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
+
+if vorbisidec_dep.found()
+ gstivorbisdec = library('gstivorbisdec',
+ vorbisidec_sources,
+ c_args : gst_plugins_base_args,
+ link_args : noseh_link_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [vorbisidec_dep, audio_dep, tag_dep, gst_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/gst-libs/gst/allocators/meson.build b/gst-libs/gst/allocators/meson.build
new file mode 100644
index 000000000..2a66aaee8
--- /dev/null
+++ b/gst-libs/gst/allocators/meson.build
@@ -0,0 +1,22 @@
+gst_allocators_headers = [
+ 'allocators.h',
+ 'gstfdmemory.h',
+ 'gstdmabuf.h',
+]
+install_headers(gst_allocators_headers, subdir : 'gstreamer-1.0/gst/allocators/')
+
+gstallocators = library('gstallocators-@0@'.format(api_version),
+ [ 'gstdmabuf.c', 'gstfdmemory.c' ],
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [gst_dep],
+ vs_module_defs: vs_module_defs_dir + 'libgstallocators.def',
+)
+# TODO: generate gir
+
+allocators_dep = declare_dependency(link_with: gstallocators,
+ include_directories : [libsinc],
+ dependencies : [gst_dep])
diff --git a/gst-libs/gst/app/meson.build b/gst-libs/gst/app/meson.build
new file mode 100644
index 000000000..4891a7995
--- /dev/null
+++ b/gst-libs/gst/app/meson.build
@@ -0,0 +1,20 @@
+app_sources = ['gstappsrc.c', 'gstappsink.c']
+
+app_headers = [ 'app.h', 'gstappsrc.h', 'gstappsink.h' ]
+install_headers(app_headers, subdir : 'gstreamer-1.0/gst/app/')
+
+gstapp = library('gstapp-@0@'.format(api_version),
+ app_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [gst_base_dep],
+ vs_module_defs: vs_module_defs_dir + 'libgstapp.def',
+)
+# TODO: generate gir
+
+app_dep = declare_dependency(link_with: gstapp,
+ include_directories : [libsinc],
+ dependencies : [gst_base_dep])
diff --git a/gst-libs/gst/audio/audio_mkenum.py b/gst-libs/gst/audio/audio_mkenum.py
new file mode 100755
index 000000000..b3572de30
--- /dev/null
+++ b/gst-libs/gst/audio/audio_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_AUDIO_ENUM_TYPES_H__\n#define __GST_AUDIO_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_AUDIO_ENUM_TYPES_H__ */',
+ ]
+
+c_array = ['--fhead',
+ "#include \"audio-enumtypes.h\"\n\n#include \"audio.h\" \n#include \"audio-format.h\" \n#include \"audio-channels.h\" \n#include \"audio-info.h\" \n#include \"gstaudioringbuffer.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/gst-libs/gst/audio/meson.build b/gst-libs/gst/audio/meson.build
new file mode 100644
index 000000000..deb06c9a8
--- /dev/null
+++ b/gst-libs/gst/audio/meson.build
@@ -0,0 +1,103 @@
+audio_src= [
+ 'audio.c',
+ 'audio-channel-mixer.c',
+ 'audio-channels.c',
+ 'audio-converter.c',
+ 'audio-format.c',
+ 'audio-info.c',
+ 'audio-quantize.c',
+ 'audio-resampler.c',
+ 'gstaudiobasesink.c',
+ 'gstaudiobasesrc.c',
+ 'gstaudiocdsrc.c',
+ 'gstaudioclock.c',
+ 'gstaudiodecoder.c',
+ 'gstaudioencoder.c',
+ 'gstaudiofilter.c',
+ 'gstaudioiec61937.c',
+ 'gstaudiometa.c',
+ 'gstaudioringbuffer.c',
+ 'gstaudiosink.c',
+ 'gstaudiosrc.c',
+ 'gstaudioutilsprivate.c',
+ 'streamvolume.c',
+]
+
+audio_mkenum_headers = [
+ 'audio.h',
+ 'audio-format.h',
+ 'audio-channels.h',
+ 'audio-channel-mixer.h',
+ 'audio-converter.h',
+ 'audio-info.h',
+ 'audio-quantize.h',
+ 'audio-resampler.h',
+ 'gstaudioringbuffer.h',
+]
+
+# FIXME: check headers
+audio_headers = audio_mkenum_headers + [
+ 'gstaudiobasesink.h',
+ 'gstaudiobasesrc.h',
+ 'gstaudiocdsrc.h',
+ 'gstaudioclock.h',
+ 'gstaudiodecoder.h',
+ 'gstaudioencoder.h',
+ 'gstaudiofilter.h',
+ 'gstaudioiec61937.h',
+ 'gstaudiometa.h',
+ 'gstaudiosink.h',
+ 'gstaudiosrc.h',
+ 'streamvolume.h',
+]
+install_headers(audio_headers, subdir : 'gstreamer-1.0/gst/audio/')
+
+mkenums = find_program('audio_mkenum.py')
+gstaudio_h = custom_target('gstaudioenum_h',
+ output : 'audio-enumtypes.h',
+ input : audio_mkenum_headers,
+ install : true,
+ install_dir : 'include/gstreamer-1.0/gst/audio/',
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+gstaudio_c = custom_target('gstaudioenum_c',
+ output : 'audio-enumtypes.c',
+ input : audio_mkenum_headers,
+ depends : [gstaudio_h],
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+orcsrc = 'gstaudiopack'
+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
+
+gstaudio = library('gstaudio-@0@'.format(api_version),
+ audio_src, gstaudio_h, gstaudio_c, orc_c, orc_h,
+ c_args: gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [tag_dep, gst_base_dep, libm],
+ vs_module_defs: vs_module_defs_dir + 'libgstaudio.def',
+)
+# TODO: generate gir
+
+audio_dep = declare_dependency(link_with : gstaudio,
+ include_directories : [libsinc],
+ dependencies : [gst_base_dep, tag_dep],
+ sources : [gstaudio_h])
diff --git a/gst-libs/gst/fft/meson.build b/gst-libs/gst/fft/meson.build
new file mode 100644
index 000000000..9a5fabb10
--- /dev/null
+++ b/gst-libs/gst/fft/meson.build
@@ -0,0 +1,41 @@
+fft_sources = [
+ 'gstfft.c',
+ 'gstffts16.c',
+ 'gstffts32.c',
+ 'gstfftf32.c',
+ 'gstfftf64.c',
+ 'kiss_fft_s16.c',
+ 'kiss_fft_s32.c',
+ 'kiss_fft_f32.c',
+ 'kiss_fft_f64.c',
+ 'kiss_fftr_s16.c',
+ 'kiss_fftr_s32.c',
+ 'kiss_fftr_f32.c',
+ 'kiss_fftr_f64.c'
+]
+
+fft_headers = [
+ 'fft.h',
+ 'gstfftf32.h',
+ 'gstfftf64.h',
+ 'gstfft.h',
+ 'gstffts16.h',
+ 'gstffts32.h',
+]
+install_headers(fft_headers, subdir : 'gstreamer-1.0/gst/fft/')
+
+gstfft = library('gstfft-@0@'.format(api_version),
+ fft_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [gst_dep, libm],
+ vs_module_defs: vs_module_defs_dir + 'libgstfft.def',
+)
+# TODO: generate gir
+
+fft_dep = declare_dependency(link_with: gstfft,
+ include_directories : [libsinc],
+ dependencies : [gst_dep])
diff --git a/gst-libs/gst/meson.build b/gst-libs/gst/meson.build
new file mode 100644
index 000000000..9f98006c6
--- /dev/null
+++ b/gst-libs/gst/meson.build
@@ -0,0 +1,11 @@
+subdir('tag')
+subdir('fft')
+subdir('rtsp')
+subdir('video')
+subdir('audio')
+subdir('rtp')
+subdir('sdp')
+subdir('pbutils')
+subdir('riff')
+subdir('app')
+subdir('allocators')
diff --git a/gst-libs/gst/pbutils/meson.build b/gst-libs/gst/pbutils/meson.build
new file mode 100644
index 000000000..38383f32b
--- /dev/null
+++ b/gst-libs/gst/pbutils/meson.build
@@ -0,0 +1,69 @@
+pbutils_sources = [
+ 'gstpluginsbaseversion.c',
+ 'pbutils.c',
+ 'codec-utils.c',
+ 'descriptions.c',
+ 'encoding-profile.c',
+ 'encoding-target.c',
+ 'install-plugins.c',
+ 'missing-plugins.c',
+ 'gstaudiovisualizer.c',
+ 'gstdiscoverer.c',
+ 'gstdiscoverer-types.c'
+ ]
+
+pbconf = configuration_data()
+pbconf.set('PACKAGE_VERSION_MAJOR', gst_version_major)
+pbconf.set('PACKAGE_VERSION_MINOR', gst_version_minor)
+pbconf.set('PACKAGE_VERSION_MICRO', gst_version_micro)
+pbconf.set('PACKAGE_VERSION_NANO', gst_version_nano)
+configure_file(input : 'gstpluginsbaseversion.h.in',
+ output: 'gstpluginsbaseversion.h',
+ install_dir : 'include/gstreamer-1.0/gst/pbutils/',
+ configuration: pbconf)
+
+pbutils_headers = [
+ 'pbutils.h',
+ 'codec-utils.h',
+ 'descriptions.h',
+ 'encoding-profile.h',
+ 'encoding-target.h',
+ 'install-plugins.h',
+ 'missing-plugins.h',
+ 'gstdiscoverer.h',
+ 'gstaudiovisualizer.h',
+]
+install_headers(pbutils_headers, subdir : 'gstreamer-1.0/gst/pbutils/')
+
+pbutils_mkenum_headers = pbutils_headers
+
+mkenums = find_program('pbutils_mkenum.py')
+gstpbutils_h = custom_target('gstpbutilsenum_h',
+ output : 'pbutils-enumtypes.h',
+ input : pbutils_mkenum_headers,
+ install : true,
+ install_dir : 'include/gstreamer-1.0/gst/pbutils/',
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+gstpbutils_c = custom_target('gstpbutilsenum_c',
+ output : 'pbutils-enumtypes.c',
+ input : pbutils_mkenum_headers,
+ depends : [gstaudio_h, gstvideo_h, gstpbutils_h],
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+pbutils = library('gstpbutils-@0@'.format(api_version),
+ pbutils_sources, gstpbutils_c, gstpbutils_h,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [video_dep, audio_dep, tag_dep],
+ vs_module_defs: vs_module_defs_dir + 'libgstpbutils.def',
+)
+# TODO: generate gir
+
+pbutils_dep = declare_dependency(link_with : pbutils,
+ include_directories : [libsinc],
+ dependencies : [video_dep, audio_dep, tag_dep],
+ sources : [gstpbutils_h])
diff --git a/gst-libs/gst/pbutils/pbutils_mkenum.py b/gst-libs/gst/pbutils/pbutils_mkenum.py
new file mode 100755
index 000000000..8032c96ca
--- /dev/null
+++ b/gst-libs/gst/pbutils/pbutils_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 __PB_UTILS_ENUM_TYPES_H__\n#define __PB_UTILS_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 /* __PB_UTILS_ENUM_TYPES_H__ */"
+]
+
+c_array = ['--fhead',
+ "#include \"pbutils-enumtypes.h\"\n\n#include \"pbutils.h\" \n#include \"codec-utils.h\" \n#include \"descriptions.h\" \n#include \"encoding-profile.h\" \n#include \"encoding-target.h\" \n#include \"install-plugins.h\" \n#include \"missing-plugins.h\" \n#include \"gstdiscoverer.h\" \n#include \"gstaudiovisualizer.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/gst-libs/gst/riff/meson.build b/gst-libs/gst/riff/meson.build
new file mode 100644
index 000000000..6017348d7
--- /dev/null
+++ b/gst-libs/gst/riff/meson.build
@@ -0,0 +1,29 @@
+riff_sources = [
+ 'riff.c',
+ 'riff-media.c',
+ 'riff-read.c',
+]
+
+riff_headers = [
+ 'riff.h',
+ 'riff-ids.h',
+ 'riff-media.h',
+ 'riff-read.h',
+]
+install_headers(riff_headers, subdir : 'gstreamer-1.0/gst/riff/')
+
+gstriff = library('gstriff-@0@'.format(api_version),
+ riff_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [audio_dep, tag_dep],
+ vs_module_defs: vs_module_defs_dir + 'libgstriff.def',
+)
+# TODO: generate gir
+
+riff_dep = declare_dependency(link_with: gstriff,
+ include_directories : [libsinc],
+ dependencies : [audio_dep, tag_dep])
diff --git a/gst-libs/gst/rtp/meson.build b/gst-libs/gst/rtp/meson.build
new file mode 100644
index 000000000..c79913a33
--- /dev/null
+++ b/gst-libs/gst/rtp/meson.build
@@ -0,0 +1,54 @@
+rtp_sources = [
+ 'gstrtpbuffer.c',
+ 'gstrtcpbuffer.c',
+ 'gstrtppayloads.c',
+ 'gstrtphdrext.c',
+ 'gstrtpbaseaudiopayload.c',
+ 'gstrtpbasepayload.c',
+ 'gstrtpbasedepayload.c'
+ ]
+
+rtp_headers = [
+ 'gstrtcpbuffer.h',
+ 'gstrtpbaseaudiopayload.h',
+ 'gstrtpbasedepayload.h',
+ 'gstrtpbasepayload.h',
+ 'gstrtpbuffer.h',
+ 'gstrtpdefs.h',
+ 'gstrtphdrext.h',
+ 'gstrtppayloads.h',
+ 'rtp.h',
+]
+install_headers(rtp_headers, subdir : 'gstreamer-1.0/gst/rtp/')
+
+mkenums = find_program('rtp_mkenum.py')
+
+gstrtp_enum_h = custom_target('gstrtp_enum_h',
+ output : 'gstrtp-enumtypes.h',
+ input : rtp_headers,
+ install : true,
+ install_dir : 'include/gstreamer-1.0/gst/rtp/',
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+gstrtp_enum_c = custom_target('gstrtp_enum_c',
+ output : 'gstrtp-enumtypes.c',
+ input : rtp_headers,
+ depends : [gstaudio_h, gstrtp_enum_h],
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+gst_rtp = library('gstrtp-@0@'.format(api_version),
+ rtp_sources, gstrtp_enum_c, gstrtp_enum_h,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [audio_dep, gst_base_dep],
+ vs_module_defs: vs_module_defs_dir + 'libgstrtp.def',
+)
+# TODO: generate gir
+
+rtp_dep = declare_dependency(link_with : gst_rtp,
+ include_directories : [libsinc],
+ dependencies : [audio_dep, gst_base_dep],
+ sources : [gstrtp_enum_h])
diff --git a/gst-libs/gst/rtp/rtp_mkenum.py b/gst-libs/gst/rtp/rtp_mkenum.py
new file mode 100755
index 000000000..954fc9065
--- /dev/null
+++ b/gst-libs/gst/rtp/rtp_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_RTP_ENUM_TYPES_H__\n#define __GST_RTP_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_RTP_ENUM_TYPES_H__ */',
+ ]
+
+c_array = ['--fhead',
+ '#include "rtp.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/gst-libs/gst/rtsp/meson.build b/gst-libs/gst/rtsp/meson.build
new file mode 100644
index 000000000..875f6384e
--- /dev/null
+++ b/gst-libs/gst/rtsp/meson.build
@@ -0,0 +1,57 @@
+rtsp_sources = [
+ 'gstrtsptransport.c',
+ 'gstrtspurl.c',
+ 'gstrtspmessage.c',
+ 'gstrtspconnection.c',
+ 'gstrtspdefs.c',
+ 'gstrtspextension.c',
+ 'gstrtsprange.c'
+ ]
+
+rtsp_headers = [
+ 'gstrtspconnection.h',
+ 'gstrtspdefs.h',
+ 'gstrtspextension.h',
+ 'gstrtsp.h',
+ 'gstrtspmessage.h',
+ 'gstrtsprange.h',
+ 'gstrtsptransport.h',
+ 'gstrtspurl.h',
+ 'rtsp.h',
+]
+install_headers(rtsp_headers, subdir : 'gstreamer-1.0/gst/rtsp/')
+
+mkenums = find_program('rtsp_mkenum.py')
+
+gstrtsp_h = custom_target('gstrtspenum_h',
+ output : 'gstrtsp-enumtypes.h',
+ input : rtsp_headers,
+ install : true,
+ install_dir : 'include/gstreamer-1.0/gst/rtsp/',
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+gstrtsp_c = custom_target('gstrtspenum_c',
+ output : 'gstrtsp-enumtypes.c',
+ input : rtsp_headers,
+ depends : [gstrtsp_h],
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+winsock2 = cc.find_library('ws2_32', required : false)
+
+gst_rtsp = library('gstrtsp-@0@'.format(api_version),
+ rtsp_sources,
+ gstrtsp_h, gstrtsp_c,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [gst_dep, gio_dep, libm, winsock2],
+ vs_module_defs: vs_module_defs_dir + 'libgstrtsp.def',
+)
+# TODO: generate gir
+
+rtsp_dep = declare_dependency(link_with : gst_rtsp,
+ include_directories : [libsinc],
+ dependencies : [gst_dep, gio_dep],
+ sources : [gstrtsp_h])
diff --git a/gst-libs/gst/rtsp/rtsp_mkenum.py b/gst-libs/gst/rtsp/rtsp_mkenum.py
new file mode 100755
index 000000000..5cad36b48
--- /dev/null
+++ b/gst-libs/gst/rtsp/rtsp_mkenum.py
@@ -0,0 +1,57 @@
+#!/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_rtsp_ENUM_TYPES_H__\n#define __gst_rtsp_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_rtsp_ENUM_TYPES_H__ */"
+]
+
+c_array = ['--fhead',
+ "#include \"gstrtsp-enumtypes.h\"\n\n#include \"rtsp.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/gst-libs/gst/sdp/meson.build b/gst-libs/gst/sdp/meson.build
new file mode 100644
index 000000000..b68cad781
--- /dev/null
+++ b/gst-libs/gst/sdp/meson.build
@@ -0,0 +1,23 @@
+gst_sdp_headers = [
+ 'sdp.h',
+ 'gstsdp.h',
+ 'gstmikey.h',
+ 'gstsdpmessage.h',
+]
+install_headers(gst_sdp_headers, subdir : 'gstreamer-1.0/gst/sdp/')
+
+gstsdp = library('gstsdp-@0@'.format(api_version),
+ 'gstsdpmessage.c', 'gstmikey.c',
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [rtp_dep, gst_dep, gio_dep],
+ vs_module_defs: vs_module_defs_dir + 'libgstsdp.def',
+)
+# TODO: generate gir
+
+sdp_dep = declare_dependency(link_with: gstsdp,
+ include_directories : [libsinc],
+ dependencies : [rtp_dep, gst_dep, gio_dep])
diff --git a/gst-libs/gst/tag/meson.build b/gst-libs/gst/tag/meson.build
new file mode 100644
index 000000000..33585177d
--- /dev/null
+++ b/gst-libs/gst/tag/meson.build
@@ -0,0 +1,54 @@
+tag_sources = [
+ 'gstvorbistag.c',
+ 'gstid3tag.c',
+ 'gstxmptag.c',
+ 'gstexiftag.c',
+ 'lang.c',
+ 'licenses.c',
+ 'tags.c',
+ 'gsttagdemux.c',
+ 'gsttagmux.c',
+ 'gsttageditingprivate.c',
+ 'id3v2.c',
+ 'id3v2frames.c',
+ 'xmpwriter.c',
+]
+
+tag_headers = [
+ 'gsttagdemux.h',
+ 'gsttagmux.h',
+ 'tag.h',
+ 'xmpwriter.h',
+]
+install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/')
+
+gsttag = library('gsttag-@0@'.format(api_version),
+ tag_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [gst_base_dep, libm],
+ vs_module_defs: vs_module_defs_dir + 'libgsttag.def',
+)
+# TODO: generate gir
+
+tag_dep = declare_dependency(link_with: gsttag,
+ include_directories : [libsinc],
+ dependencies : [gst_base_dep])
+
+# FIXME: iso-codes stuff
+# little program that reads iso_639.xml and outputs tables for us as fallback
+# for when iso-codes are not available (and so we don't have to read the xml
+# just to map codes)
+#executable('mklangtables', 'mklangtables.c',
+# dependencies : gst_dep,
+# install : false,
+#)
+executable('mklicensestables', 'mklicensestables.c',
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc],
+ dependencies : [tag_dep, gst_base_dep],
+ install : false,
+)
diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build
new file mode 100644
index 000000000..7733c8cbf
--- /dev/null
+++ b/gst-libs/gst/video/meson.build
@@ -0,0 +1,132 @@
+video_sources = [
+ 'colorbalance.c',
+ 'colorbalancechannel.c',
+ 'convertframe.c',
+ 'gstvideoaffinetransformationmeta.c',
+ 'gstvideodecoder.c',
+ 'gstvideoencoder.c',
+ 'gstvideofilter.c',
+ 'gstvideometa.c',
+ 'gstvideopool.c',
+ 'gstvideosink.c',
+ 'gstvideotimecode.c',
+ 'gstvideoutils.c',
+ 'gstvideoutilsprivate.c',
+ 'navigation.c',
+ 'video.c',
+ 'video-blend.c',
+ 'video-chroma.c',
+ 'video-color.c',
+ 'video-converter.c',
+ 'video-dither.c',
+ 'video-event.c',
+ 'video-format.c',
+ 'video-frame.c',
+ 'video-info.c',
+ 'video-multiview.c',
+ 'video-resampler.c',
+ 'video-scaler.c',
+ 'video-tile.c',
+ 'video-overlay-composition.c',
+ 'videoorientation.c',
+ 'videooverlay.c',
+]
+
+video_headers = [
+ 'colorbalance.h',
+ 'colorbalancechannel.h',
+ 'gstvideoaffinetransformationmeta.h',
+ 'gstvideodecoder.h',
+ 'gstvideoencoder.h',
+ 'gstvideofilter.h',
+ 'gstvideometa.h',
+ 'gstvideopool.h',
+ 'gstvideosink.h',
+ 'gstvideotimecode.h',
+ 'gstvideoutils.h',
+ 'navigation.h',
+ 'video.h',
+ 'video-event.h',
+ 'video-format.h',
+ 'video-chroma.h',
+ 'video-color.h',
+ 'video-converter.h',
+ 'video-dither.h',
+ 'video-info.h',
+ 'video-frame.h',
+ 'video-scaler.h',
+ 'video-tile.h',
+ 'videoorientation.h',
+ 'videooverlay.h',
+ 'video-resampler.h',
+ 'video-blend.h',
+ 'video-overlay-composition.h',
+ 'video-multiview.h',
+]
+install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/')
+
+video_mkenum_headers = [
+ 'video.h',
+ 'video-format.h',
+ 'video-frame.h',
+ 'video-chroma.h',
+ 'video-color.h',
+ 'video-converter.h',
+ 'video-dither.h',
+ 'video-info.h',
+ 'video-resampler.h',
+ 'video-scaler.h',
+ 'video-tile.h',
+ 'colorbalance.h',
+ 'navigation.h',
+]
+
+mkenums = find_program('video_mkenum.py')
+gstvideo_h = custom_target('gstvideoenum_h',
+ output : 'video-enumtypes.h',
+ input : video_mkenum_headers,
+ install : true,
+ install_dir : 'include/gstreamer-1.0/gst/video/',
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+gstvideo_c = custom_target('gstvideoenum_c',
+ output : 'video-enumtypes.c',
+ input : video_mkenum_headers,
+ depends : [gstvideo_h],
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+orcsrc = 'video-orc'
+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
+
+gstvideo = library('gstvideo-@0@'.format(api_version),
+ video_sources, gstvideo_h, gstvideo_c, orc_c, orc_h,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [gst_base_dep, libm],
+ vs_module_defs: vs_module_defs_dir + 'libgstvideo.def',
+)
+# TODO: generate gir
+
+video_dep = declare_dependency(link_with : gstvideo,
+ include_directories : [libsinc],
+ dependencies : [gst_base_dep],
+ sources : [gstvideo_h])
diff --git a/gst-libs/gst/video/video_mkenum.py b/gst-libs/gst/video/video_mkenum.py
new file mode 100755
index 000000000..b1073f2e1
--- /dev/null
+++ b/gst-libs/gst/video/video_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_VIDEO_ENUM_TYPES_H__\n#define __GST_VIDEO_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_VIDEO_ENUM_TYPES_H__ */"
+]
+
+c_array = ['--fhead',
+ "#include \"video-enumtypes.h\"\n\n#include \"video.h\" \n#include \"video-format.h\" \n#include \"video-color.h\" \n#include \"video-info.h\" \n#include \"colorbalance.h\" \n#include \"navigation.h\" \n#include \"video-chroma.h\" \n#include \"video-tile.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/gst-libs/meson.build b/gst-libs/meson.build
new file mode 100644
index 000000000..668dcbaaf
--- /dev/null
+++ b/gst-libs/meson.build
@@ -0,0 +1 @@
+subdir('gst')
diff --git a/gst/adder/meson.build b/gst/adder/meson.build
new file mode 100644
index 000000000..dcd0c5fcd
--- /dev/null
+++ b/gst/adder/meson.build
@@ -0,0 +1,27 @@
+orcsrc = 'gstadderorc'
+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
+
+adder = library('gstadder',
+ 'gstadder.c', orc_c, orc_h,
+ c_args: gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [audio_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/app/meson.build b/gst/app/meson.build
new file mode 100644
index 000000000..90873a91b
--- /dev/null
+++ b/gst/app/meson.build
@@ -0,0 +1,8 @@
+adder = library('gstapp',
+ 'gstapp.c',
+ c_args: gst_plugins_base_args,
+ include_directories: [configinc],
+ dependencies : [gst_base_dep, app_dep, tag_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/audioconvert/meson.build b/gst/audioconvert/meson.build
new file mode 100644
index 000000000..ffe914dbe
--- /dev/null
+++ b/gst/audioconvert/meson.build
@@ -0,0 +1,13 @@
+aconv_sources = [
+ 'gstaudioconvert.c',
+ 'plugin.c'
+ ]
+
+gstaudioconvert = library('gstaudioconvert',
+ aconv_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [audio_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/audiorate/meson.build b/gst/audiorate/meson.build
new file mode 100644
index 000000000..a5862693e
--- /dev/null
+++ b/gst/audiorate/meson.build
@@ -0,0 +1,8 @@
+audiorate = library('gstaudiorate',
+ 'gstaudiorate.c',
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [audio_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/audioresample/meson.build b/gst/audioresample/meson.build
new file mode 100644
index 000000000..6dcfd8807
--- /dev/null
+++ b/gst/audioresample/meson.build
@@ -0,0 +1,10 @@
+resample_sources = ['gstaudioresample.c']
+
+audioresample = library('gstaudioresample',
+ resample_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [audio_dep, gst_base_dep, libm],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/audiotestsrc/meson.build b/gst/audiotestsrc/meson.build
new file mode 100644
index 000000000..14df1dfd5
--- /dev/null
+++ b/gst/audiotestsrc/meson.build
@@ -0,0 +1,8 @@
+audiotest = library('gstaudiotestsrc',
+ 'gstaudiotestsrc.c', gstaudio_h,
+ c_args: gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [audio_dep, gst_base_dep, libm],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/encoding/meson.build b/gst/encoding/meson.build
new file mode 100644
index 000000000..c2f025565
--- /dev/null
+++ b/gst/encoding/meson.build
@@ -0,0 +1,14 @@
+encoding_sources = ['gstencodebin.c',
+ 'gstsmartencoder.c',
+ 'gststreamcombiner.c',
+ 'gststreamsplitter.c',
+ ]
+
+gstencoding = library('gstencodebin',
+ encoding_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [pbutils_dep, video_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/gio/meson.build b/gst/gio/meson.build
new file mode 100644
index 000000000..4c0b46ea9
--- /dev/null
+++ b/gst/gio/meson.build
@@ -0,0 +1,17 @@
+gio_sources = ['gstgio.c',
+ 'gstgiobasesink.c',
+ 'gstgiobasesrc.c',
+ 'gstgiosink.c',
+ 'gstgiosrc.c',
+ 'gstgiostreamsink.c',
+ 'gstgiostreamsrc.c',
+]
+
+gstgio = library('gstgio',
+ gio_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [gst_base_dep, gio_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/meson.build b/gst/meson.build
new file mode 100644
index 000000000..03d7c66a9
--- /dev/null
+++ b/gst/meson.build
@@ -0,0 +1,17 @@
+subdir('adder')
+subdir('app')
+subdir('audioconvert')
+subdir('audiorate')
+subdir('audioresample')
+subdir('audiotestsrc')
+subdir('encoding')
+subdir('gio')
+subdir('playback')
+subdir('subparse')
+subdir('tcp')
+subdir('typefind')
+subdir('videoconvert')
+subdir('videorate')
+subdir('videoscale')
+subdir('videotestsrc')
+subdir('volume')
diff --git a/gst/playback/meson.build b/gst/playback/meson.build
new file mode 100644
index 000000000..d8411a284
--- /dev/null
+++ b/gst/playback/meson.build
@@ -0,0 +1,27 @@
+playback_sources = [
+ 'gstdecodebin2.c',
+ 'gstdecodebin3.c',
+ 'gsturidecodebin.c',
+ 'gsturisourcebin.c',
+ 'gstparsebin.c',
+ 'gstplayback.c',
+ 'gstplaybackutils.c',
+ 'gstplaybin2.c',
+ 'gstplaybin3.c',
+ 'gstplaysink.c',
+ 'gstplay-enum.c',
+ 'gstsubtitleoverlay.c',
+ 'gstplaysinkvideoconvert.c',
+ 'gstplaysinkaudioconvert.c',
+ 'gstplaysinkconvertbin.c',
+ 'gststreamsynchronizer.c'
+]
+
+gstplayback = library('gstplayback',
+ playback_sources,
+ c_args : gst_plugins_base_args + ['-DCOLORSPACE="videoconvert"'],
+ include_directories: [configinc, libsinc],
+ dependencies : [audio_dep, video_dep, pbutils_dep, tag_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/subparse/meson.build b/gst/subparse/meson.build
new file mode 100644
index 000000000..f3b02ac10
--- /dev/null
+++ b/gst/subparse/meson.build
@@ -0,0 +1,17 @@
+subparse_sources = [
+ 'gstssaparse.c',
+ 'gstsubparse.c',
+ 'samiparse.c',
+ 'tmplayerparse.c',
+ 'mpl2parse.c',
+ 'qttextparse.c',
+]
+
+gstsubparse = library('gstsubparse',
+ subparse_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/tcp/meson.build b/gst/tcp/meson.build
new file mode 100644
index 000000000..712937164
--- /dev/null
+++ b/gst/tcp/meson.build
@@ -0,0 +1,23 @@
+tcp_sources = [
+ 'gstmultihandlesink.c',
+ 'gstmultisocketsink.c',
+ 'gstsocketsrc.c',
+ 'gsttcpclientsrc.c',
+ 'gsttcpclientsink.c',
+ 'gsttcpserversrc.c',
+ 'gsttcpserversink.c',
+ 'gsttcpplugin.c',
+]
+
+if core_conf.has('HAVE_SYS_SOCKET_H')
+ tcp_sources += 'gstmultifdsink.c'
+endif
+
+gsttcp = library('gsttcp',
+ tcp_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [gio_dep, gst_base_dep, gst_net_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/typefind/meson.build b/gst/typefind/meson.build
new file mode 100644
index 000000000..bae11f079
--- /dev/null
+++ b/gst/typefind/meson.build
@@ -0,0 +1,8 @@
+gsttypefind = library('gsttypefindfunctions',
+ 'gsttypefindfunctions.c',
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [pbutils_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/videoconvert/meson.build b/gst/videoconvert/meson.build
new file mode 100644
index 000000000..e0fbd4bdc
--- /dev/null
+++ b/gst/videoconvert/meson.build
@@ -0,0 +1,12 @@
+vconvert_sources = [
+ 'gstvideoconvert.c',
+]
+
+gstvideoconvert = library('gstvideoconvert',
+ vconvert_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [video_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/videorate/meson.build b/gst/videorate/meson.build
new file mode 100644
index 000000000..df386fce2
--- /dev/null
+++ b/gst/videorate/meson.build
@@ -0,0 +1,8 @@
+gstvideorate = library('gstvideorate',
+ 'gstvideorate.c',
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [video_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/videoscale/meson.build b/gst/videoscale/meson.build
new file mode 100644
index 000000000..1a0916ad6
--- /dev/null
+++ b/gst/videoscale/meson.build
@@ -0,0 +1,12 @@
+videoscale_sources = [
+ 'gstvideoscale.c',
+]
+
+gstvideoscale = library('gstvideoscale',
+ videoscale_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [video_dep, gst_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/videotestsrc/meson.build b/gst/videotestsrc/meson.build
new file mode 100644
index 000000000..d9fd400c0
--- /dev/null
+++ b/gst/videotestsrc/meson.build
@@ -0,0 +1,27 @@
+orcsrc = 'gstvideotestsrcorc'
+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
+
+gstvideotestsrc = library('gstvideotestsrc',
+ 'gstvideotestsrc.c', 'videotestsrc.c', orc_c, orc_h,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [video_dep, gst_dep, gst_base_dep, libm],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/gst/volume/meson.build b/gst/volume/meson.build
new file mode 100644
index 000000000..e5bdd8809
--- /dev/null
+++ b/gst/volume/meson.build
@@ -0,0 +1,26 @@
+orcsrc = 'gstvolumeorc'
+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
+
+gstvolume = library('gstvolume', 'gstvolume.c', orc_c, orc_h,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [audio_dep, gst_dep, gst_base_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000..3e17022ce
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,185 @@
+project('gst-plugins-base', 'c', 'cpp',
+ version : '1.9.1.1',
+ meson_version : '>= 0.33.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'
+soversion = 0
+# maintaining compatibility with the previous libtool versioning
+# current = minor * 100 + micro
+# FIXME: should be able to convert string to int somehow so we can just do maths
+libversion = '@0@.@1@.0'.format(soversion, gst_version_minor.to_int() * 100 + gst_version_micro.to_int())
+
+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
+
+core_conf = configuration_data()
+check_headers = [
+ ['HAVE_DLFCN_H', 'dlfcn.h'],
+ ['HAVE_EMMINTRIN_H', 'emmintrin.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_SOCKET_H', 'sys/socket.h'],
+ ['HAVE_SYS_STAT_H', 'sys/stat.h'],
+ ['HAVE_SYS_TYPES_H', 'sys/types.h'],
+ ['HAVE_SYS_WAIT_H', 'sys/wait.h'],
+ ['HAVE_UNISTD_H', 'unistd.h'],
+ ['HAVE_WINSOCK2_H', 'winsock2.h'],
+ ['HAVE_XMMINTRIN_H', 'xmmintrin.h'],
+]
+foreach h : check_headers
+ if cc.has_header(h.get(1))
+ core_conf.set(h.get(0), 1)
+ endif
+endforeach
+
+check_functions = [
+ ['HAVE_DCGETTEXT', 'dcgettext'],
+ ['HAVE_GMTIME_R', 'gmtime_r'],
+ ['HAVE_LRINTF', 'lrintf'],
+ ['HAVE_MMAP', 'mmap'],
+]
+
+foreach f : check_functions
+ if cc.has_function(f.get(1))
+ core_conf.set(f.get(0), 1)
+ endif
+endforeach
+
+core_conf.set('SIZEOF_CHAR', cc.sizeof('char'))
+core_conf.set('SIZEOF_INT', cc.sizeof('int'))
+core_conf.set('SIZEOF_LONG', cc.sizeof('long'))
+core_conf.set('SIZEOF_SHORT', cc.sizeof('short'))
+core_conf.set('SIZEOF_VOIDP', cc.sizeof('void*'))
+
+core_conf.set('GETTEXT_PACKAGE', '"gst-plugins-base-1.0"')
+core_conf.set('PACKAGE', '"gst-plugins-base"')
+core_conf.set('VERSION', '"@0@"'.format(gst_version))
+core_conf.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
+core_conf.set('GST_PACKAGE_NAME', '"GStreamer Base Plug-ins"')
+core_conf.set('GST_PACKAGE_ORIGIN', '"Unknown package origin"')
+core_conf.set('GST_API_VERSION', '"@0@"'.format(api_version))
+core_conf.set('GST_INSTALL_PLUGINS_HELPER', '"/FIXME"')
+core_conf.set('GST_DATADIR', '"/FIXME"')
+core_conf.set('GST_LICENSE', '"LGPL"')
+core_conf.set('DISABLE_ORC', 1)
+# FIXME: These should be configure options
+core_conf.set('DEFAULT_VIDEOSINK', '"autovideosink"')
+core_conf.set('DEFAULT_AUDIOSINK', '"autoaudiosink"')
+
+# Set whether the audioresampling method should be detected at runtime
+core_conf.set('AUDIORESAMPLE_FORMAT_' + get_option('audioresample_format').to_upper(), true)
+
+gst_plugins_base_args = ['-DHAVE_CONFIG_H']
+if get_option('default_library') == 'static'
+ gst_plugins_base_args += ['-DGST_STATIC_COMPILATION']
+endif
+
+libm = cc.find_library('m', required : false)
+# X11 checks are for sys/ and tests/
+x11_dep = dependency('x11', required : false)
+# GLib checks are for the entire project
+giounix_dep = dependency('gio-unix-2.0', version : glib_req, required : false)
+# Almost everything that uses glib also uses gobject
+glib_deps = [dependency('glib-2.0', version : glib_req),
+ dependency('gobject-2.0', version : glib_req)]
+gio_dep = dependency('gio-2.0', version : glib_req)
+
+core_conf.set('HAVE_X', x11_dep.found())
+core_conf.set('HAVE_GIO_UNIX_2_0', giounix_dep.found())
+
+runcmd = run_command('pkg-config', '--variable=giomoduledir', 'gio-2.0')
+if runcmd.returncode() == 0
+ core_conf.set('GIO_MODULE_DIR', '"@0@"'.format(runcmd.stdout().strip()))
+endif
+runcmd = run_command('pkg-config', '--variable=libdir', 'gio-2.0')
+if runcmd.returncode() == 0
+ core_conf.set('GIO_LIBDIR', '"@0@"'.format(runcmd.stdout().strip()))
+endif
+runcmd = run_command('pkg-config', '--variable=prefix', 'gio-2.0')
+if runcmd.returncode() == 0
+ core_conf.set('GIO_PREFIX', '"@0@"'.format(runcmd.stdout().strip()))
+endif
+
+configinc = include_directories('.')
+libsinc = include_directories('gst-libs')
+
+# To use the subproject make subprojects directory
+# and put gstreamer meson git there (symlinking is fine)
+gst_dep = dependency('gstreamer-1.0', version : gst_req,
+ fallback : ['gstreamer', 'gst_dep'])
+gst_base_dep = dependency('gstreamer-base-1.0', version : gst_req,
+ fallback : ['gstreamer', 'gst_base_dep'])
+gst_net_dep = dependency('gstreamer-net-1.0', version : gst_req,
+ fallback : ['gstreamer', 'gst_net_dep'])
+gst_check_dep = dependency('gstreamer-check-1.0', version : gst_req,
+ fallback : ['gstreamer', 'gst_check_dep'])
+gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
+ fallback : ['gstreamer', 'gst_controller_dep'])
+
+vs_module_defs_dir = meson.source_root() + '/win32/common/'
+
+# Used by the *_mkenum.py helper scripts
+glib_mkenums = find_program('glib-mkenums')
+
+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
+ orcc = find_program('orcc', required : need_orc)
+ if orcc.found()
+ have_orcc = true
+ orcc_args = [orcc, '--include', 'glib.h']
+ else
+ message('Orc Compiler not found, will use backup C code')
+ endif
+endif
+
+subdir('gst-libs')
+subdir('gst')
+subdir('ext')
+subdir('sys')
+subdir('tools')
+subdir('tests')
+subdir('pkgconfig')
+
+# Use core_conf after all subdirs have set values
+configure_file(input : 'config.h.meson',
+ output : 'config.h',
+ configuration : core_conf)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 000000000..d44b3f301
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,2 @@
+option('audioresample_format', type : 'combo', choices : ['int', 'float', 'auto'], value : 'auto')
+option('use_orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build
new file mode 100644
index 000000000..578f39e51
--- /dev/null
+++ b/pkgconfig/meson.build
@@ -0,0 +1,35 @@
+pkgconf = configuration_data()
+
+pkgconf.set('prefix', get_option('prefix'))
+pkgconf.set('exec_prefix', '${prefix}')
+pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
+pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
+pkgconf.set('GST_API_VERSION', api_version)
+pkgconf.set('VERSION', gst_version)
+
+pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
+
+pkg_files = [
+ 'gstreamer-allocators',
+ 'gstreamer-app',
+ 'gstreamer-audio',
+ 'gstreamer-fft',
+ 'gstreamer-pbutils',
+ 'gstreamer-plugins-base',
+ 'gstreamer-riff',
+ 'gstreamer-rtp',
+ 'gstreamer-rtsp',
+ 'gstreamer-sdp',
+ 'gstreamer-tag',
+ 'gstreamer-video',
+]
+
+# FIXME: -uninstalled.pc files (if still needed?)
+foreach p : pkg_files
+ infile = p + '.pc.in'
+ outfile = p + '-1.0.pc'
+ configure_file(input : infile,
+ output : outfile,
+ configuration : pkgconf,
+ install_dir : pkg_install_dir)
+endforeach
diff --git a/sys/meson.build b/sys/meson.build
new file mode 100644
index 000000000..da6dc2400
--- /dev/null
+++ b/sys/meson.build
@@ -0,0 +1,9 @@
+if x11_dep.found()
+ # XShm is only used by ximage and xvimage
+ # FIXME: Need to check for XShmAttach inside libXext
+ xshm_dep = dependency('xext', required : false)
+ core_conf.set('HAVE_XSHM', xshm_dep.found())
+
+ subdir('ximage')
+ subdir('xvimage')
+endif
diff --git a/sys/ximage/meson.build b/sys/ximage/meson.build
new file mode 100644
index 000000000..063b14792
--- /dev/null
+++ b/sys/ximage/meson.build
@@ -0,0 +1,8 @@
+gstximage = library('gstximagesink',
+ 'ximagesink.c', 'ximage.c', 'ximagepool.c',
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [video_dep, gst_base_dep, gst_dep, x11_dep, xshm_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+)
diff --git a/sys/xvimage/meson.build b/sys/xvimage/meson.build
new file mode 100644
index 000000000..2c736aff1
--- /dev/null
+++ b/sys/xvimage/meson.build
@@ -0,0 +1,21 @@
+xvimage_sources = [
+ 'xvcontext.c',
+ 'xvimage.c',
+ 'xvimageallocator.c',
+ 'xvimagepool.c',
+ 'xvimagesink.c',
+]
+
+xvideo_dep = dependency('xv', required : false)
+core_conf.set('HAVE_XVIDEO', x11_dep.found() and xvideo_dep.found())
+
+if xvideo_dep.found()
+ gstxvimage = library('gstxvimage',
+ xvimage_sources,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc, libsinc],
+ dependencies : glib_deps + [video_dep, gst_base_dep, gst_dep, x11_dep, xshm_dep, xvideo_dep, libm],
+ 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 000000000..e60aa8175
--- /dev/null
+++ b/tests/check/meson.build
@@ -0,0 +1,137 @@
+have_registry = true # FIXME not get_option('disable_registry')
+
+# name, condition when to skip the test and extra dependencies
+base_tests = [
+ [ 'gst/typefindfunctions', not have_registry ],
+ [ 'libs/allocators' ],
+ [ 'libs/audio' ],
+ [ 'libs/audiocdsrc' ],
+ [ 'libs/audiodecoder' ],
+ [ 'libs/audioencoder' ],
+ [ 'libs/baseaudiovisualizer' ],
+ [ 'libs/discoverer' ],
+ [ 'libs/fft' ],
+ [ 'libs/libsabi' ],
+ [ 'libs/mikey' ],
+ [ 'libs/navigation' ],
+ [ 'libs/pbutils' ],
+ [ 'libs/profile' ],
+ [ 'libs/rtpbasedepayload' ],
+ [ 'libs/rtpbasepayload' ],
+ [ 'libs/rtp' ],
+ [ 'libs/rtsp' ],
+ [ 'libs/rtspconnection' ],
+ [ 'libs/sdp' ],
+ [ 'libs/tag' ],
+# [ 'libs/video' ], # FIXME: times out, perhaps split or spawn conversions into benchmark tool and/or multiple threads
+ [ 'libs/videodecoder' ],
+ [ 'libs/videoencoder' ],
+ [ 'libs/videotimecode' ],
+ [ 'libs/xmpwriter' ],
+ [ 'elements/adder' ],
+ [ 'elements/appsink' ],
+ [ 'elements/appsrc' ],
+ [ 'elements/audioconvert' ],
+ [ 'elements/audiorate' ],
+ [ 'elements/audiotestsrc' ],
+ [ 'elements/audioresample' ],
+ [ 'elements/libvisual', not libvisual_dep.found() ],
+ [ 'elements/decodebin' ],
+ [ 'elements/encodebin', not theoraenc_dep.found() or not vorbisenc_dep.found() ],
+ [ 'elements/multifdsink' ],
+ [ 'elements/multisocketsink' ],
+ [ 'elements/playbin' ],
+ [ 'elements/playbin-complex' ],
+ [ 'elements/playsink' ],
+ [ 'elements/streamsynchronizer' ],
+ [ 'elements/subparse' ],
+ [ 'elements/textoverlay', not pango_dep.found() ],
+ [ 'elements/videoconvert' ],
+ [ 'elements/videorate' ],
+ [ 'elements/videoscale' ],
+ [ 'elements/videotestsrc' ],
+ [ 'elements/volume', false, [ gst_controller_dep ] ],
+ [ 'elements/vorbisdec', not vorbis_dep.found(), [ vorbis_dep, vorbisenc_dep ] ],
+ [ 'elements/vorbistag', not vorbisenc_dep.found(), [ vorbis_dep, vorbisenc_dep ] ],
+ [ 'generic/clock-selection' ],
+ [ 'generic/states' ],
+ [ 'pipelines/simple-launch-lines' ],
+ [ 'pipelines/basetime' ],
+ [ 'pipelines/capsfilter-renegotiation' ],
+ [ 'pipelines/gio' ],
+ [ 'pipelines/oggmux', not ogg_dep.found(), [ ogg_dep, ] ],
+ [ 'pipelines/streamsynchronizer' ],
+ [ 'pipelines/tcp' ], # FIXME: -DHAVE_GIO_UNIX_2_0=1
+ [ 'pipelines/theoraenc', not theoraenc_dep.found(), [ theoraenc_dep ] ],
+ [ 'pipelines/vorbisenc', not vorbisenc_dep.found() ],
+ [ 'pipelines/vorbisdec', not vorbisenc_dep.found(),],
+]
+
+# FIXME: enable orc testing
+#orc_tests = [
+# 'orc/video',
+# 'orc/audio',
+# 'orc/adder',
+# 'orc/volume',
+# 'orc/videotestsrc'
+#]
+
+test_defines = [
+ '-UG_DISABLE_ASSERT',
+ '-UG_DISABLE_CAST_CHECKS',
+ '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_PLUGIN_LOADING_WHITELIST"',
+ '-DGST_TEST_FILES_PATH="' + meson.source_root() + '/tests/files"',
+ '-DGST_TEST_FILE="' + meson.source_root() + '/tests/files/partialframe.mjpeg"', # for libs/discoverer
+ '-DGST_USE_UNSTABLE_API',
+]
+
+runcmd = run_command('pkg-config', '--variable=pluginsdir', 'gstreamer-1.0')
+if runcmd.returncode() == 0
+ core_plugins_dir = runcmd.stdout().strip()
+ message('Using GStreamer plug-ins in ' + core_plugins_dir)
+else
+ error('Could not determine GStreamer core plugins directory for unit tests.')
+endif
+
+test_env = [
+ 'GST_PLUGIN_SYSTEM_PATH_1_0=',
+ 'GST_PLUGIN_PATH_1_0=' + meson.build_root() + '/gst:' + meson.build_root() + '/ext:' + meson.build_root() + '/sys:' + core_plugins_dir,
+ 'GST_PLUGIN_LOADING_WHITELIST=gstreamer:gst-plugins-base@' + meson.build_root(),
+ 'GST_TAG_LICENSE_TRANSLATIONS_DICT=' + meson.source_root() + '/gst-libs/gst/tag/license-translations.dict',
+ 'GST_STATE_IGNORE_ELEMENTS=cdio cdparanoiasrc libvisual_ alsasrc alsasink',
+ 'CK_DEFAULT_TIMEOUT=20',
+]
+
+test_deps = [gst_dep, gst_base_dep, gst_net_dep, gst_check_dep, audio_dep,
+ video_dep, pbutils_dep, rtp_dep, rtsp_dep, tag_dep, allocators_dep, app_dep,
+ fft_dep, riff_dep, sdp_dep, gio_dep] + glib_deps
+
+foreach t : base_tests
+ test_name = t.get(0)
+ extra_deps = [ ]
+ if t.length() == 3
+ extra_deps = t.get(2)
+ skip_test = t.get(1)
+ elif t.length() == 2
+ skip_test = t.get(1)
+ else
+ skip_test = false
+ endif
+ if not skip_test
+ exe = executable(test_name, '@0@.c'.format(test_name),
+ include_directories : [configinc],
+ c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines,
+ dependencies : [libm] + test_deps + extra_deps,
+ )
+ test(test_name, exe,
+ env: test_env + ['GST_REGISTRY=@0@/@1@.registry'.format(meson.current_build_dir(), test_name)]
+ )
+ endif
+endforeach
+
+# ===============> FIXME <==========
+test('gstlibscpp', executable('gstlibscpp', 'libs/gstlibscpp.cc',
+ include_directories : [configinc],
+ cpp_args : gst_plugins_base_args,
+ dependencies : test_deps),
+ env: test_env + [ 'GST_REGISTRY=@0@/gstlibscpp.registry'.format(meson.current_build_dir()) ])
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 000000000..9133bed94
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,4 @@
+#subdir('check')
+#subdir('examples')
+#subdir('files')
+#subdir('icles')
diff --git a/tools/meson.build b/tools/meson.build
new file mode 100644
index 000000000..98757eb40
--- /dev/null
+++ b/tools/meson.build
@@ -0,0 +1,25 @@
+tool_deps = glib_deps + [pbutils_dep, audio_dep, video_dep, tag_dep, gst_dep, gst_base_dep]
+
+executable('gst-device-monitor-@0@'.format(api_version),
+ 'gst-device-monitor.c',
+ install: true,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc],
+ dependencies : tool_deps,
+)
+
+executable('gst-discoverer-@0@'.format(api_version),
+ 'gst-discoverer.c',
+ install: true,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc],
+ dependencies : tool_deps,
+)
+
+executable('gst-play-@0@'.format(api_version),
+ 'gst-play.c', 'gst-play-kb.c',
+ install: true,
+ c_args : gst_plugins_base_args,
+ include_directories: [configinc],
+ dependencies : tool_deps + [libm],
+)