Add support for Meson as alternative/parallel build system

https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
This commit is contained in:
Nirbheek Chauhan 2016-08-12 20:56:31 +05:30 committed by Tim-Philipp Müller
parent 9cbdaa8c27
commit 5c4f4ac1bd
56 changed files with 2248 additions and 1 deletions

4
.gitignore vendored
View file

@ -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

405
config.h.meson Normal file
View file

@ -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__

21
ext/alsa/meson.build Normal file
View file

@ -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

View file

@ -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

23
ext/libvisual/meson.build Normal file
View file

@ -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

12
ext/meson.build Normal file
View file

@ -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')

26
ext/ogg/meson.build Normal file
View file

@ -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

21
ext/opus/meson.build Normal file
View file

@ -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

21
ext/pango/meson.build Normal file
View file

@ -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

29
ext/theora/meson.build Normal file
View file

@ -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

54
ext/vorbis/meson.build Normal file
View file

@ -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

View file

@ -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])

View file

@ -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])

View file

@ -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)

View file

@ -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])

View file

@ -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])

11
gst-libs/gst/meson.build Normal file
View file

@ -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')

View file

@ -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])

View file

@ -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)

View file

@ -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])

View file

@ -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])

55
gst-libs/gst/rtp/rtp_mkenum.py Executable file
View file

@ -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)

View file

@ -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])

View file

@ -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)

View file

@ -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])

View file

@ -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,
)

View file

@ -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])

View file

@ -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)

1
gst-libs/meson.build Normal file
View file

@ -0,0 +1 @@
subdir('gst')

27
gst/adder/meson.build Normal file
View file

@ -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,
)

8
gst/app/meson.build Normal file
View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,
)

14
gst/encoding/meson.build Normal file
View file

@ -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,
)

17
gst/gio/meson.build Normal file
View file

@ -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,
)

17
gst/meson.build Normal file
View file

@ -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')

27
gst/playback/meson.build Normal file
View file

@ -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,
)

17
gst/subparse/meson.build Normal file
View file

@ -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,
)

23
gst/tcp/meson.build Normal file
View file

@ -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,
)

8
gst/typefind/meson.build Normal file
View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,
)

26
gst/volume/meson.build Normal file
View file

@ -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,
)

185
meson.build Normal file
View file

@ -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)

2
meson_options.txt Normal file
View file

@ -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')

35
pkgconfig/meson.build Normal file
View file

@ -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

9
sys/meson.build Normal file
View file

@ -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

8
sys/ximage/meson.build Normal file
View file

@ -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,
)

21
sys/xvimage/meson.build Normal file
View file

@ -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

137
tests/check/meson.build Normal file
View file

@ -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()) ])

4
tests/meson.build Normal file
View file

@ -0,0 +1,4 @@
#subdir('check')
#subdir('examples')
#subdir('files')
#subdir('icles')

25
tools/meson.build Normal file
View file

@ -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],
)