[vlc-devel] [PATCH 1/1] [RFC] Meson: Add meson build system

Marvin Scholz epirat07 at gmail.com
Tue Aug 6 10:41:33 CEST 2019


On 5 Aug 2019, at 11:39, Thomas Guillem wrote:

> Hello, this diff is huge.
>
> Is it possible to post this work on our gitlab or your github and go 
> by these platforms for the comments ?

Sure I've created 
https://code.videolan.org/ePirat/VLC/tree/meson-preview
(I do my work on the "meson" branch but that one is frequently rebased, 
so not really a good placed
to make comments)


>
> On Thu, Aug 1, 2019, at 12:40, Marvin Scholz wrote:
>> ---
>>  bin/meson.build                        |  33 ++
>>  compat/meson.build                     |  13 +
>>  config.h.meson                         | 638 +++++++++++++++++++++
>>  extras/buildsystem/gen-vlc-about.py    |  34 ++
>>  include/meson.build                    | 126 ++++
>>  lib/meson.build                        |  26 +
>>  meson.build                            | 759 
>> +++++++++++++++++++++++++
>>  meson_options.txt                      | 333 +++++++++++
>>  modules/access/http/meson.build        |  93 +++
>>  modules/access/meson.build             | 182 ++++++
>>  modules/audio_filter/meson.build       | 215 +++++++
>>  modules/audio_mixer/meson.build        |  13 +
>>  modules/audio_output/meson.build       |  61 ++
>>  modules/codec/meson.build              | 584 +++++++++++++++++++
>>  modules/control/meson.build            |  49 ++
>>  modules/demux/meson.build              | 473 +++++++++++++++
>>  modules/gui/meson.build                |  30 +
>>  modules/gui/qt/meson.build             | 265 +++++++++
>>  modules/keystore/meson.build           |  47 ++
>>  modules/logger/meson.build             |  31 +
>>  modules/meson.build                    | 157 +++++
>>  modules/meta_engine/meson.build        |  15 +
>>  modules/misc/meson.build               | 160 ++++++
>>  modules/packetizer/meson.build         |  98 ++++
>>  modules/services_discovery/meson.build |  71 +++
>>  modules/text_renderer/meson.build      |  11 +
>>  modules/video_chroma/meson.build       |  20 +
>>  modules/video_filter/meson.build       |  25 +
>>  modules/video_output/meson.build       | 164 ++++++
>>  modules/video_splitter/meson.build     |  24 +
>>  modules/visualization/meson.build      |  29 +
>>  src/meson.build                        | 268 +++++++++
>>  src/revision.c.in                      |   2 +
>>  33 files changed, 5049 insertions(+)
>>  create mode 100644 bin/meson.build
>>  create mode 100644 compat/meson.build
>>  create mode 100644 config.h.meson
>>  create mode 100644 extras/buildsystem/gen-vlc-about.py
>>  create mode 100644 include/meson.build
>>  create mode 100644 lib/meson.build
>>  create mode 100644 meson.build
>>  create mode 100644 meson_options.txt
>>  create mode 100644 modules/access/http/meson.build
>>  create mode 100644 modules/access/meson.build
>>  create mode 100644 modules/audio_filter/meson.build
>>  create mode 100644 modules/audio_mixer/meson.build
>>  create mode 100644 modules/audio_output/meson.build
>>  create mode 100644 modules/codec/meson.build
>>  create mode 100644 modules/control/meson.build
>>  create mode 100644 modules/demux/meson.build
>>  create mode 100644 modules/gui/meson.build
>>  create mode 100644 modules/gui/qt/meson.build
>>  create mode 100644 modules/keystore/meson.build
>>  create mode 100644 modules/logger/meson.build
>>  create mode 100644 modules/meson.build
>>  create mode 100644 modules/meta_engine/meson.build
>>  create mode 100644 modules/misc/meson.build
>>  create mode 100644 modules/packetizer/meson.build
>>  create mode 100644 modules/services_discovery/meson.build
>>  create mode 100644 modules/text_renderer/meson.build
>>  create mode 100644 modules/video_chroma/meson.build
>>  create mode 100644 modules/video_filter/meson.build
>>  create mode 100644 modules/video_output/meson.build
>>  create mode 100644 modules/video_splitter/meson.build
>>  create mode 100644 modules/visualization/meson.build
>>  create mode 100644 src/meson.build
>>  create mode 100644 src/revision.c.in
>>
>> diff --git a/bin/meson.build b/bin/meson.build
>> new file mode 100644
>> index 0000000000..db8ba9dcd5
>> --- /dev/null
>> +++ b/bin/meson.build
>> @@ -0,0 +1,33 @@
>> +vlc_sources = []
>> +
>> +vlc_deps = [m_lib, dl_lib, threads_dep]
>> +
>> +if host_system == 'darwin'
>> +    vlc_sources += ['darwinvlc.m']
>> +    vlc_deps += corefoundation_dep
>> +    vlc_deps += dependency('Cocoa', required: true)
>> +elif host_system == 'windows'
>> +    vlc_sources += ['winvlc.c']
>> +else
>> +    vlc_sources += ['vlc.c', 'override.c']
>> +endif
>> +
>> +executable('vlc',
>> +    vlc_sources,
>> +    link_with: [libvlc],
>> +    include_directories: [vlc_include_dirs],
>> +    dependencies: vlc_deps,
>> +    install: true
>> +)
>> +
>> +vlc_top_builddir_def = '-DTOP_BUILDDIR="@0@"'.format(vlc_build_root)
>> +vlc_top_srcdir_def = '-DTOP_SRCDIR="@0@"'.format(vlc_src_root)
>> +
>> +executable('vlc-static',
>> +    vlc_sources,
>> +    link_with: [libvlc],
>> +    include_directories: [vlc_include_dirs],
>> +    dependencies: vlc_deps,
>> +    c_args: [vlc_top_builddir_def, vlc_top_srcdir_def],
>> +    objc_args: [vlc_top_builddir_def, vlc_top_srcdir_def]
>> +)
>> diff --git a/compat/meson.build b/compat/meson.build
>> new file mode 100644
>> index 0000000000..e371c4d8f9
>> --- /dev/null
>> +++ b/compat/meson.build
>> @@ -0,0 +1,13 @@
>> +vlc_libcompat = []
>> +
>> +if libcompat_sources.length() > 0
>> +    vlc_libcompat = static_library(
>> +        'compat',
>> +        libcompat_sources,
>> +        include_directories: [vlc_include_dirs],
>> +        dependencies: [m_lib],
>> +        pic: true,
>> +        install: true,
>> +        install_dir: get_option('libdir') / 'vlc'
>> +    )
>> +endif
>> diff --git a/config.h.meson b/config.h.meson
>> new file mode 100644
>> index 0000000000..a421389e6b
>> --- /dev/null
>> +++ b/config.h.meson
>> @@ -0,0 +1,638 @@
>> +/* config.h.in.  Generated from configure.ac by autoheader.  */
>> +
>> +/* Define so that reentrant versions of several functions get
>> declared. */
>> +#ifndef _REENTRANT
>> +#mesondefine _REENTRANT
>> +#endif
>> +
>> +/* Same as _REENTANT for some other OSes. */
>> +#ifndef _THREAD_SAFE
>> +#mesondefine _THREAD_SAFE
>> +#endif
>> +
>> +/* Enable GNU extensions on systems that have them.  */
>> +#ifndef _GNU_SOURCE
>> +#mesondefine _GNU_SOURCE
>> +#endif
>> +
>> +/* Enable threading extensions on Solaris.  */
>> +#ifndef _POSIX_PTHREAD_SEMANTICS
>> +#mesondefine _POSIX_PTHREAD_SEMANTICS
>> +#endif
>> +
>> +/* Enable general extensions on Solaris.  */
>> +#ifndef __EXTENSIONS__
>> +#mesondefine __EXTENSIONS__
>> +#endif
>> +
>> +/* Define if the zvbi module is built */
>> +// #undef ZVBI_COMPILED
>> +
>> +/* ISO C, POSIX, and 4.3BSD things. */
>> +#mesondefine _BSD_SOURCE
>> +
>> +/* Define to 64 for large files support. */
>> +#mesondefine _FILE_OFFSET_BITS
>> +
>> +/* Define to 2 to get glibc warnings. */
>> +#mesondefine _FORTIFY_SOURCE
>> +
>> +/* Define to 1 is X display is not avaliable */
>> +#mesondefine X_DISPLAY_MISSING
>> +
>> +#ifdef _WIN32
>> +
>> +/* Define to limit the scope of <windows.h>. */
>> +#define WIN32_LEAN_AND_MEAN 1
>> +
>> +/* Define to 1 for Unicode (Wide Chars) APIs. */
>> +#mesondefine UNICODE
>> +#mesondefine _UNICODE
>> +
>> +# ifndef _WIN32_WINNT
>> +/* Define for Windows 7 APIs. */
>> +#mesondefine _WIN32_WINNT
>> +# endif
>> +
>> +# ifndef _WIN32_IE
>> +/* Define for IE 6.0 (and shell) APIs. */
>> +#mesondefine _WIN32_IE
>> +# endif
>> +
>> +/* Extensions to ISO C89 from ISO C99. */
>> +#mesondefine _ISOC99_SOURCE
>> +
>> +/* Extensions to ISO C99 from ISO C11. */
>> +#mesondefine _ISOC11_SOURCE
>> +
>> +/* IEEE Std 1003.1. */
>> +#mesondefine _POSIX_SOURCE
>> +
>> +/* IEEE Std 1003.1. */
>> +#mesondefine _POSIX_C_SOURCE
>> +
>> +/* POSIX and XPG 7th edition */
>> +#mesondefine _XOPEN_SOURCE
>> +
>> +/* TODO: Still needed? XPG things and X/Open Unix extensions. */
>> +#mesondefine _XOPEN_SOURCE_EXTENDED
>> +
>> +/* ISO C, POSIX, and 4.3BSD things. */
>> +#mesondefine _BSD_SOURCE
>> +
>> +/* ISO C, POSIX, and SVID things. */
>> +#mesondefine _SVID_SOURCE
>> +
>> +/* Define to 1 to force use of MinGW provided C99 *printf over 
>> msvcrt
>> */
>> +#mesondefine __USE_MINGW_ANSI_STDIO
>> +
>> +#endif /* _WIN32 */
>> +
>> +/* Define within the LibVLC source code tree. */
>> +#define __LIBVLC__
>> +
>> +/* Define to the libdir */
>> +#mesondefine LIBDIR
>> +
>> +/* Define to the libexecdir */
>> +#mesondefine LIBEXECDIR
>> +
>> +/* Define to the pkgdatadir */
>> +#mesondefine PKGDATADIR
>> +
>> +/* Define to the pkglibdir */
>> +#mesondefine PKGLIBDIR
>> +
>> +/* Define to the pkglibexecdir */
>> +#mesondefine PKGLIBEXECDIR
>> +
>> +/* Define to the sysdatadir */
>> +#mesondefine SYSDATADIR
>> +
>> +/* Define to the localedir */
>> +#mesondefine LOCALEDIR
>> +
>> +/* Default font family */
>> +#mesondefine DEFAULT_FAMILY
>> +
>> +/* Default font */
>> +#mesondefine DEFAULT_FONT_FILE
>> +
>> +/* Default monospace font family */
>> +#mesondefine DEFAULT_MONOSPACE_FAMILY
>> +
>> +/* Default monospace font */
>> +#mesondefine DEFAULT_MONOSPACE_FONT_FILE
>> +
>> +/* Define to 1 to allow running VLC as root (uid 0). */
>> +#mesondefine ALLOW_RUN_AS_ROOT
>> +
>> +/* Binary specific version */
>> +#mesondefine DISTRO_VERSION
>> +
>> +/* Define to 1 for stream output support. */
>> +#mesondefine ENABLE_SOUT
>> +
>> +/* Define to 1 for VideoLAN manager support */
>> +#mesondefine ENABLE_VLM
>> +
>> +/* Define if you want to optimize memory usage over performance */
>> +#mesondefine OPTIMIZE_MEMORY
>> +
>> +/* TODO: assembler capability tests below: */
>> +
>> +/* Define to 1 if 3D Now! inline assembly is available. */
>> +#undef CAN_COMPILE_3DNOW
>> +
>> +/* Define to 1 if AltiVec inline assembly is available. */
>> +#undef CAN_COMPILE_ALTIVEC
>> +
>> +/* Define to 1 if C AltiVec extensions are available. */
>> +#undef CAN_COMPILE_C_ALTIVEC
>> +
>> +/* Define to 1 inline MMX assembly is available. */
>> +#undef CAN_COMPILE_MMX
>> +
>> +/* Define to 1 if MMX EXT inline assembly is available. */
>> +#undef CAN_COMPILE_MMXEXT
>> +
>> +/* Define to 1 if SSE inline assembly is available. */
>> +#undef CAN_COMPILE_SSE
>> +
>> +/* Define to 1 if SSE2 inline assembly is available. */
>> +#undef CAN_COMPILE_SSE2
>> +
>> +/* Define to 1 if SSE3 inline assembly is available. */
>> +#undef CAN_COMPILE_SSE3
>> +
>> +/* Define to 1 if SSE4A inline assembly is available. */
>> +#undef CAN_COMPILE_SSE4A
>> +
>> +/* Define to 1 if SSE4_1 inline assembly is available. */
>> +#undef CAN_COMPILE_SSE4_1
>> +
>> +/* Define to 1 if SSE4_2 inline assembly is available. */
>> +#undef CAN_COMPILE_SSE4_2
>> +
>> +/* Define to 1 if SSSE3 inline assembly is available. */
>> +#undef CAN_COMPILE_SSSE3
>> +
>> +/* TODO Define to 1 if SSE2 intrinsics are available. */
>> +#undef HAVE_SSE2_INTRINSICS
>> +
>> +/* The ./configure command line (not supported with meson for now) 
>> */
>> +#define CONFIGURE_LINE "[unsupported with meson]"
>> +
>> +/* The copyright years */
>> +#mesondefine COPYRIGHT_YEARS
>> +
>> +/* Copyright string */
>> +#mesondefine COPYRIGHT_MESSAGE
>> +
>> +/* Dynamic object extension */
>> +#mesondefine LIBEXT
>> +
>> +/* Define to 1 if translation of program messages to the user's 
>> native
>> +   language is requested. */
>> +#mesondefine ENABLE_NLS
>> +
>> +
>> +/*
>> + *   Type/attributes/etc macros
>> + */
>> +
>> +/* Support for __attribute__((packed)) for structs */
>> +#mesondefine HAVE_ATTRIBUTE_PACKED
>> +
>> +/* Define to 1 if C++ headers define locale_t */
>> +#mesondefine HAVE_CXX_LOCALE_T
>> +
>> +/* Defined to 1 if C11 _Thread_local storage qualifier is supported 
>> */
>> +#mesondefine HAVE_THREAD_LOCAL
>> +
>> +/* TODO: For NetBSD VCD support */
>> +#undef HAVE_SCSIREQ_IN_SYS_SCSIIO_H
>> +
>> +/* TODO: Define as const if the declaration of iconv() needs const. 
>> */
>> +#undef ICONV_CONST
>> +
>> +
>> +/*
>> + * Library check macros
>> + */
>> +
>> +/* Define to 1 if you have GNU libidn. */
>> +#undef HAVE_IDN
>> +
>> +
>> +/*
>> + * Header check macros
>> + */
>> +
>> +/* Hardcode for now, not sure why these 4 header checks exist
>> + * as the code does not even work fine if one of them is
>> + * not defined, apparently.
>> + */
>> +#define HAVE_LIBAVUTIL_AVUTIL_H 1
>> +#define HAVE_LIBAVCODEC_AVCODEC_H 1
>> +#define HAVE_LIBAVFORMAT_AVFORMAT_H 1
>> +#define HAVE_LIBAVFORMAT_AVIO_H 1
>> +
>> +/* Define to 1 if you have the <execinfo.h> header file. */
>> +#mesondefine HAVE_EXECINFO_H
>> +
>> +/* Define to 1 if you have the <features.h> header file. */
>> +#mesondefine HAVE_FEATURES_H
>> +
>> +/* Define to 1 if you have the <getopt.h> header file. */
>> +#mesondefine HAVE_GETOPT_H
>> +
>> +/* Define to 1 if you have the <linux/dccp.h> header file. */
>> +#mesondefine HAVE_LINUX_DCCP_H
>> +
>> +/* Define to 1 if you have the <linux/magic.h> header file. */
>> +#mesondefine HAVE_LINUX_MAGIC_H
>> +
>> +/* Define to 1 if you have the <netinet/tcp.h> header file. */
>> +#mesondefine HAVE_NETINET_TCP_H
>> +
>> +/* Define to 1 if you have the <netinet/udplite.h> header file. */
>> +#mesondefine HAVE_NETINET_UDPLITE_H
>> +
>> +/* Define to 1 if you have the <net/if.h> header file. */
>> +#mesondefine HAVE_NET_IF_H
>> +
>> +/* Define to 1 if you have the <pthread.h> header file. */
>> +#mesondefine HAVE_PTHREAD_H
>> +
>> +/* Define to 1 if you have the <search.h> header file. */
>> +#mesondefine HAVE_SEARCH_H
>> +
>> +/* Define to 1 if you have the <sys/eventfd.h> header file. */
>> +#mesondefine HAVE_SYS_EVENTFD_H
>> +
>> +/* Define to 1 if you have the <sys/mount.h> header file. */
>> +#mesondefine HAVE_SYS_MOUNT_H
>> +
>> +/* Define to 1 if you have the <sys/shm.h> header file. */
>> +#mesondefine HAVE_SYS_SHM_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/soundcard.h> header file. */
>> +#mesondefine HAVE_SYS_SOUNDCARD_H
>> +
>> +/* Define to 1 if you have the <sys/uio.h> header file. */
>> +#mesondefine HAVE_SYS_UIO_H
>> +
>> +/* Define to 1 if you have the <threads.h> header file. */
>> +#mesondefine HAVE_THREADS_H
>> +
>> +/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
>> +#mesondefine HAVE_VALGRIND_VALGRIND_H
>> +
>> +/* Define to 1 if you have the <X11/Xlib.h> header file. */
>> +#mesondefine HAVE_X11_XLIB_H
>> +
>> +/* Define to 1 if you have the <xlocale.h> header file. */
>> +#mesondefine HAVE_XLOCALE_H
>> +
>> +/* Define to 1 if you have the <zlib.h> header file. */
>> +#mesondefine HAVE_ZLIB_H
>> +
>> +
>> +/*
>> + *   Function check macros
>> + */
>> +
>> +/* Define to 1 if you have the `accept4' function. */
>> +#mesondefine HAVE_ACCEPT4
>> +
>> +/* Define to 1 if you have the `aligned_alloc' function. */
>> +#mesondefine HAVE_ALIGNED_ALLOC
>> +
>> +/* Define to 1 if you have asprintf function */
>> +#mesondefine HAVE_ASPRINTF
>> +
>> +/* Define to 1 if you have the `atof' function. */
>> +#mesondefine HAVE_ATOF
>> +
>> +/* Define to 1 if you have the `atoll' function. */
>> +#mesondefine HAVE_ATOLL
>> +
>> +/* Define to 1 if you have the `qsort_r' function. */
>> +#mesondefine HAVE_QSORT_R
>> +
>> +/* Define to 1 if you have the `backtrace' function. */
>> +#mesondefine HAVE_BACKTRACE
>> +
>> +/* Define to 1 if you have the `daemon' function. */
>> +#mesondefine HAVE_DAEMON
>> +
>> +/* Define to 1 if you have the `dirfd' function. */
>> +#mesondefine HAVE_DIRFD
>> +
>> +/* Define to 1 if you have the `eventfd' function. */
>> +#mesondefine HAVE_EVENTFD
>> +
>> +/* Define to 1 if you have the `fcntl' function. */
>> +#mesondefine HAVE_FCNTL
>> +
>> +/* Define to 1 if you have the `fdopendir' function. */
>> +#mesondefine HAVE_FDOPENDIR
>> +
>> +/* Define to 1 if you have the `HAVE_SIGWAIT' function */
>> +#mesondefine HAVE_SIGWAIT
>> +
>> +/* Define to 1 if you have the `flock' function. */
>> +#mesondefine HAVE_FLOCK
>> +
>> +/* Define to 1 if you have the `flockfile' function. */
>> +#mesondefine HAVE_FLOCKFILE
>> +
>> +/* Define to 1 if you have the `fork' function. */
>> +#mesondefine HAVE_FORK
>> +
>> +/* Define to 1 if you have the `fstatvfs' function. */
>> +#mesondefine HAVE_FSTATVFS
>> +
>> +/* Define to 1 if you have the `fsync' function. */
>> +#mesondefine HAVE_FSYNC
>> +
>> +/* Define to 1 if you have the `getdelim' function. */
>> +#mesondefine HAVE_GETDELIM
>> +
>> +/* Define to 1 if you have the `getenv' function. */
>> +#mesondefine HAVE_GETENV
>> +
>> +/* Define to 1 if you have the `getpid' function. */
>> +#mesondefine HAVE_GETPID
>> +
>> +/* Define to 1 if you have the `getpwuid_r' function. */
>> +#mesondefine HAVE_GETPWUID_R
>> +
>> +/* TODO: Define if the GNU gettext() function is already present or
>> preinstalled. */
>> +#undef HAVE_GETTEXT
>> +
>> +/* Define to 1 if you have the `gettimeofday' function. */
>> +#mesondefine HAVE_GETTIMEOFDAY
>> +
>> +/* Define to 1 if you have gmtime_r function */
>> +#mesondefine HAVE_GMTIME_R
>> +
>> +/* TODO: Define if you have the iconv() function and it works. */
>> +#undef HAVE_ICONV
>> +
>> +/* Define to 1 if you have the `if_nameindex' function. */
>> +#mesondefine HAVE_IF_NAMEINDEX
>> +
>> +/* Define to 1 if you have the `if_nametoindex' function. */
>> +#mesondefine HAVE_IF_NAMETOINDEX
>> +
>> +/* Define to 1 if you have inet_pton function */
>> +#mesondefine HAVE_INET_PTON
>> +
>> +/* Define to 1 if you have the `isatty' function. */
>> +#mesondefine HAVE_ISATTY
>> +
>> +/* Define to 1 if you have the `lldiv' function. */
>> +#mesondefine HAVE_LLDIV
>> +
>> +/* Define to 1 if you have localtime_r function */
>> +#mesondefine HAVE_LOCALTIME_R
>> +
>> +/* Define to 1 if the system has the type `max_align_t'. */
>> +#mesondefine HAVE_MAX_ALIGN_T
>> +
>> +/* Define to 1 if you have the `memalign' function. */
>> +#mesondefine HAVE_MEMALIGN
>> +
>> +/* Define to 1 if you have the `memfd_create' function. */
>> +#mesondefine HAVE_MEMFD_CREATE
>> +
>> +/* Define to 1 if you have the `memrchr' function. */
>> +#mesondefine HAVE_MEMRCHR
>> +
>> +/* Define to 1 if you have the `mkostemp' function. */
>> +#mesondefine HAVE_MKOSTEMP
>> +
>> +/* Define to 1 if you have the `mmap' function. */
>> +#mesondefine HAVE_MMAP
>> +
>> +/* Define to 1 if you have the `nanf' function */
>> +#mesondefine HAVE_NANF
>> +
>> +/* Define to 1 if you have the `newlocale' function. */
>> +#mesondefine HAVE_NEWLOCALE
>> +
>> +/* Define to 1 if you have the `nrand48' function. */
>> +#mesondefine HAVE_NRAND48
>> +
>> +/* Define to 1 if you have the `openat' function. */
>> +#mesondefine HAVE_OPENAT
>> +
>> +/* Define to 1 if you have the `open_memstream' function. */
>> +#mesondefine HAVE_OPEN_MEMSTREAM
>> +
>> +/* Define to 1 if you have the `pathconf' function. */
>> +#mesondefine HAVE_PATHCONF
>> +
>> +/* Define to 1 if you have the `pipe2' function. */
>> +#mesondefine HAVE_PIPE2
>> +
>> +/* Define to 1 if you have the `poll' function. */
>> +#mesondefine HAVE_POLL
>> +
>> +/* Define to 1 if you have the `posix_fadvise' function. */
>> +#mesondefine HAVE_POSIX_FADVISE
>> +
>> +/* Define to 1 if you have the `posix_memalign' function. */
>> +#mesondefine HAVE_POSIX_MEMALIGN
>> +
>> +/* TODO: Define to 1 if the system has the type
>> +   `PROCESS_MITIGATION_IMAGE_LOAD_POLICY'. */
>> +#undef HAVE_PROCESS_MITIGATION_IMAGE_LOAD_POLICY
>> +
>> +/* Define to 1 if you have realpath function */
>> +#mesondefine HAVE_REALPATH
>> +
>> +/* Define to 1 if you have the `recvmmsg' function. */
>> +#mesondefine HAVE_RECVMMSG
>> +
>> +/* Define to 1 if you have the `recvmsg' function. */
>> +#mesondefine HAVE_RECVMSG
>> +
>> +/* Define to 1 if you have the `rewind' function. */
>> +#mesondefine HAVE_REWIND
>> +
>> +/* Define to 1 if you have the `sched_getaffinity' function. */
>> +#mesondefine HAVE_SCHED_GETAFFINITY
>> +
>> +/* Define to 1 if you have the `sendmsg' function. */
>> +#mesondefine HAVE_SENDMSG
>> +
>> +/* Define to 1 if you have the `setenv' function. */
>> +#mesondefine HAVE_SETENV
>> +
>> +/* Define to 1 if you have the sincos function. */
>> +#mesondefine HAVE_SINCOS
>> +
>> +/* Define to 1 if <assert.h> defines static_assert. */
>> +#mesondefine HAVE_STATIC_ASSERT
>> +
>> +/* Define to 1 if you have the `strcasecmp' function. */
>> +#mesondefine HAVE_STRCASECMP
>> +
>> +/* Define to 1 if you have the `strcasestr' function. */
>> +#mesondefine HAVE_STRCASESTR
>> +
>> +/* Define to 1 if you have the `strcoll' function */
>> +#mesondefine HAVE_STRCOLL
>> +
>> +/* Define to 1 if you have the `strdup' function. */
>> +#mesondefine HAVE_STRDUP
>> +
>> +/* Define to 1 if you have the `stricmp' function. */
>> +#mesondefine HAVE_STRICMP
>> +
>> +/* Define to 1 if you have the `strlcpy' function. */
>> +#mesondefine HAVE_STRLCPY
>> +
>> +/* Define to 1 if you have the `strndup' function. */
>> +#mesondefine HAVE_STRNDUP
>> +
>> +/* Define to 1 if you have the `strnlen' function. */
>> +#mesondefine HAVE_STRNLEN
>> +
>> +/* Define to 1 if you have the `strnstr' function. */
>> +#mesondefine HAVE_STRNSTR
>> +
>> +/* Define to 1 if you have the `strsep' function. */
>> +#mesondefine HAVE_STRSEP
>> +
>> +/* Define to 1 if you have the `strtof' function. */
>> +#mesondefine HAVE_STRTOF
>> +
>> +/* Define to 1 if you have the `strtok_r' function. */
>> +#mesondefine HAVE_STRTOK_R
>> +
>> +/* Define to 1 if you have the `strtoll' function. */
>> +#mesondefine HAVE_STRTOLL
>> +
>> +/* Define to 1 if the system has the type `struct pollfd'. */
>> +#mesondefine HAVE_STRUCT_POLLFD
>> +
>> +/* Define to 1 if the system has the type `struct timespec'. */
>> +#mesondefine HAVE_STRUCT_TIMESPEC
>> +
>> +/* Define to 1 if you have the `strverscmp' function. */
>> +#mesondefine HAVE_STRVERSCMP
>> +
>> +/* Define to 1 if you have the `swab' function. */
>> +#mesondefine HAVE_SWAB
>> +
>> +/* Define to 1 if you have the `tdestroy' function. */
>> +#mesondefine HAVE_TDESTROY
>> +
>> +/* Define to 1 if you have the `tfind' function. */
>> +#mesondefine HAVE_TFIND
>> +
>> +/* Define to 1 if you have the `timegm' function. */
>> +#mesondefine HAVE_TIMEGM
>> +
>> +/* Define to 1 if you have the `timespec_get' function. */
>> +#mesondefine HAVE_TIMESPEC_GET
>> +
>> +/* Define to 1 if you have the `uselocale' function. */
>> +#mesondefine HAVE_USELOCALE
>> +
>> +/* Define to 1 if you have vasprintf function */
>> +#mesondefine HAVE_VASPRINTF
>> +
>> +/* Define to 1 if you have the `vmsplice' function. */
>> +#undef HAVE_VMSPLICE
>> +
>> +/* Define to 1 if you have the `_lock_file' function. */
>> +#undef HAVE__LOCK_FILE
>> +
>> +/* Defined to 1 if the qsort_r() prototype contradicts the upcoming
>> POSIX
>> +   standard. */
>> +#mesondefine HAVE_BROKEN_QSORT_R
>> +
>> +/* Name of package */
>> +#mesondefine PACKAGE
>> +
>> +/* 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 version of this package. */
>> +#mesondefine PACKAGE_VERSION
>> +
>> +/* version development string */
>> +#undef PACKAGE_VERSION_DEV
>> +
>> +/* version extra number */
>> +#undef PACKAGE_VERSION_EXTRA
>> +
>> +/* version major number */
>> +#undef PACKAGE_VERSION_MAJOR
>> +
>> +/* version minor number */
>> +#undef PACKAGE_VERSION_MINOR
>> +
>> +/* version revision number */
>> +#undef PACKAGE_VERSION_REVISION
>> +
>> +/* Version number of package */
>> +#mesondefine VERSION
>> +
>> +/* Simple version string */
>> +#mesondefine VERSION_MESSAGE
>> +
>> +/* compiler */
>> +#mesondefine VLC_COMPILER
>> +
>> +/* user who ran configure */
>> +#mesondefine VLC_COMPILE_BY
>> +
>> +/* host which ran configure */
>> +#mesondefine VLC_COMPILE_HOST
>> +
>> +/* TODO: Define to 1 if you want to build for Windows Store apps */
>> +#undef VLC_WINSTORE_APP
>> +
>> +/* Define to 1 if build machine is big endian */
>> +#mesondefine WORDS_BIGENDIAN
>> +
>> +/* Alias fdatasync() to fsync() if missing. */
>> +#mesondefine fdatasync
>> +
>> +/* Define to the equivalent of the C99 'restrict' keyword, or to
>> +   nothing if this is not supported.  Do not define if restrict is
>> +   supported directly.  */
>> +#mesondefine restrict
>> +
>> +/* Define to `sockaddr' if <sys/socket.h> does not define. */
>> +#mesondefine sockaddr_storage
>> +
>> +/* Define to `sa_family' if <sys/socket.h> does not define. */
>> +#mesondefine ss_family
>> +
>> +/* Define to `int' if <sys/types.h> does not define. */
>> +#mesondefine ssize_t
>> +
>> +#include <vlc_fixups.h>
>> +
>> +#if defined(_MSC_VER) && !defined(__clang__)
>> +# pragma fenv_access(off)
>> +# pragma fp_contract(on)
>> +#elif defined(__GNUC__)
>> +/* Not supported so far */
>> +#else
>> +# pragma STDC FENV_ACCESS OFF
>> +# pragma STDC FP_CONTRACT ON
>> +#endif
>> diff --git a/extras/buildsystem/gen-vlc-about.py
>> b/extras/buildsystem/gen-vlc-about.py
>> new file mode 100644
>> index 0000000000..f683eb4ae7
>> --- /dev/null
>> +++ b/extras/buildsystem/gen-vlc-about.py
>> @@ -0,0 +1,34 @@
>> +#!/usr/bin/env python3
>> +import os, re, argparse
>> +
>> +parser = argparse.ArgumentParser()
>> +# Input files
>> +parser.add_argument("copying", type=argparse.FileType('r',
>> encoding='UTF-8'))
>> +parser.add_argument("thanks", type=argparse.FileType('r',
>> encoding='UTF-8'))
>> +parser.add_argument("authors", type=argparse.FileType('r',
>> encoding='UTF-8'))
>> +# Output files
>> +parser.add_argument("output", type=argparse.FileType('w',
>> encoding='UTF-8'))
>> +args = parser.parse_args()
>> +
>> +# Regex to remove emails in thanks and authors files
>> +email_regex = re.compile(r'<.*.>')
>> +
>> +output_str = '/* Automatically generated file - DO NOT EDIT */\n\n'
>> +
>> +with args.copying:
>> +    output_str += 'static const char psz_license[] =\n"'
>> +    output_str += args.copying.read().replace('"',
>> '\\"').replace('\r', '').replace('\n', '\\n"\n"')
>> +    output_str += '";\n\n'
>> +
>> +with args.thanks:
>> +    output_str += 'static const char psz_thanks[] =\n"'
>> +    output_str += email_regex.sub('', 
>> args.thanks.read().replace('"',
>> '\\"').replace('\r', '').replace('\n', '\\n"\n"'))
>> +    output_str += '";\n\n'
>> +
>> +with args.authors:
>> +    output_str += 'static const char psz_authors[] =\n"'
>> +    output_str += email_regex.sub('', 
>> args.authors.read().replace('"',
>> '\\"').replace('\r', '').replace('\n', '\\n"\n"'))
>> +    output_str += '";\n\n'
>> +
>> +with args.output:
>> +    args.output.write(output_str)
>> diff --git a/include/meson.build b/include/meson.build
>> new file mode 100644
>> index 0000000000..b3e2a2fa3d
>> --- /dev/null
>> +++ b/include/meson.build
>> @@ -0,0 +1,126 @@
>> +# Generate LibVLC version header
>> +libvlc_version_h = configure_file(
>> +    input: 'vlc/libvlc_version.h.in',
>> +    output: 'libvlc_version.h',
>> +    configuration: cdata
>> +)
>> +
>> +# Install LibVLC headers
>> +install_headers(
>> +    'vlc/vlc.h',
>> +    'vlc/libvlc.h',
>> +    'vlc/libvlc_dialog.h',
>> +    'vlc/libvlc_events.h',
>> +    'vlc/libvlc_media.h',
>> +    'vlc/libvlc_media_discoverer.h',
>> +    'vlc/libvlc_media_list.h',
>> +    'vlc/libvlc_media_list_player.h',
>> +    'vlc/libvlc_media_player.h',
>> +    'vlc/libvlc_picture.h',
>> +    'vlc/libvlc_renderer_discoverer.h',
>> +    'vlc/deprecated.h',
>> +    libvlc_version_h,
>> +    subdir : 'vlc')
>> +
>> +# Install VLC plugin headers
>> +install_headers(
>> +    'vlc_access.h',
>> +    'vlc_actions.h',
>> +    'vlc_addons.h',
>> +    'vlc_aout.h',
>> +    'vlc_aout_volume.h',
>> +    'vlc_arrays.h',
>> +    'vlc_atomic.h',
>> +    'vlc_avcodec.h',
>> +    'vlc_bits.h',
>> +    'vlc_block.h',
>> +    'vlc_block_helper.h',
>> +    'vlc_boxes.h',
>> +    'vlc_charset.h',
>> +    'vlc_codec.h',
>> +    'vlc_codecs.h',
>> +    'vlc_common.h',
>> +    'vlc_config.h',
>> +    'vlc_config_cat.h',
>> +    'vlc_configuration.h',
>> +    'vlc_cpu.h',
>> +    'vlc_cxx_helpers.hpp',
>> +    'vlc_decoder.h',
>> +    'vlc_demux.h',
>> +    'vlc_dialog.h',
>> +    'vlc_epg.h',
>> +    'vlc_es.h',
>> +    'vlc_es_out.h',
>> +    'vlc_events.h',
>> +    'vlc_extensions.h',
>> +    'vlc_filter.h',
>> +    'vlc_fingerprinter.h',
>> +    'vlc_fixups.h',
>> +    'vlc_fourcc.h',
>> +    'vlc_fs.h',
>> +    'vlc_gcrypt.h',
>> +    'vlc_http.h',
>> +    'vlc_httpd.h',
>> +    'vlc_image.h',
>> +    'vlc_inhibit.h',
>> +    'vlc_input.h',
>> +    'vlc_input_item.h',
>> +    'vlc_interface.h',
>> +    'vlc_interrupt.h',
>> +    'vlc_intf_strings.h',
>> +    'vlc_iso_lang.h',
>> +    'vlc_keystore.h',
>> +    'vlc_list.h',
>> +    'vlc_md5.h',
>> +    'vlc_media_library.h',
>> +    'vlc_media_source.h',
>> +    'vlc_memstream.h',
>> +    'vlc_messages.h',
>> +    'vlc_meta.h',
>> +    'vlc_meta_fetcher.h',
>> +    'vlc_mime.h',
>> +    'vlc_modules.h',
>> +    'vlc_mouse.h',
>> +    'vlc_network.h',
>> +    'vlc_objects.h',
>> +    'vlc_opengl.h',
>> +    'vlc_pgpkey.h',
>> +    'vlc_picture.h',
>> +    'vlc_picture_fifo.h',
>> +    'vlc_picture_pool.h',
>> +    'vlc_player.h',
>> +    'vlc_playlist.h',
>> +    'vlc_playlist_export.h',
>> +    'vlc_plugin.h',
>> +    'vlc_probe.h',
>> +    'vlc_rand.h',
>> +    'vlc_renderer_discovery.h',
>> +    'vlc_services_discovery.h',
>> +    'vlc_sort.h',
>> +    'vlc_sout.h',
>> +    'vlc_spu.h',
>> +    'vlc_stream.h',
>> +    'vlc_stream_extractor.h',
>> +    'vlc_strings.h',
>> +    'vlc_subpicture.h',
>> +    'vlc_text_style.h',
>> +    'vlc_threads.h',
>> +    'vlc_thumbnailer.h',
>> +    'vlc_tick.h',
>> +    'vlc_timestamp_helper.h',
>> +    'vlc_tls.h',
>> +    'vlc_update.h',
>> +    'vlc_url.h',
>> +    'vlc_variables.h',
>> +    'vlc_vector.h',
>> +    'vlc_video_splitter.h',
>> +    'vlc_viewpoint.h',
>> +    'vlc_vlm.h',
>> +    'vlc_vod.h',
>> +    'vlc_vout.h',
>> +    'vlc_vout_display.h',
>> +    'vlc_vout_osd.h',
>> +    'vlc_vout_window.h',
>> +    'vlc_xlib.h',
>> +    'vlc_xml.h',
>> +    subdir : 'vlc/plugins')
>> diff --git a/lib/meson.build b/lib/meson.build
>> new file mode 100644
>> index 0000000000..8d8b026a81
>> --- /dev/null
>> +++ b/lib/meson.build
>> @@ -0,0 +1,26 @@
>> +libvlc_sources = [
>> +    'core.c',
>> +    'dialog.c',
>> +    'renderer_discoverer.c',
>> +    'error.c',
>> +    'log.c',
>> +    'playlist.c',
>> +    'picture.c',
>> +    'video.c',
>> +    'audio.c',
>> +    'event.c',
>> +    'media.c',
>> +    'media_player.c',
>> +    'media_list.c',
>> +    'media_list_path.h',
>> +    'media_list_player.c',
>> +    'media_discoverer.c',
>> +]
>> +
>> +libvlc = library('vlc',
>> +    libvlc_sources, rev_target, libvlc_version_h,
>> +    include_directories: [vlc_include_dirs],
>> +    link_with: [vlc_libcompat, libvlccore],
>> +    dependencies: [m_lib, threads_dep],
>> +    install: true
>> +)
>> diff --git a/meson.build b/meson.build
>> new file mode 100644
>> index 0000000000..9eb7551c65
>> --- /dev/null
>> +++ b/meson.build
>> @@ -0,0 +1,759 @@
>> +project('VLC', ['c', 'cpp'],
>> +    version : '4.0.0-dev',
>> +    default_options : ['c_std=gnu11', 'cpp_std=gnu++11'],
>> +    meson_version : '>=0.49.0')
>> +
>> +vlc_copyright_years = '1996-2018'
>> +vlc_version_codename = 'Otto Chriek'
>> +
>> +vlc_version = meson.project_version()
>> +version_arr = vlc_version.split('.')
>> +version_arr_last = version_arr[2].split('-')
>> +
>> +vlc_version_major = version_arr.get(0).to_int()
>> +vlc_version_minor = version_arr.get(1).to_int()
>> +vlc_version_revision = version_arr_last.get(0).to_int()
>> +vlc_version_type  = version_arr_last.get(1, '')
>> +
>> +vlc_src_root = meson.current_source_dir()
>> +vlc_build_root = meson.current_build_dir()
>> +
>> +cdata = configuration_data()
>> +vlc_include_dirs = include_directories('.', 'include')
>> +
>> +gen_vlc_about = find_program('extras/buildsystem/gen-vlc-about.py')
>> +vlc_about = custom_target('vlc_about.h',
>> +                        input:   ['COPYING', 'THANKS', 'AUTHORS'],
>> +                        output:  ['vlc_about.h'],
>> +                        command: [gen_vlc_about,
>> +                                   '@INPUT0@',
>> +                                   '@INPUT1@',
>> +                                   '@INPUT2@',
>> +                                   '@OUTPUT@'])
>> +
>> +add_project_arguments('-DHAVE_CONFIG_H=1', language : ['c', 'cpp',
>> 'objc'])
>> +
>> +cc = meson.get_compiler('c')
>> +cpp = meson.get_compiler('cpp')
>> +host_system = host_machine.system()
>> +
>> +if host_system == 'darwin'
>> +    add_languages('objc')
>> +    add_project_arguments('-mmacosx-version-min=10.10',
>> +        language: ['c', 'cpp', 'objc'])
>> +    add_project_link_arguments('-mmacosx-version-min=10.10',
>> +        language: ['c', 'cpp', 'objc'])
>> +endif
>> +
>> +#
>> +# General feature defines
>> +#
>> +vlc_conf_prefix = ''
>> +
>> +feature_defines = [
>> +    ['_GNU_SOURCE', 1], # Enable GNU extensions on systems that have
>> them
>> +]
>> +
>> +if host_system == 'darwin'
>> +    feature_defines += [
>> +        ['_INTL_REDIRECT_MACROS', 1] # Define to use macros for 
>> libintl
>> +                                     # prefixed functions (see
>> libgnuintl.h)
>> +    ]
>> +endif
>> +
>> +foreach d : feature_defines
>> +    cdata.set(d.get(0), d.get(1))
>> +    vlc_conf_prefix = vlc_conf_prefix + '#define @0@
>> @1@\n'.format(d.get(0), d.get(1))
>> +endforeach
>> +
>> +#
>> +# Check for global dependencies
>> +# These are dependencies needed by libvlc or
>> +# libvlccore and by some modules too.
>> +#
>> +# ATTENTION: Take care to follow the naming convetions:
>> +# - Libraries found with find_lirary() must be named `name_lib`
>> +# - Libraries (or Frameworks) found with dependency() must be
>> +#   named `name_dep`
>> +#
>> +
>> +# zlib library
>> +z_lib = cc.find_library('z', required: false)
>> +
>> +# Math library
>> +m_lib = cc.find_library('m', required: false)
>> +
>> +# Dynamic library loading library
>> +dl_lib = cc.find_library('dl', required: false)
>> +
>> +# Iconv library
>> +iconv_lib = cc.find_library('iconv', required: false)
>> +
>> +if host_system == 'darwin'
>> +    corefoundation_dep = dependency('CoreFoundation', required: 
>> true)
>> +    foundation_dep = dependency('Foundation', required: true)
>> +else
>> +    corefoundation_dep = []
>> +    foundation_dep = []
>> +endif
>> +
>> +# Gettext
>> +if cc.has_function('ngettext', prefix : '#include <libintl.h>')
>> +    libintl_lib = []
>> +    cdata.set('HAVE_GETTEXT', 1)
>> +    cdata.set('ENABLE_NLS', 1)
>> +else
>> +    libintl_lib = cc.find_library('intl', required : false)
>> +    if libintl_lib.found()
>> +        cdata.set('ENABLE_NLS', 1)
>> +    endif
>> +endif
>> +
>> +# Threads
>> +threads_dep = dependency('threads', required: true)
>> +
>> +# TODO:
>> +# The libraries below are not needed by libvlc or libvlccore
>> +# and should be moved to the modules meson.build file.
>> +
>> +# Check for X11
>> +x11_dep = dependency('x11', required: false)
>> +if not x11_dep.found()
>> +    cdata.set('X_DISPLAY_MISSING', 1)
>> +endif
>> +
>> +# Check for X C bindings (XCB)
>> +if (host_system != 'darwin' and host_system != 'windows') or
>> get_option('xcb').enabled()
>> +    xcb_dep = dependency('xcb', version : '>= 1.6', required :
>> get_option('xcb'))
>> +    xcb_composite_dep = dependency('xcb-composite', required :
>> get_option('xcb'))
>> +    xcb_randr_dep = dependency('xcb-randr', version : '>= 1.3',
>> required : get_option('xcb'))
>> +    xcb_render_dep = dependency('xcb-render', required :
>> get_option('xcb'))
>> +    xcb_shm_dep = dependency('xcb-shm', version : '>= 1.9.2', 
>> required
>> : get_option('xcb'))
>> +    xcb_xkb_dep = dependency('xcb-xkb', required : 
>> get_option('xcb'))
>> +    xcb_keysyms_dep = dependency('xcb-keysyms', version : '>= 
>> 0.3.4',
>> required : get_option('xcb'))
>> +    xproto_dep = dependency('xproto', required : get_option('xcb'))
>> +else
>> +    xcb_dep = dependency('', required : false)
>> +endif
>> +
>> +# Check for Wayland
>> +if (host_system != 'darwin' and host_system != 'windows') or
>> get_option('xcb').enabled()
>> +    wayland_scanner_dep = dependency('wayland-scanner', version : 
>> '>=
>> 1.15',
>> +        required : get_option('wayland'), native : true)
>> +
>> +    wayland_protocols_dep = dependency('wayland-protocols', version:
>> '>= 1.15',
>> +        required : get_option('wayland'))
>> +
>> +    wayland_deps = [
>> +        dependency('wayland-client', version : '>= 1.5.91', required 
>> :
>> get_option('wayland')),
>> +        dependency('wayland-cursor', required : 
>> get_option('wayland')),
>> +        dependency('wayland-egl', required : get_option('wayland')),
>> +        wayland_scanner_dep,
>> +        wayland_protocols_dep
>> +    ]
>> +
>> +    have_wayland = true
>> +    foreach iter_wayland_dep : wayland_deps
>> +        if (iter_wayland_dep.found() == false)
>> +            message('Wayland disabled. (not all needed dependencies
>> found)')
>> +            have_wayland = false
>> +            break
>> +        endif
>> +    endforeach
>> +
>> +    if have_wayland
>> +        wayland_scanner = find_program(
>> +
>> wayland_scanner_dep.get_pkgconfig_variable('wayland_scanner'),
>> +            native: true
>> +        )
>> +        wayland_protocols_dir =
>> wayland_protocols_dep.get_pkgconfig_variable('pkgdatadir')
>> +    endif
>> +else
>> +    have_wayland = false
>> +endif
>> +
>> +#
>> +# Check for headers
>> +#
>> +
>> +check_headers = [
>> +    'threads.h',
>> +    'netinet/tcp.h',
>> +    'search.h',
>> +    'sys/uio.h',
>> +    'sys/socket.h',
>> +    'net/if.h',
>> +    'execinfo.h',
>> +    'features.h',
>> +    'getopt.h',
>> +    'linux/dccp.h',
>> +    'linux/magic.h',
>> +    'netinet/udplite.h',
>> +    'pthread.h',
>> +    'sys/eventfd.h',
>> +    'sys/mount.h',
>> +    'sys/shm.h',
>> +    'sys/socket.h',
>> +    'sys/soundcard.h',
>> +    'sys/uio.h',
>> +    'valgrind/valgrind.h',
>> +    'X11/Xlib.h',
>> +    'xlocale.h',
>> +    'zlib.h',
>> +]
>> +
>> +foreach header : check_headers
>> +    if cc.check_header(header)
>> +        cdata.set('HAVE_' + header.underscorify().to_upper(), 1)
>> +    endif
>> +endforeach
>> +
>> +
>> +#
>> +# Darwin specific checks
>> +#
>> +
>> +if host_system == 'darwin'
>> +
>> +    # Check if compiling for iOS
>> +    have_ios = cc.get_define('TARGET_OS_IPHONE',
>> +        prefix : '#include <TargetConditionals.h>') == '1'
>> +
>> +    # Check if compiling for tvOS
>> +    have_tvos = cc.get_define('TARGET_OS_TV',
>> +        prefix : '#include <TargetConditionals.h>') == '1'
>> +
>> +    # If none of the above, assume compiling for macOS
>> +    have_osx = not have_ios and not have_tvos
>> +
>> +else
>> +    have_ios = false
>> +    have_tvos = false
>> +    have_osx = false
>> +endif
>> +
>> +
>> +#
>> +# Windows and MinGW checks
>> +#
>> +
>> +have_mingw = false
>> +mingw_libs = []
>> +
>> +if host_system == 'windows'
>> +
>> +    # Defines needed for Windows
>> +    windows_defines = [
>> +        ['UNICODE',      1], # Define to 1 for Unicode (Wide Chars)
>> APIs
>> +        ['_WIN32_WINNT', '0x0601'], # Define for Windows 7 APIs
>> +    ]
>> +
>> +    foreach d : windows_defines
>> +        cdata.set(d.get(0), d.get(1))
>> +        vlc_conf_prefix = vlc_conf_prefix + '#define @0@
>> @1@\n'.format(d.get(0), d.get(1))
>> +    endforeach
>> +
>> +    mingw_check = '''
>> +    #ifndef __MINGW32__
>> +    # error Not compiling with mingw
>> +    #endif
>> +    '''
>> +
>> +    # Check if MinGW is used at all
>> +    if cc.compiles(mingw_check)
>> +
>> +        # Check which kind of MinGW
>> +        mingw_version_major = 
>> cc.get_define('__MINGW64_VERSION_MAJOR',
>> +            prefix : '#include <_mingw.h>')
>> +
>> +        if mingw_version_major == ''
>> +            error('Cannot compile with MinGW, use MinGW-w64 >= 5.0
>> instead.')
>> +        endif
>> +
>> +        # Check that MinGW w64 is at least 5.0
>> +        if mingw_version_major.to_int() < 5
>> +            error('MinGW-w64 5.0 or higher required!')
>> +        endif
>> +
>> +        have_mingw = true
>> +
>> +        mingw_version_minor = 
>> cc.get_define('__MINGW64_VERSION_MINOR',
>> +            prefix : '#include <_mingw.h>')
>> +
>> +        mingw_version = '@0 at .@1@'.format(mingw_version_major,
>> mingw_version_minor)
>> +        message('Using MinGW-w64 ' + mingw_version)
>> +
>> +        # Defines needed for MinGW
>> +
>> +        mingw_defines = [
>> +            ['__USE_MINGW_ANSI_STDIO',      1], # Define to force 
>> use
>> of MinGW printf
>> +            ['_ISOC99_SOURCE',              1], # Extensions to ISO
>> C89 from ISO C99
>> +            ['_ISOC11_SOURCE',              1], # Extensions to ISO
>> C99 from ISO C11
>> +            ['_POSIX_SOURCE',               1], # IEEE Std 1003.1
>> +            ['_POSIX_C_SOURCE',             '200809L'], #IEEE Std
>> 1003.1
>> +            ['_XOPEN_SOURCE',               700], # POSIX and XPG 
>> 7th
>> edition
>> +            ['_XOPEN_SOURCE_EXTENDED',      1], # XPG things and
>> X/Open Unix extensions
>> +            ['_BSD_SOURCE',                 1], # ISO C, POSIX, and
>> 4.3BSD things
>> +            ['_SVID_SOURCE',                1], # ISO C, POSIX, and
>> SVID things
>> +        ]
>> +
>> +        foreach d : mingw_defines
>> +            cdata.set(d.get(0), d.get(1))
>> +            vlc_conf_prefix = vlc_conf_prefix + '#define @0@
>> @1@\n'.format(d.get(0), d.get(1))
>> +        endforeach
>> +
>> +        # Check for the need to link to the mingwex lib for 
>> MinGW-w64
>> 32bit
>> +        mingwex_lib = cc.find_library('mingwex', required : false)
>> +
>> +        if mingwex_lib.found() and not cc.find_library('mingw32',
>> required: false).found()
>> +            mingw_libs += mingwex_lib
>> +        endif
>> +
>> +        # Check for fnative-struct or mms-bitfields support for 
>> MinGW
>> +        if cc.has_argument('-mms-bitfields')
>> +            add_project_arguments('-mms-bitfields',
>> +                language : ['c', 'cpp'])
>> +            # Check for the warning flag without "-Wno-", GCC 
>> accepts
>> +            # -Wno-<anything> for unsupported warnings, which can
>> trigger
>> +            # other warnings instead.
>> +            if cc.has_argument('-Wincompatible-ms-struct')
>> +                add_project_arguments('-Wno-incompatible-ms-struct',
>> +                    language : ['c', 'cpp'])
>> +            endif
>> +        elif cc.has_argument('-fnative-struct')
>> +            add_project_arguments('-fnative-struct',
>> +                    language : ['c', 'cpp'])
>> +        endif
>> +
>> +        # DEP, ASLR, NO SEH
>> +        add_project_link_arguments('-Wl,--nxcompat', '-Wl,--no-seh',
>> '-Wl,--dynamicbase',
>> +            language: ['c', 'cpp'])
>> +    endif
>> +
>> +endif
>> +
>> +
>> +#
>> +# Check for functions
>> +# Entry format: [TO_DEFINE_IF_TRUE, function_name, prefix]
>> +
>> +# General functions
>> +check_functions = [
>> +    ['HAVE_ACCEPT4',        'accept4',          '#include
>> <sys/socket.h>'],
>> +    ['HAVE_DAEMON',         'daemon',           '#include 
>> <stdlib.h>'],
>> +    ['HAVE_QSORT_R',        'qsort_r',          '#include 
>> <stdlib.h>'],
>> +    ['HAVE_FCNTL',          'fcntl',            '#include 
>> <fcntl.h>'],
>> +    ['HAVE_FLOCK',          'flock',            '#include
>> <sys/file.h>'],
>> +    ['HAVE_FSTATVFS',       'fstatvfs',         '#include
>> <sys/statvfs.h>'],
>> +    ['HAVE_FORK',           'fork',             '#include 
>> <unistd.h>'],
>> +    ['HAVE_GETPWUID_R',     'getpwuid_r',       '#include <pwd.h>'],
>> +    ['HAVE_ISATTY',         'isatty',           '#include 
>> <unistd.h>'],
>> +    ['HAVE_MEMALIGN',       'memalign',         '#include 
>> <malloc.h>'],
>> +    ['HAVE_MKOSTEMP',       'mkostemp',         '#include 
>> <unistd.h>'],
>> +    ['HAVE_MMAP',           'mmap',             '#include
>> <sys/mman.h>'],
>> +    ['HAVE_OPEN_MEMSTREAM', 'open_memstream',   '#include 
>> <stdio.h>'],
>> +    ['HAVE_OPENAT',         'openat',           '#include 
>> <fcntl.h>'],
>> +    ['HAVE_PIPE2',          'pipe2',            '#include 
>> <unistd.h>'],
>> +    ['HAVE_POSIX_FADVISE',  'posix_fadvise',    '#include 
>> <fcntl.h>'],
>> +    ['HAVE_STRICMP',        'stricmp',          '#include 
>> <string.h>'],
>> +    ['HAVE_STRCOLL',        'strcoll',          '#include 
>> <string.h>'],
>> +
>> +    ['HAVE_USELOCALE',      'uselocale',        '#include 
>> <locale.h>'],
>> +    ['HAVE_USELOCALE',      'uselocale',        '#include
>> <xlocale.h>'],
>> +    ['HAVE_NEWLOCALE',      'newlocale',        '#include 
>> <locale.h>'],
>> +    ['HAVE_NEWLOCALE',      'newlocale',        '#include
>> <xlocale.h>'],
>> +
>> +    ['HAVE_GETENV',         'getenv',           '#include 
>> <stdlib.h>'],
>> +    ['HAVE_POSIX_MEMALIGN', 'posix_memalign',   '#include 
>> <stdlib.h>'],
>> +
>> +    ['HAVE_IF_NAMETOINDEX', 'if_nametoindex',   '#include 
>> <net/if.h>'],
>> +    ['HAVE_IF_NAMEINDEX',   'if_nameindex',     '#include 
>> <net/if.h>'],
>> +
>> +    ['HAVE_SIGWAIT',        'sigwait',          '#include 
>> <signal.h>'],
>> +    ['HAVE_BACKTRACE',      'backtrace',        '#include
>> <execinfo.h>'],
>> +    ['HAVE__LOCK_FILE',     '_lock_file',       '#include 
>> <stdio.h>'],
>> +]
>> +
>> +# Linux specific functions
>> +if host_system == 'linux'
>> +    check_functions += [
>> +        ['HAVE_EVENTFD',            'eventfd',              
>> '#include
>> <sys/eventfd.h>'],
>> +        ['HAVE_VMSPLICE',           'vmsplice',             
>> '#include
>> <fcntl.h>'],
>> +        ['HAVE_SCHED_GETAFFINITY',  'sched_getaffinity',    
>> '#include
>> <sched.h>'],
>> +        ['HAVE_RECVMMSG',           'recvmmsg',             
>> '#include
>> <sys/socket.h>'],
>> +        ['HAVE_MEMFD_CREATE',       'memfd_create',         
>> '#include
>> <sys/memfd.h>'],
>> +    ]
>> +endif
>> +
>> +foreach f : check_functions
>> +    if cc.has_function(f.get(1), prefix : vlc_conf_prefix + 
>> f.get(2))
>> +        cdata.set(f.get(0), 1)
>> +    endif
>> +endforeach
>> +
>> +# Libcompat functions (if missing, provided in compat)
>> +# Entry format: [TO_DEFINE_IF_TRUE, function_name, prefix]
>> +libcompat_functions = [
>> +    ['HAVE_ALIGNED_ALLOC',  'aligned_alloc',    '#include 
>> <stdlib.h>'],
>> +    ['HAVE_ATOF',           'atof',             '#include 
>> <stdlib.h>'],
>> +    ['HAVE_ATOLL',          'atoll',            '#include 
>> <stdlib.h>'],
>> +    ['HAVE_DIRFD',          'dirfd',            '#include 
>> <dirent.h>'],
>> +    ['HAVE_FDOPENDIR',      'fdopendir',        '#include 
>> <dirent.h>'],
>> +    ['HAVE_FLOCKFILE',      'flockfile',        '#include 
>> <stdio.h>'],
>> +    ['HAVE_FSYNC',          'fsync',            '#include 
>> <unistd.h>'],
>> +    ['HAVE_GETDELIM',       'getdelim',         '#include 
>> <stdio.h>'],
>> +    ['HAVE_GETPID',         'getpid',           '#include 
>> <unistd.h>'],
>> +    ['HAVE_GETTIMEOFDAY',   'gettimeofday',     '#include
>> <sys/time.h>'],
>> +    ['HAVE_INET_PTON',      'inet_pton',        '#include
>> <arpa/inet.h>'],
>> +    ['HAVE_LLDIV',          'lldiv',            '#include 
>> <stdlib.h>'],
>> +    ['HAVE_MEMRCHR',        'memrchr',          '#include 
>> <string.h>'],
>> +    ['HAVE_NRAND48',        'nrand48',          '#include 
>> <stdlib.h>'],
>> +    ['HAVE_POLL',           'poll',             '#include 
>> <poll.h>'],
>> +    ['HAVE_RECVMSG',        'recvmsg',          '#include
>> <sys/socket.h>'],
>> +    ['HAVE_REWIND',         'rewind',           '#include 
>> <stdio.h>'],
>> +    ['HAVE_SENDMSG',        'sendmsg',          '#include
>> <sys/socket.h>'],
>> +    ['HAVE_SETENV',         'setenv',           '#include 
>> <stdlib.h>'],
>> +    ['HAVE_PATHCONF',       'pathconf',         '#include 
>> <unistd.h>'],
>> +
>> +    ['HAVE_TIMESPEC_GET',   'timespec_get',     '#include 
>> <time.h>'],
>> +    ['HAVE_TIMEGM',         'timegm',           '#include 
>> <time.h>'],
>> +
>> +    ['HAVE_TFIND',          'tfind',            '#include 
>> <search.h>'],
>> +    ['HAVE_TDESTROY',       'tdestroy',         '#include 
>> <search.h>'],
>> +
>> +    ['HAVE_STRTOF',         'strtof',           '#include 
>> <stdlib.h>'],
>> +    ['HAVE_STRTOLL',        'strtoll',          '#include 
>> <stdlib.h>'],
>> +
>> +    ['HAVE_STRNDUP',        'strndup',          '#include 
>> <string.h>'],
>> +    ['HAVE_STRDUP',         'strdup',           '#include 
>> <string.h>'],
>> +    ['HAVE_STRSEP',         'strsep',           '#include 
>> <string.h>'],
>> +    ['HAVE_STRLCPY',        'strlcpy',          '#include 
>> <string.h>'],
>> +    ['HAVE_STRNLEN',        'strnlen',          '#include 
>> <string.h>'],
>> +    ['HAVE_STRNSTR',        'strnstr',          '#include 
>> <string.h>'],
>> +    ['HAVE_STRTOK_R',       'strtok_r',         '#include 
>> <string.h>'],
>> +    ['HAVE_STRVERSCMP',     'strverscmp',       '#include 
>> <string.h>'],
>> +    ['HAVE_STRCASESTR',     'strcasestr',       '#include 
>> <string.h>'],
>> +
>> +    ['HAVE_SWAB',           'swab',             '#include 
>> <unistd.h>'],
>> +
>> +    ['HAVE_STRCASECMP',     'strcasecmp',       '#include
>> <strings.h>'],
>> +]
>> +
>> +libcompat_sources = []
>> +
>> +# Check all functions in libcompat_functions array
>> +foreach f : libcompat_functions
>> +    if cc.has_function(f.get(1), prefix : vlc_conf_prefix + 
>> f.get(2))
>> +        cdata.set(f.get(0), 1)
>> +    else
>> +        libcompat_sources += f.get(1) + '.c'
>> +    endif
>> +endforeach
>> +
>> +# These functions need to be checked with has_header_symbol as
>> +# MinGW-w64 implements those as static inline, not functions with C
>> linkage
>> +libcompat_functions = [
>> +    ['HAVE_GMTIME_R',       'gmtime_r',         'time.h'],
>> +    ['HAVE_REALPATH',       'realpath',         'stdlib.h'],
>> +    ['HAVE_ASPRINTF',       'asprintf',         'stdio.h'],
>> +    ['HAVE_VASPRINTF',      'vasprintf',        'stdio.h'],
>> +    ['HAVE_LOCALTIME_R',    'localtime_r',      'time.h'],
>> +]
>> +
>> +foreach f : libcompat_functions
>> +    if cc.has_header_symbol(f.get(2), f.get(1), prefix :
>> vlc_conf_prefix)
>> +        cdata.set(f.get(0), 1)
>> +    else
>> +        libcompat_sources += f.get(1) + '.c'
>> +    endif
>> +endforeach
>> +
>> +# Check for function 'nanf' (optionally link with libm if it exists)
>> +if cc.has_function('nanf', prefix: vlc_conf_prefix + '#include
>> <math.h>', dependencies: m_lib)
>> +    cdata.set('HAVE_NANF', 1)
>> +endif
>> +
>> +# Check for function 'sincos' (optionally link with libm if it 
>> exists)
>> +if cc.has_function('sincos', prefix: vlc_conf_prefix + '#include
>> <math.h>', dependencies: m_lib)
>> +    cdata.set('HAVE_SINCOS', 1)
>> +else
>> +    libcompat_sources += 'sincos.c'
>> +endif
>> +
>> +# Check for function 'fdatasync' (define it to 'fsync' if missing)
>> +if not cc.has_function('fdatasync', prefix: vlc_conf_prefix +
>> '#include <unistd.h>')
>> +    cdata.set('fdatasync', 'fsync')
>> +endif
>> +
>> +#
>> +# Socket library checks
>> +#
>> +
>> +# Check for socket library
>> +socket_libs = cc.find_library('socket', required: false)
>> +
>> +# Check for function 'connect' (optionally link with socket lib if 
>> it
>> exists)
>> +if not cc.has_function('connect', prefix: vlc_conf_prefix + 
>> '#include
>> <sys/socket.h>', dependencies: socket_libs)
>> +
>> +    if host_system == 'windows'
>> +        # If not found and on windows:
>> +        socket_libs = []
>> +        socket_libs += cc.find_library('iphlpapi', required: true)
>> +        socket_libs += cc.find_library('ws2_32', required: true)
>> +    endif
>> +endif
>> +
>> +#
>> +# Additional checks
>> +#
>> +
>> +# Set FORTIFY_SOURCE only if no sanitizers are enabled
>> +# TODO: Only enable if optimizations are on!
>> +#if get_option('b_sanitize') == 'none'
>> +#    cdata.set('_FORTIFY_SOURCE', 2)
>> +#endif
>> +
>> +# Check which kind of restrict keyword is supported
>> +# Program based on autoconf c.m4
>> +#
>> +# Copyright (C) 2001-2012 Free Software Foundation, Inc.
>> +#
>> +# Written by David MacKenzie, with help from
>> +# Akim Demaille, Paul Eggert,
>> +# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
>> +# Roland McGrath, Noah Friedman, david d zuhn, and many others.
>> +restrict_test = '''
>> +    #define restrict_kw @0@
>> +    typedef int * int_ptr;
>> +    int foo (int_ptr restrict_kw ip) { return ip[0]; }
>> +
>> +    int main() {
>> +        int s[1];
>> +        int * restrict_kw t = s;
>> +        t[0] = 0;
>> +        return foo(t);
>> +    }
>> +'''
>> +
>> +# Order is the same as in AC_C_RESTRICT
>> +
>> +# Check for __restrict support
>> +if cc.compiles(restrict_test.format('__restrict'), name: 'Test
>> __restrict support')
>> +    cdata.set('restrict', '__restrict')
>> +
>> +# Check for __restrict__ support
>> +elif cc.compiles(restrict_test.format('__restrict__'), name: 'Test
>> __restrict__ support')
>> +    cdata.set('restrict', '__restrict__')
>> +
>> +# Check for _Restrict support
>> +elif cc.compiles(restrict_test.format('_Restrict'), name: 'Test
>> _Restrict support')
>> +    cdata.set('restrict', '_Restrict')
>> +
>> +# Check for restrict support
>> +elif not cc.compiles(restrict_test.format('restrict'), name: 'Test
>> restrict support')
>> +    cdata.set('restrict', '')
>> +endif
>> +
>> +# Check for __attribute__((packed)) support
>> +if cc.compiles('struct __attribute__((packed)) foo { int bar; };',
>> +               name : '__attribute__((packed))')
>> +    cdata.set('HAVE_ATTRIBUTE_PACKED', 1)
>> +endif
>> +
>> +# Check for C11 _Thread_local storage qualifier support
>> +if cc.compiles('_Thread_local int foo = 0;', name: 'Test 
>> _Thread_local
>> support')
>> +    cdata.set('HAVE_THREAD_LOCAL', 1)
>> +endif
>> +
>> +# Check for wrong (non-POSIX) qsort_r prototype
>> +qsort_r_test = '''
>> +    #define _GNU_SOURCE
>> +    #include <stdlib.h>
>> +    _Static_assert(_Generic((qsort_r),
>> +        void (*)(void *, size_t, size_t, void *,
>> +                 int (*)(void *, const void *, const void *)) : 1,
>> default: 0),
>> +        "Bad prototype not matched");
>> +'''
>> +if not cc.compiles(qsort_r_test, name: 'Test qsort_r non-POSIX
>> prototype')
>> +    cdata.set('HAVE_BROKEN_QSORT_R', 1)
>> +endif
>> +
>> +# Check for max_align_t type
>> +if cc.has_type('max_align_t', prefix: '#include <stddef.h>')
>> +    cdata.set('HAVE_MAX_ALIGN_T', 1)
>> +endif
>> +
>> +# Check for struct timespec
>> +if cc.has_type('struct timespec', prefix: '#include <time.h>')
>> +    cdata.set('HAVE_STRUCT_TIMESPEC', 1)
>> +endif
>> +
>> +# Add -fvisibility=hidden if compiler supports those
>> +add_project_arguments(
>> +    cc.get_supported_arguments('-fvisibility=hidden'),
>> +    language : ['c'])
>> +
>> +# Check for struct sockaddr_storage type
>> +# Define it to `sockaddr` if missing
>> +have_sockaddr_storage = cc.has_type('struct sockaddr_storage', 
>> prefix:
>> '#include <sys/socket.h>')
>> +
>> +if not have_sockaddr_storage
>> +    have_sockaddr_storage = cc.has_type('struct sockaddr_storage',
>> prefix: '#include <winsock2.h>')
>> +endif
>> +
>> +if not have_sockaddr_storage
>> +    cdata.set('sockaddr_storage', 'sockaddr')
>> +endif
>> +
>> +# Check for struct ss_family type
>> +# Define it to `sa_family` if missing
>> +if not cc.has_type('struct ss_family', prefix: '#include
>> <sys/socket.h>')
>> +    cdata.set('ss_family', 'sa_family')
>> +endif
>> +
>> +# Check for ssize_t type
>> +# Define it to `int` if missing
>> +if not cc.has_type('ssize_t', prefix: '#include <sys/types.h>')
>> +    cdata.set('ssize_t', 'int')
>> +endif
>> +
>> +# Check for struct pollfd type
>> +pollfd_prefix = '#include <sys/types.h>\n'
>> +if cdata.get('HAVE_POLL', 0) == 1
>> +    pollfd_prefix += '#include <poll.h>'
>> +elif host_system == 'windows'
>> +    pollfd_prefix += '#include <winsock2.h>'
>> +endif
>> +
>> +if cc.has_type('struct pollfd', prefix: pollfd_prefix)
>> +    cdata.set('HAVE_STRUCT_POLLFD', 1)
>> +endif
>> +
>> +# Check for locale_t type in C++ locale header
>> +if cpp.has_type('locale_t', prefix : '#include <locale>')
>> +    cdata.set('HAVE_CXX_LOCALE_T', 1)
>> +endif
>> +
>> +# Check if assert.h has static_assert
>> +if cc.has_header_symbol('assert.h', 'static_assert')
>> +    cdata.set('HAVE_STATIC_ASSERT', 1)
>> +endif
>> +
>> +# Check if build machine is big endian
>> +if build_machine.endian() == 'big'
>> +    cdata.set('WORDS_BIGENDIAN', 1)
>> +endif
>> +
>> +# Define the shared library extension
>> +if host_system == 'windows'
>> +    cdata.set_quoted('LIBEXT', '.dll')
>> +elif host_system == 'darwin'
>> +    cdata.set_quoted('LIBEXT', '.dylib')
>> +else
>> +    cdata.set_quoted('LIBEXT', '.so')
>> +endif
>> +
>> +#
>> +# Populate config.h with additional infos
>> +#
>> +
>> +cdata.set_quoted('VERSION', meson.project_version())
>> +cdata.set('VERSION_MAJOR', vlc_version_major)
>> +cdata.set('VERSION_MINOR', vlc_version_minor)
>> +cdata.set('VERSION_REVISION', vlc_version_revision)
>> +
>> +cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
>> +cdata.set_quoted('VERSION_MESSAGE', meson.project_version() + ' ' +
>> vlc_version_codename)
>> +cdata.set_quoted('PACKAGE', meson.project_name())
>> +cdata.set_quoted('PACKAGE_NAME', meson.project_name())
>> +cdata.set_quoted('PACKAGE_STRING', meson.project_name())
>> +cdata.set_quoted('COPYRIGHT_YEARS', vlc_copyright_years)
>> +cdata.set_quoted('COPYRIGHT_MESSAGE', 'Copyright © ' +
>> vlc_copyright_years + ' the VideoLAN team')
>> +
>> +
>> +
>> +cdata.set_quoted('VLC_COMPILER', cc.get_id() + ' ' + cc.version())
>> +
>> +# Paths
>> +cdata.set_quoted('LIBDIR', get_option('libdir'))
>> +cdata.set_quoted('LIBEXECDIR', get_option('libexecdir'))
>> +cdata.set_quoted('PKGDATADIR', join_paths(get_option('datadir'),
>> meson.project_name()))
>> +cdata.set_quoted('PKGLIBDIR', join_paths(get_option('libdir'),
>> meson.project_name()))
>> +cdata.set_quoted('PKGLIBEXECDIR', 
>> join_paths(get_option('libexecdir'),
>> meson.project_name()))
>> +cdata.set_quoted('SYSDATADIR', get_option('datadir'))
>> +cdata.set_quoted('LOCALEDIR', get_option('localedir'))
>> +
>> +# TODO:
>> +cdata.set_quoted('VLC_COMPILE_BY', 'A Cone')
>> +cdata.set_quoted('VLC_COMPILE_HOST', '[currently not implemented 
>> with
>> meson]')
>> +
>> +# Enable stream outputs
>> +if get_option('stream_outputs')
>> +    cdata.set('ENABLE_SOUT', 1)
>> +endif
>> +
>> +# Enable VLM
>> +if get_option('videolan_manager')
>> +    if not get_option('stream_outputs')
>> +        error('The VideoLAN manager requires stream outputs.')
>> +    endif
>> +    cdata.set('ENABLE_VLM', 1)
>> +endif
>> +
>> +# Allow running as root
>> +# (useful for people running on embedded platforms)
>> +if get_option('run_as_root')
>> +    cdata.set('ALLOW_RUN_AS_ROOT', 1)
>> +endif
>> +
>> +# Optimize for memory usage vs speed
>> +if get_option('optimize_memory')
>> +    cdata.set('OPTIMIZE_MEMORY', 1)
>> +endif
>> +
>> +# Allow binary package maintainer to pass a custom string
>> +# to avoid cache problem
>> +if get_option('binary_version') != ''
>> +    cdata.set_quoted('DISTRO_VERSION', get_option('binary_version'))
>> +endif
>> +
>> +
>> +# Font options
>> +if get_option('default_font_path') != ''
>> +    cdata.set_quoted('DEFAULT_FONT_FILE',
>> get_option('default_font_path'))
>> +endif
>> +
>> +if get_option('default_monospace_font_path') != ''
>> +    cdata.set_quoted('DEFAULT_MONOSPACE_FONT_FILE',
>> get_option('default_monospace_font_path'))
>> +endif
>> +
>> +if get_option('default_font_family') != ''
>> +    cdata.set_quoted('DEFAULT_FAMILY',
>> get_option('default_font_family'))
>> +endif
>> +
>> +if get_option('default_monospace_font_family') != ''
>> +    cdata.set_quoted('DEFAULT_MONOSPACE_FAMILY',
>> get_option('default_monospace_font_family'))
>> +endif
>> +
>> +# Generate config.h
>> +configure_file(input : 'config.h.meson',
>> +  output : 'config.h',
>> +  configuration : cdata)
>> +
>> +# Some missing functions are implemented in compat
>> +subdir('compat')
>> +
>> +# Headers
>> +subdir('include')
>> +
>> +# libvlccore
>> +subdir('src')
>> +
>> +# LibVLC
>> +subdir('lib')
>> +
>> +# VLC binaries
>> +subdir('bin')
>> +
>> +# VLC plugins
>> +subdir('modules')
>> diff --git a/meson_options.txt b/meson_options.txt
>> new file mode 100644
>> index 0000000000..d3de8d47d7
>> --- /dev/null
>> +++ b/meson_options.txt
>> @@ -0,0 +1,333 @@
>> +# General options
>> +
>> +option('optimize_memory',
>> +    type : 'boolean',
>> +    value : false,
>> +    description : 'Optimize memory usage over performance')
>> +
>> +option('binary_version',
>> +    type : 'string',
>> +    value : '',
>> +    description : 'To avoid plugins cache problem between binary
>> version')
>> +
>> +option('stream_outputs',
>> +    type : 'boolean',
>> +    value : true,
>> +    description : 'Build the VLC stream output modules')
>> +
>> +option('videolan_manager',
>> +    type : 'boolean',
>> +    value : true,
>> +    description : 'Build the VideoLAN manager')
>> +
>> +option('addon_manager',
>> +    type : 'boolean',
>> +    value : true,
>> +    description : 'Build the VLC add-on manager modules')
>> +
>> +option('run_as_root',
>> +    type : 'boolean',
>> +    value : false,
>> +    description : 'Allow running VLC as root')
>> +
>> +
>> +# Font options
>> +
>> +option('default_font_path',
>> +    type : 'string',
>> +    value : '',
>> +    description : 'Path to the default font')
>> +
>> +option('default_monospace_font_path',
>> +    type : 'string',
>> +    value : '',
>> +    description : 'Path to the default monospace font')
>> +
>> +option('default_font_family',
>> +    type : 'string',
>> +    value : '',
>> +    description : 'Name of the default font family')
>> +
>> +option('default_monospace_font_family',
>> +    type : 'string',
>> +    value : '',
>> +    description : 'Name of the default monospace font family')
>> +
>> +# Module options
>> +
>> +option('vcd_module',
>> +    type : 'boolean',
>> +    value : true,
>> +    description : 'Built-in VCD and CD-DA support')
>> +
>> +# Dependency options
>> +
>> +option('dbus',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable D-Bus message bus support')
>> +
>> +option('wayland',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable wayland support')
>> +
>> +option('xcb',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable X11 support with XCB')
>> +
>> +option('avcodec',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable avcodec support')
>> +
>> +option('avformat',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable avformat support')
>> +
>> +option('alsa',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable ALSA support')
>> +
>> +option('pulse',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable Pulseaudio support')
>> +
>> +option('ogg',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libogg support')
>> +
>> +option('dca',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libdca support')
>> +
>> +option('mpg123',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libmpg123 support')
>> +
>> +option('mpeg2',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libmpeg2 support')
>> +
>> +option('schroedinger',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable schroedinger support')
>> +
>> +option('rsvg',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable librsvg support')
>> +
>> +option('cairo',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libcairo support')
>> +
>> +option('flac',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libflac support')
>> +
>> +option('opus',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libopus support')
>> +
>> +option('theoraenc',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable theoraenc support')
>> +
>> +option('theoradec',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable theoradec support')
>> +
>> +option('daaladec',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable daaladec support')
>> +
>> +option('daalaenc',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable daalaenc support')
>> +
>> +option('x265',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libx265 support')
>> +
>> +option('x264',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libx264 support')
>> +
>> +option('x262',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libx262 support')
>> +
>> +option('fdk-aac',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable fdk-aac support')
>> +
>> +option('shine',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable shine support')
>> +
>> +option('aom',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libaom support')
>> +
>> +option('dav1d',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libdav1d support')
>> +
>> +option('twolame',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable twolame support')
>> +
>> +option('mfx',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libmfx support')
>> +
>> +option('spatialaudio',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libspatialaudio support')
>> +
>> +option('samplerate',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libsamplerate support')
>> +
>> +option('soxr',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable soxr support')
>> +
>> +option('speexdsp',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable speexdsp support')
>> +
>> +option('caca',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable caca support')
>> +
>> +option('drm',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libdrm support')
>> +
>> +option('goom2',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable goom2 visualization plugin')
>> +
>> +option('avahi',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable zeroconf (avahi) services 
>> discovery
>> plugin')
>> +
>> +option('mtp',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable MTP devices support')
>> +
>> +option('upnp',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable UPnP plugin (Intel SDK)')
>> +
>> +option('libxml2',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable XML support')
>> +
>> +option('medialibrary',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable medialibrary support')
>> +
>> +option('a52',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable a52 support')
>> +
>> +option('faad',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable faad support')
>> +
>> +option('fluidsynth',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable fluidsynth/fluidlite support')
>> +
>> +option('microdns',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable microdns support')
>> +
>> +option('gnutls',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable GnuTLS support')
>> +
>> +option('libsecret',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libsecret support')
>> +
>> +option('matroska',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable matroska (MKV) support')
>> +
>> +option('libdvbpsi',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libdvbpsi support')
>> +
>> +option('aribb24',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable aribb24 support')
>> +
>> +option('libmodplug',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libmodplug support')
>> +
>> +option('taglib',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable taglib support')
>> +
>> +option('libcddb',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libcddb support')
>> +
>> +option('libass',
>> +    type : 'feature',
>> +    value : 'auto',
>> +    description : 'Enable/disable libass support')
>> diff --git a/modules/access/http/meson.build
>> b/modules/access/http/meson.build
>> new file mode 100644
>> index 0000000000..959628dfd4
>> --- /dev/null
>> +++ b/modules/access/http/meson.build
>> @@ -0,0 +1,93 @@
>> +#
>> +# HTTP(S) lib
>> +#
>> +vlc_http_lib = static_library('vlc_http',
>> +    files(
>> +        'message.c',
>> +        'resource.c',
>> +        'file.c',
>> +        'live.c',
>> +        'hpack.c',
>> +        'hpackenc.c',
>> +        'h2frame.c',
>> +        'h2output.c',
>> +        'h2conn.c',
>> +        'h1conn.c',
>> +        'chunked.c',
>> +        'tunnel.c',
>> +        'connmgr.c',
>> +    ),
>> +    dependencies: [threads_dep, socket_libs],
>> +    link_with: [vlc_libcompat, libvlccore],
>> +    install: false,
>> +    include_directories : [vlc_include_dirs],
>> +)
>> +
>> +#
>> +# Tests
>> +#
>> +hpack_test = executable('hpack_test',
>> +    files('hpack.c'),
>> +    c_args : ['-DDEC_TEST'],
>> +    include_directories : [vlc_include_dirs])
>> +hpackenc_test = executable('hpackenc_test',
>> +    files('hpack.c', 'hpackenc.c'),
>> +    c_args : ['-DENC_TEST'],
>> +    include_directories : [vlc_include_dirs])
>> +h2frame_test = executable('h2frame_test',
>> +    files(
>> +        'h2frame_test.c',
>> +        'hpack.c',
>> +        'hpackenc.c',
>> +        'h2frame.c',
>> +    ),
>> +    include_directories : [vlc_include_dirs])
>> +h2output_test = executable('h2output_test',
>> +    files('h2output_test.c'),
>> +    link_with : vlc_http_lib,
>> +    include_directories : [vlc_include_dirs])
>> +h2conn_test = executable('h2conn_test',
>> +    files('h2conn_test.c'),
>> +    link_with : vlc_http_lib,
>> +    include_directories : [vlc_include_dirs])
>> +h1conn_test = executable('h1conn_test',
>> +    files('h1conn_test.c'),
>> +    link_with : vlc_http_lib,
>> +    include_directories : [vlc_include_dirs])
>> +h1chunked_test = executable('h1chunked_test',
>> +    files('chunked_test.c'),
>> +    link_with : vlc_http_lib,
>> +    include_directories : [vlc_include_dirs])
>> +http_msg_test = executable('http_msg_test',
>> +    files('message_test.c', 'message.c'),
>> +    link_with : vlc_http_lib,
>> +    include_directories : [vlc_include_dirs])
>> +http_file_test = executable('http_file_test',
>> +    files('file_test.c', 'message.c', 'resource.c', 'file.c'),
>> +    link_with : vlc_http_lib,
>> +    include_directories : [vlc_include_dirs])
>> +http_tunnel_test = executable('http_tunnel_test',
>> +    files('tunnel_test.c'),
>> +    link_with : vlc_http_lib,
>> +    include_directories : [vlc_include_dirs])
>> +
>> +test('http_hpack', hpack_test, suite : 'http')
>> +test('http_hpackenc', hpackenc_test, suite : 'http')
>> +test('http_h2frame_test', h2frame_test, suite : 'http')
>> +test('http_h2output_test', h2output_test, suite : 'http')
>> +test('http_h2conn_test', h2conn_test, suite : 'http')
>> +test('http_h1conn_test', h1conn_test, suite : 'http')
>> +test('http_h1chunked_test', h1chunked_test, suite : 'http')
>> +test('http_msg_test', http_msg_test, suite : 'http')
>> +test('http_file_test', http_file_test, suite : 'http')
>> +test('http_tunnel_test', http_tunnel_test, suite : 'http', timeout :
>> 90)
>> +
>> +
>> +#
>> +# HTTP(S) module
>> +#
>> +vlc_modules += {
>> +    'name' : 'https',
>> +    'sources' : files('access.c'),
>> +    'link_with' : [vlc_http_lib]
>> +}
>> diff --git a/modules/access/meson.build b/modules/access/meson.build
>> new file mode 100644
>> index 0000000000..053609c526
>> --- /dev/null
>> +++ b/modules/access/meson.build
>> @@ -0,0 +1,182 @@
>> +#
>> +# File access modules
>> +#
>> +
>> +# Filesystem access module
>> +filesystem_extra_deps = []
>> +if host_system == 'windows'
>> +    filesystem_extra_deps += cc.find_library('shlwapi', required: 
>> true)
>> +endif
>> +vlc_modules += {
>> +    'name' : 'filesystem',
>> +    'sources' : files(['file.c', 'directory.c', 'fs.c']),
>> +    'dependencies' : filesystem_extra_deps
>> +}
>> +
>> +# Dummy access module
>> +vlc_modules += {
>> +    'name' : 'idummy',
>> +    'sources' : files('idummy.c')
>> +}
>> +
>> +# In-memory bitstream input module
>> +vlc_modules += {
>> +    'name' : 'imem',
>> +    'sources' : files('imem-access.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Memory input module
>> +vlc_modules += {
>> +    'name' : 'access_imem',
>> +    'sources' : files('imem.c')
>> +}
>> +
>> +# Fake sdp:// scheme input module
>> +vlc_modules += {
>> +    'name' : 'sdp',
>> +    'sources' : files('sdp.c')
>> +}
>> +
>> +# Timecode sub-picture generator module
>> +vlc_modules += {
>> +    'name' : 'timecode',
>> +    'sources' : files('timecode.c')
>> +}
>> +
>> +# VDR recordings access module
>> +vlc_modules += {
>> +    'name' : 'vdr',
>> +    'sources' : files('vdr.c')
>> +}
>> +
>> +# VCD and CD-DA access module
>> +
>> +if get_option('vcd_module')
>> +    vcd_cdda_flags = []
>> +
>> +    libcddb_dep = dependency('libcddb', version : '>= 0.9.5', 
>> required
>> : get_option('libcddb'))
>> +    if libcddb_dep.found()
>> +        vcd_cdda_flags += '-DHAVE_LIBCDDB'
>> +    endif
>> +
>> +    if cc.has_header_symbol('linux/cdrom.h', 'struct cdrom_msf0')
>> +        needed_vcd_unix_headers_present = true
>> +    elif cc.has_header_symbol('sys/scsiio.h', 'struct scsireq')
>> +        needed_vcd_unix_headers_present = true
>> +        vcd_cdda_flags += '-DHAVE_SCSIREQ_IN_SYS_SCSIIO_H'
>> +    elif cc.has_header_symbol('sys/cdio.h', 'struct ioc_toc_header')
>> +        needed_vcd_unix_headers_present = true
>> +        vcd_cdda_flags += '-DHAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H'
>> +    else
>> +        needed_vcd_unix_headers_present = false
>> +    endif
>> +
>> +    if (needed_vcd_unix_headers_present or
>> +        host_system == 'darwin' or  host_system == 'windows')
>> +
>> +        vcd_cdda_darwin_deps = []
>> +        if host_system == 'darwin'
>> +            vcd_cdda_darwin_deps = [iokit_dep, corefoundation_dep]
>> +        endif
>> +
>> +        vlc_modules += {
>> +            'name' : 'cdda',
>> +            'sources' : files(
>> +                'cdda.c',
>> +                'vcd/cdrom.c',
>> +                '../misc/webservices/json.c',
>> +                '../misc/webservices/musicbrainz.c',
>> +            ),
>> +            'c_args' : vcd_cdda_flags,
>> +            'dependencies' : [libcddb_dep, vcd_cdda_darwin_deps]
>> +        }
>> +
>> +        vlc_modules += {
>> +            'name' : 'vcd',
>> +            'sources' : files(
>> +                'vcd/vcd.c',
>> +                'vcd/cdrom.c',
>> +            ),
>> +            'c_args' : vcd_cdda_flags,
>> +            'dependencies' : [libcddb_dep, vcd_cdda_darwin_deps]
>> +        }
>> +
>> +    endif
>> +endif
>> +
>> +
>> +#
>> +# Audio capture access modules
>> +#
>> +
>> +# ALSA input module
>> +if alsa_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'access_alsa',
>> +        'sources' : files('alsa.c'),
>> +        'dependencies' : [alsa_dep]
>> +    }
>> +endif
>> +
>> +# JACK input module
>> +if jack_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'access_jack',
>> +        'sources' : files('jack.c'),
>> +        'dependencies' : [jack_dep]
>> +    }
>> +endif
>> +
>> +# Pulseaudio module
>> +if pulse_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'pulsesrc',
>> +        'sources' : files('pulse.c'),
>> +        'dependencies' : [pulse_dep],
>> +        'link_with' : [libvlc_pulse],
>> +    }
>> +endif
>> +
>> +# avio access module
>> +if avformat_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'avio',
>> +        'sources' : files('avio.c'),
>> +        'dependencies' : [avutil_dep, avformat_dep]
>> +    }
>> +endif
>> +
>> +#
>> +# Network stream access modules
>> +#
>> +
>> +# FTP
>> +vlc_modules += {
>> +    'name' : 'ftp',
>> +    'sources' : files('ftp.c'),
>> +    'dependencies' : [socket_libs]
>> +}
>> +
>> +# Old HTTP
>> +vlc_modules += {
>> +    'name' : 'http',
>> +    'sources' : files('http.c'),
>> +    'dependencies' : [socket_libs]
>> +}
>> +
>> +# New HTTP(S)
>> +subdir('http')
>> +
>> +#
>> +# Screen grab plugins
>> +#
>> +
>> +# XCB screen grab
>> +if xcb_dep.found() and xcb_shm_dep.found() and
>> xcb_composite_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'xcb_screen',
>> +        'sources' : files('screen/xcb.c'),
>> +        'dependencies' : [xcb_dep, xcb_shm_dep, xcb_composite_dep]
>> +    }
>> +endif
>> diff --git a/modules/audio_filter/meson.build
>> b/modules/audio_filter/meson.build
>> new file mode 100644
>> index 0000000000..70af736ec9
>> --- /dev/null
>> +++ b/modules/audio_filter/meson.build
>> @@ -0,0 +1,215 @@
>> +#
>> +# Audio filter modules
>> +#
>> +
>> +include_dir = include_directories('.')
>> +
>> +# Audio bar graph a module
>> +vlc_modules += {
>> +    'name' : 'audiobargraph_a',
>> +    'sources' : files('audiobargraph_a.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Chorus flanger module
>> +vlc_modules += {
>> +    'name' : 'chorus_flanger',
>> +    'sources' : files('chorus_flanger.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Compressor module
>> +vlc_modules += {
>> +    'name' : 'compressor',
>> +    'sources' : files('compressor.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Equalizer filter module
>> +vlc_modules += {
>> +    'name' : 'equalizer',
>> +    'sources' : files('equalizer.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Karaoke filter module
>> +vlc_modules += {
>> +    'name' : 'karaoke',
>> +    'sources' : files('karaoke.c')
>> +}
>> +
>> +# Volume normalization module
>> +vlc_modules += {
>> +    'name' : 'normvol',
>> +    'sources' : files('normvol.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Gain module
>> +vlc_modules += {
>> +    'name' : 'gain',
>> +    'sources' : files('gain.c')
>> +}
>> +
>> +# Parametrical Equalizer module
>> +vlc_modules += {
>> +    'name' : 'param_eq',
>> +    'sources' : files('param_eq.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Scaletempo module
>> +scaletempo_sources = files('scaletempo.c')
>> +scaletempo_deps = [m_lib]
>> +
>> +vlc_modules += {
>> +    'name' : 'scaletempo',
>> +    'sources' : scaletempo_sources,
>> +    'dependencies' : scaletempo_deps
>> +}
>> +
>> +# Scaletempo pitch module
>> +vlc_modules += {
>> +    'name' : 'scaletempo_pitch',
>> +    'sources' : scaletempo_sources,
>> +    'dependencies' : scaletempo_deps,
>> +    'c_args' : ['-DPITCH_SHIFTER']
>> +}
>> +
>> +# Stereo widen module
>> +vlc_modules += {
>> +    'name' : 'stereo_widen',
>> +    'sources' : files('stereo_widen.c')
>> +}
>> +
>> +# Spatializer module
>> +vlc_modules += {
>> +    'name' : 'spatializer',
>> +    'sources' : files(
>> +        'spatializer/spatializer.cpp',
>> +        'spatializer/allpass.cpp',
>> +        'spatializer/comb.cpp',
>> +        'spatializer/denormals.c',
>> +        'spatializer/revmodel.cpp'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +#
>> +# Channel mixer
>> +#
>> +
>> +# Dolby surround module
>> +vlc_modules += {
>> +    'name' : 'dolby_surround_decoder',
>> +    'sources' : files('channel_mixer/dolby.c')
>> +}
>> +
>> +# Headphone mixer module
>> +vlc_modules += {
>> +    'name' : 'headphone_channel_mixer',
>> +    'sources' : files('channel_mixer/headphone.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Mono mixer module
>> +vlc_modules += {
>> +    'name' : 'mono',
>> +    'sources' : files('channel_mixer/mono.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Channel remap mixer module
>> +vlc_modules += {
>> +    'name' : 'remap',
>> +    'sources' : files('channel_mixer/remap.c')
>> +}
>> +
>> +# Trivial channel mixer module
>> +vlc_modules += {
>> +    'name' : 'trivial_channel_mixer',
>> +    'sources' : files('channel_mixer/trivial.c')
>> +}
>> +
>> +# Simple channel mixer module
>> +vlc_modules += {
>> +    'name' : 'simple_channel_mixer',
>> +    'sources' : files('channel_mixer/simple.c')
>> +}
>> +
>> +# TODO IF NEON
>> +# simple_channel_mixer_plugin_arm_neon
>> +
>> +# Spatial audio (ambisonics/binaural) mixer
>> +spatial_dep = dependency('spatialaudio', required :
>> get_option('spatialaudio'))
>> +if spatial_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'spatialaudio',
>> +        'sources' : files('channel_mixer/spatialaudio.cpp'),
>> +        'dependencies' : [spatial_dep]
>> +    }
>> +endif
>> +
>> +#
>> +# Converters
>> +#
>> +
>> +# Format converter module
>> +vlc_modules += {
>> +    'name' : 'audio_format',
>> +    'sources' : files('converter/format.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# SPDIF converter module
>> +vlc_modules += {
>> +    'name' : 'tospdif',
>> +    'sources' : files('converter/tospdif.c',
>> +        '../packetizer/dts_header.c'),
>> +    'include_directories' : include_dir
>> +}
>> +
>> +#
>> +# Resampler
>> +#
>> +
>> +# Band-limited resampler module
>> +#vlc_modules += {
>> +#    'name' : 'bandlimited_resampler',
>> +#    'sources' : files('resampler/bandlimited.c')
>> +#}
>> +
>> +# Ugly resampler module
>> +vlc_modules += {
>> +    'name' : 'ugly_resampler',
>> +    'sources' : files('resampler/ugly.c')
>> +}
>> +
>> +# libsamplerate resampler
>> +samplerate_dep = dependency('samplerate', required :
>> get_option('samplerate'))
>> +if samplerate_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'samplerate',
>> +        'sources' : files('resampler/src.c'),
>> +        'dependencies' : [m_lib, samplerate_dep]
>> +    }
>> +endif
>> +
>> +# SoX resampler
>> +soxr_dep = dependency('soxr', version : ['>= 0.1.2'], required :
>> get_option('soxr'))
>> +if soxr_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'soxr',
>> +        'sources' : files('resampler/soxr.c'),
>> +        'dependencies' : [m_lib, soxr_dep]
>> +    }
>> +endif
>> +
>> +# Speex resampler
>> +speexdsp_dep = dependency('speexdsp', required :
>> get_option('speexdsp'))
>> +if speexdsp_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'speex_resampler',
>> +        'sources' : files('resampler/speex.c'),
>> +        'dependencies' : [speexdsp_dep]
>> +    }
>> +endif
>> diff --git a/modules/audio_mixer/meson.build
>> b/modules/audio_mixer/meson.build
>> new file mode 100644
>> index 0000000000..b99b157c79
>> --- /dev/null
>> +++ b/modules/audio_mixer/meson.build
>> @@ -0,0 +1,13 @@
>> +# Float mixer
>> +vlc_modules += {
>> +    'name' : 'float_mixer',
>> +    'sources' : files('float.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Integer mixer
>> +vlc_modules += {
>> +    'name' : 'integer_mixer',
>> +    'sources' : files('integer.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> diff --git a/modules/audio_output/meson.build
>> b/modules/audio_output/meson.build
>> new file mode 100644
>> index 0000000000..723cc409a2
>> --- /dev/null
>> +++ b/modules/audio_output/meson.build
>> @@ -0,0 +1,61 @@
>> +#
>> +# Audio output modules
>> +#
>> +
>> +# Dummy audio output
>> +vlc_modules += {
>> +    'name' : 'adummy',
>> +    'sources' : files('adummy.c')
>> +}
>> +
>> +# File audio output
>> +vlc_modules += {
>> +    'name' : 'afile',
>> +    'sources' : files('file.c')
>> +}
>> +
>> +# Memory audio output
>> +vlc_modules += {
>> +    'name' : 'amem',
>> +    'sources' : files('amem.c')
>> +}
>> +
>> +
>> +# AUHAL output module (macOS only)
>> +if have_osx
>> +    vlc_modules += {
>> +        'name' : 'auhal',
>> +        'sources' : files(['auhal.c', 'coreaudio_common.c']),
>> +        'dependencies' : [
>> +            m_lib, corefoundation_dep, audiounit_dep, 
>> audiotoolbox_dep,
>> +            dependency('CoreAudio', required: true)
>> +        ]
>> +    }
>> +endif
>> +
>> +# Pulseaudio out module
>> +if pulse_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'pulse',
>> +        'sources' : files('pulse.c'),
>> +        'dependencies' : [m_lib, pulse_dep],
>> +        'link_with' : [libvlc_pulse],
>> +    }
>> +endif
>> +
>> +# ALSA output module
>> +if alsa_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'alsa',
>> +        'sources' : files('alsa.c'),
>> +        'dependencies' : [m_lib, alsa_dep]
>> +    }
>> +endif
>> +
>> +if jack_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'jack',
>> +        'sources' : files('jack.c'),
>> +        'dependencies' : [jack_dep]
>> +    }
>> +endif
>> diff --git a/modules/codec/meson.build b/modules/codec/meson.build
>> new file mode 100644
>> index 0000000000..8bf3c31638
>> --- /dev/null
>> +++ b/modules/codec/meson.build
>> @@ -0,0 +1,584 @@
>> +#
>> +# Encoder and decoder modules
>> +#
>> +
>> +# Dummy codec
>> +vlc_modules += {
>> +    'name' : 'ddummy',
>> +    'sources' : files('ddummy.c')
>> +}
>> +
>> +# Dummy codec
>> +vlc_modules += {
>> +    'name' : 'edummy',
>> +    'sources' : files('edummy.c')
>> +}
>> +
>> +# SPDIF codec
>> +vlc_modules += {
>> +    'name' : 'spdif',
>> +    'sources' : files('spdif.c')
>> +}
>> +
>> +# a52 codec
>> +a52_lib = cc.find_library('a52', required: get_option('a52'))
>> +if a52_lib.found()
>> +    vlc_modules += {
>> +        'name' : 'a52',
>> +        'sources' : files('a52.c'),
>> +        'dependencies' : [a52_lib]
>> +    }
>> +endif
>> +
>> +# DTS Coherent Acoustics decoder
>> +dca_dep = dependency('libdca', version : '>= 0.0.5', required :
>> get_option('dca'))
>> +if dca_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'dca',
>> +        'sources' : files('dca.c'),
>> +        'dependencies' : [dca_dep, m_lib]
>> +    }
>> +endif
>> +
>> +# adpcm codec
>> +vlc_modules += {
>> +    'name' : 'adpcm',
>> +    'sources' : files('adpcm.c')
>> +}
>> +
>> +# AES3 codec
>> +vlc_modules += {
>> +    'name' : 'aes3',
>> +    'sources' : files('aes3.c')
>> +}
>> +
>> +# faad decoder plugin
>> +faad_lib = cc.find_library('faad', required: get_option('faad'))
>> +if faad_lib.found()
>> +    vlc_modules += {
>> +        'name' : 'faad',
>> +        'sources' : files('faad.c'),
>> +        'dependencies' : [faad_lib, m_lib]
>> +    }
>> +endif
>> +
>> +# g711 codec
>> +vlc_modules += {
>> +    'name' : 'g711',
>> +    'sources' : files('g711.c')
>> +}
>> +
>> +# libfluidsynth (MIDI synthetizer) plugin
>> +fluidsynth_option = get_option('fluidsynth')
>> +fluidsynth_module_flags = []
>> +if not fluidsynth_option.disabled()
>> +    fluidsynth_dep = dependency('fluidsynth', version : '>= 1.1.2',
>> required : false)
>> +    if not fluidsynth_dep.found()
>> +        fluidsynth_dep = dependency('fluidlite', required : false)
>> +        if fluidsynth_dep.found()
>> +            fluidsynth_module_flags += '-DHAVE_FLUIDLITE_H'
>> +        endif
>> +    endif
>> +
>> +    if fluidsynth_option.enabled() and not fluidsynth_dep.found()
>> +        error('Neither fluidsynth or fluidlite were found.')
>> +    endif
>> +else
>> +    fluidsynth_dep = dependency('', required : false)
>> +endif
>> +
>> +if fluidsynth_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'fluidsynth',
>> +        'sources' : files('fluidsynth.c'),
>> +        'dependencies' : [fluidsynth_dep, m_lib],
>> +        'c_args' : fluidsynth_module_flags
>> +    }
>> +endif
>> +
>> +# Audiotoolbox MIDI plugin (Darwin only)
>> +if host_system == 'darwin'
>> +    vlc_modules += {
>> +        'name' : 'audiotoolboxmidi',
>> +        'sources' : files('audiotoolbox_midi.c'),
>> +        'dependencies' : [corefoundation_dep, audiounit_dep,
>> audiotoolbox_dep]
>> +    }
>> +endif
>> +
>> +# LPCM codec
>> +vlc_modules += {
>> +    'name' : 'lpcm',
>> +    'sources' : files('lpcm.c')
>> +}
>> +
>> +# TODO libmad codec
>> +
>> +# Ulead DV Audio codec
>> +vlc_modules += {
>> +    'name' : 'uleaddvaudio',
>> +    'sources' : files('uleaddvaudio.c')
>> +}
>> +
>> +# Raw PCM demux module
>> +vlc_modules += {
>> +    'name' : 'araw',
>> +    'sources' : files(['araw.c']),
>> +}
>> +
>> +# libmpg123 decoder
>> +mpg123_dep = dependency('libmpg123', required : 
>> get_option('mpg123'))
>> +if mpg123_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'mpg123',
>> +        'sources' : files('mpg123.c'),
>> +        'dependencies' : [mpg123_dep]
>> +    }
>> +endif
>> +
>> +#
>> +# Video codecs
>> +#
>> +
>> +# CDG codec
>> +vlc_modules += {
>> +    'name' : 'cdg',
>> +    'sources' : files('cdg.c')
>> +}
>> +
>> +# libmpeg2 decoder
>> +mpeg2_dep = dependency('libmpeg2', version : '> 0.3.2', required :
>> get_option('mpeg2'))
>> +if mpeg2_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'libmpeg2',
>> +        'sources' : files('libmpeg2.c', 'synchro.c'),
>> +        'dependencies' : [mpeg2_dep]
>> +    }
>> +endif
>> +
>> +# Raw video codec
>> +vlc_modules += {
>> +    'name' : 'rawvideo',
>> +    'sources' : files('rawvideo.c')
>> +}
>> +
>> +# RTP video codec
>> +vlc_modules += {
>> +    'name' : 'rtpvideo',
>> +    'sources' : files('rtpvideo.c')
>> +}
>> +
>> +# Dirac decoder and encoder using schroedinger
>> +schroedinger_dep = dependency('schroedinger-1.0', version : '>=
>> 1.0.10', required : get_option('schroedinger'))
>> +if schroedinger_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'schroedinger',
>> +        'sources' : files('schroedinger.c'),
>> +        'dependencies' : [schroedinger_dep]
>> +    }
>> +endif
>> +
>> +#
>> +# Image codecs
>> +#
>> +
>> +# TODO PNG codec
>> +
>> +# TODO JPEG codec
>> +
>> +# TODO BPG codec
>> +
>> +# SVG image decoder
>> +rsvg_dep = dependency('librsvg-2.0', version : '>= 2.9.0', required 
>> :
>> get_option('rsvg'))
>> +cairo_dep = dependency('cairo', version : '>= 1.13.1', required :
>> get_option('cairo'))
>> +if rsvg_dep.found() and cairo_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'svgdec',
>> +        'sources' : files('svg.c'),
>> +        'dependencies' : [rsvg_dep, cairo_dep]
>> +    }
>> +endif
>> +
>> +# TODO SDL image codec
>> +
>> +# TODO xwd
>> +
>> +
>> +#
>> +# SPU codecs
>> +#
>> +
>> +# Substation Alpha subtitle decoder (libass)
>> +# TODO: Needs freetype if available  and for winstore -ldwrite
>> +libass_dep = dependency('libass', version : '>= 0.9.8', required :
>> get_option('libass'))
>> +if libass_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'libass',
>> +        'sources' : files('libass.c'),
>> +        'dependencies' : [libass_dep]
>> +    }
>> +endif
>> +
>> +# Closed captioning decoder
>> +vlc_modules += {
>> +    'name' : 'cc',
>> +    'sources' : files('cc.c', 'cea708.c')
>> +}
>> +
>> +# cvdsub decoder
>> +vlc_modules += {
>> +    'name' : 'cvdsub',
>> +    'sources' : files('cvdsub.c')
>> +}
>> +
>> +# dvbsub decoder
>> +vlc_modules += {
>> +    'name' : 'dvbsub',
>> +    'sources' : files('dvbsub.c')
>> +}
>> +
>> +# TODO aribsub
>> +
>> +# scte18 decoder
>> +vlc_modules += {
>> +    'name' : 'scte18',
>> +    'sources' : files('scte18.c', 'atsc_a65.c')
>> +}
>> +
>> +# scte27 decoder
>> +vlc_modules += {
>> +    'name' : 'scte27',
>> +    'sources' : files('scte27.c')
>> +}
>> +
>> +# SPU decoder
>> +vlc_modules += {
>> +    'name' : 'spudec',
>> +    'sources' : files('spudec/spudec.c', 'spudec/parse.c')
>> +}
>> +
>> +# STL codec
>> +vlc_modules += {
>> +    'name' : 'stl',
>> +    'sources' : files('stl.c')
>> +}
>> +
>> +# subsdec
>> +vlc_modules += {
>> +    'name' : 'subsdec',
>> +    'sources' : files('subsdec.c')
>> +}
>> +
>> +# subsusf
>> +vlc_modules += {
>> +    'name' : 'subsusf',
>> +    'sources' : files('subsusf.c')
>> +}
>> +
>> +# TTML decoder
>> +vlc_modules += {
>> +    'name' : 'ttml',
>> +    'sources' : files('ttml/substtml.c', 'ttml/ttml.c',
>> '../demux/ttml.c'),
>> +    'include_directories' : include_directories('.')
>> +}
>> +
>> +# TODO WebVTT
>> +
>> +# svcdsub
>> +vlc_modules += {
>> +    'name' : 'svcdsub',
>> +    'sources' : files('svcdsub.c')
>> +}
>> +
>> +# t140
>> +vlc_modules += {
>> +    'name' : 't140',
>> +    'sources' : files('t140.c')
>> +}
>> +
>> +# telx
>> +vlc_modules += {
>> +    'name' : 'telx',
>> +    'sources' : files('telx.c')
>> +}
>> +
>> +# textst
>> +vlc_modules += {
>> +    'name' : 'textst',
>> +    'sources' : files('textst.c')
>> +}
>> +
>> +# TODO zvbi
>> +
>> +# substx3g
>> +vlc_modules += {
>> +    'name' : 'substx3g',
>> +    'sources' : files('substx3g.c')
>> +}
>> +
>> +#
>> +# Xiph.org codecs
>> +#
>> +
>> +ogg_dep = dependency('ogg', required : get_option('ogg'))
>> +
>> +# FLAC codec
>> +flac_dep = dependency('flac', required : get_option('flac'))
>> +if flac_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'flac',
>> +        'sources' : files('flac.c'),
>> +        'dependencies' : [flac_dep]
>> +    }
>> +endif
>> +
>> +# TODO Kate codec
>> +#kate_dep = dependency('kate', version : '>= 0.3.0', required : 
>> false)
>> +#if kate_dep.found()
>> +#    vlc_modules += {
>> +#        'name' : 'kate',
>> +#        'sources' : files('kate.c')
>> +#    }
>> +#endif
>> +
>> +# Opus codec
>> +opus_dep = dependency('opus', version : '>= 1.0.3', required :
>> get_option('opus'))
>> +if opus_dep.found() and ogg_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'opus',
>> +        'sources' : files('opus.c', 'opus_header.c'),
>> +        'dependencies' : [opus_dep, ogg_dep]
>> +    }
>> +endif
>> +
>> +# TODO speex
>> +
>> +# Theora codec
>> +theoraenc_dep = dependency('theoraenc', required :
>> get_option('theoraenc'))
>> +theoradec_dep = dependency('theoradec', version : '>= 1.0', required 
>> :
>> get_option('theoradec'))
>> +if theoraenc_dep.found() and theoradec_dep.found() and 
>> ogg_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'theora',
>> +        'sources' : files('theora.c'),
>> +        'dependencies' : [theoraenc_dep, theoradec_dep, ogg_dep]
>> +    }
>> +endif
>> +
>> +# Daala decoder plugin
>> +daaladec_dep = dependency('daaladec', required :
>> get_option('daaladec'))
>> +daalaenc_dep = dependency('daalaenc', required :
>> get_option('daalaenc'))
>> +if daaladec_dep.found() and daalaenc_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'daala',
>> +        'sources' : files('daala.c'),
>> +        'dependencies' : [daaladec_dep, daalaenc_dep]
>> +    }
>> +endif
>> +
>> +# TODO tremor
>> +
>> +# TODO vorbis
>> +
>> +# OggSpots decoder
>> +if ogg_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'oggspots',
>> +        'sources' : files('oggspots.c')
>> +    }
>> +endif
>> +
>> +# VideoToolbox
>> +if host_system == 'darwin'
>> +    vlc_modules += {
>> +        'name' : 'videotoolbox',
>> +        'sources' : files(
>> +            'vt_utils.c',
>> +            'videotoolbox.m',
>> +            'hxxx_helper.c',
>> +            '../packetizer/hxxx_nal.c',
>> +            '../packetizer/hxxx_sei.c',
>> +            '../packetizer/h264_slice.c',
>> +            '../packetizer/h264_nal.c',
>> +            '../packetizer/hevc_nal.c'
>> +        ),
>> +        'dependencies' : [videotoolbox_dep, foundation_dep,
>> coremedia_dep, corevideo_dep],
>> +        'objc_args' : ['-fobjc-arc']
>> +    }
>> +endif
>> +
>> +# FFmpeg common helper library
>> +avutil_dep = dependency('libavutil', version : '>= 55.9.0', required 
>> :
>> false)
>> +avcodec_dep = dependency('libavcodec', version : '>= 57.37.100',
>> required : get_option('avcodec'))
>> +
>> +if avcodec_dep.found()
>> +    libavcodec_common = static_library('avcodec_common',
>> +        files('avcodec/fourcc.c', 'avcodec/chroma.c'),
>> +        dependencies: [avutil_dep, avcodec_dep],
>> +        install: false,
>> +        include_directories : [
>> +            vlc_include_dirs,
>> +            include_directories('avcodec')
>> +        ],
>> +    )
>> +endif
>> +
>> +# FFmpeg codec module
>> +if avcodec_dep.found()
>> +
>> +    avcodec_extra_sources = []
>> +    if get_option('stream_outputs')
>> +        avcodec_extra_sources += 'avcodec/encoder.c'
>> +    endif
>> +
>> +    # TODO: merge-ffmpeg option
>> +
>> +    vlc_modules += {
>> +        'name' : 'avcodec',
>> +        'sources' : files(
>> +                'avcodec/video.c',
>> +                'avcodec/subtitle.c',
>> +                'avcodec/audio.c',
>> +                'avcodec/va.c',
>> +                'avcodec/avcodec.c',
>> +                avcodec_extra_sources
>> +        ),
>> +        'dependencies' : [avutil_dep, avcodec_dep],
>> +        'link_with' : [libavcodec_common]
>> +    }
>> +endif
>> +
>> +# TODO avcodec hardware acceleration
>> +
>> +# TODO omxil
>> +
>> +
>> +#
>> +# x26x encoders
>> +#
>> +
>> +# x265 encoder
>> +x265_dep = dependency('x265', required : get_option('x265'))
>> +if x265_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'x265',
>> +        'sources' : files('x265.c'),
>> +        'dependencies' : [x265_dep]
>> +    }
>> +endif
>> +
>> +# x262 encoder
>> +x262_dep = dependency('x262', required : get_option('x262'))
>> +if x262_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'x262',
>> +        'sources' : files('x264.c'),
>> +        'dependencies' : [x262_dep],
>> +        'c_args' : ['-DMODULE_NAME_IS_x262']
>> +    }
>> +endif
>> +
>> +# x264 10-bit encoder (requires x264 >= 0.153)
>> +x26410b_dep = dependency('x264', version : '>= 0.153', required :
>> get_option('x264'))
>> +if x26410b_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'x26410b',
>> +        'sources' : files('x264.c'),
>> +        'dependencies' : [x26410b_dep],
>> +        'c_args' : ['-DMODULE_NAME_IS_x26410b']
>> +    }
>> +endif
>> +
>> +# x264 encoder
>> +x264_dep = dependency('x264', version : '>= 0.148', required :
>> get_option('x264'))
>> +if x264_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'x264',
>> +        'sources' : files('x264.c'),
>> +        'dependencies' : [x264_dep],
>> +        'c_args' : ['-DMODULE_NAME_IS_x264']
>> +    }
>> +endif
>> +
>> +#
>> +# Misc codecs
>> +#
>> +
>> +# fdkaac encoder
>> +fdkaac_dep = dependency('fdk-aac', required : get_option('fdk-aac'))
>> +if fdkaac_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'fdkaac',
>> +        'sources' : files('fdkaac.c'),
>> +        'dependencies' : [fdkaac_dep]
>> +    }
>> +endif
>> +
>> +# Shine MPEG Audio Layer 3 encoder
>> +shine_dep = dependency('shine', version : '>= 3.0.0', required :
>> get_option('shine'))
>> +if shine_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'shine',
>> +        'sources' : files('shine.c'),
>> +        'dependencies' : [shine_dep]
>> +    }
>> +endif
>> +
>> +# TODO libvpx
>> +
>> +# Experimental AV1 codec
>> +aom_dep = dependency('aom', required : get_option('aom'))
>> +if aom_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'aom',
>> +        'sources' : files('aom.c'),
>> +        'dependencies' : [aom_dep]
>> +    }
>> +endif
>> +
>> +# dav1d AV1 decoder
>> +dav1d_dep = dependency('dav1d', required : get_option('dav1d'))
>> +if dav1d_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'dav1d',
>> +        'sources' : files('dav1d.c'),
>> +        'dependencies' : [dav1d_dep]
>> +    }
>> +endif
>> +
>> +# Twolame MPEG Audio Layer 2 encoder
>> +twolame_dep = dependency('twolame', required : 
>> get_option('twolame'))
>> +if twolame_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'twolame',
>> +        'sources' : files('twolame.c'),
>> +        'dependencies' : [twolame_dep],
>> +        'c_args' : ['-DLIBTWOLAME_STATIC']
>> +    }
>> +endif
>> +
>> +
>> +#
>> +# Hardware encoders
>> +#
>> +
>> +# TODO crystalhd
>> +
>> +# QSV encoder
>> +qsv_dep = dependency('libmfx', required : get_option('mfx'))
>> +if qsv_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'qsv',
>> +        'sources' : files('qsv.c'),
>> +        'dependencies' : [qsv_dep]
>> +    }
>> +endif
>> +
>> +
>> +#
>> +# External frameworks
>> +#
>> +
>> +# TODO dmo
>> +
>> +# TODO mft
>> +
>> +# TODO gstdecode
>> diff --git a/modules/control/meson.build 
>> b/modules/control/meson.build
>> new file mode 100644
>> index 0000000000..1b845f955c
>> --- /dev/null
>> +++ b/modules/control/meson.build
>> @@ -0,0 +1,49 @@
>> +# Dummy interface module
>> +vlc_modules += {
>> +    'name' : 'dummy',
>> +    'sources' : files(['dummy.c']),
>> +}
>> +
>> +# Gestures
>> +vlc_modules += {
>> +    'name' : 'gestures',
>> +    'sources' : files('gestures.c')
>> +}
>> +
>> +# Hotkeys
>> +vlc_modules += {
>> +    'name' : 'hotkeys',
>> +    'sources' : files('hotkeys.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# Remote control
>> +vlc_modules += {
>> +    'name' : 'rc',
>> +    'sources' : files('rc.c'),
>> +    'dependencies' : [socket_libs, m_lib]
>> +}
>> +
>> +# XCB hotkeys
>> +if xcb_dep.found() and xcb_keysyms_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'xcb_hotkeys',
>> +        'sources' : files('globalhotkeys/xcb.c'),
>> +        'dependencies' : [xcb_dep, xcb_keysyms_dep]
>> +    }
>> +endif
>> +
>> +# DBUS
>> +dbus_dep = dependency('dbus-1', version : '>= 1.6.0', required :
>> get_option('dbus'))
>> +if dbus_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'dbus',
>> +        'sources' : files(
>> +            'dbus/dbus_root.c',
>> +            'dbus/dbus_player.c',
>> +            'dbus/dbus_tracklist.c',
>> +            'dbus/dbus.c',
>> +        ),
>> +        'dependencies' : [dbus_dep, m_lib]
>> +    }
>> +endif
>> diff --git a/modules/demux/meson.build b/modules/demux/meson.build
>> new file mode 100644
>> index 0000000000..f5d6a5b448
>> --- /dev/null
>> +++ b/modules/demux/meson.build
>> @@ -0,0 +1,473 @@
>> +#
>> +# Demux modules
>> +#
>> +
>> +# Common Xiph metadata library
>> +xiph_meta_lib = static_library('xiph_metadata',
>> +    sources : files('xiph_metadata.c'),
>> +    include_directories : [vlc_include_dirs],
>> +    install : false,
>> +    pic : true
>> +)
>> +
>> +# FLAC demux
>> +vlc_modules += {
>> +    'name' : 'flacsys',
>> +    'sources' : files('flac.c'),
>> +    'include_directories' : include_directories('../packetizer'),
>> +    'link_with' : [xiph_meta_lib]
>> +}
>> +
>> +# OGG demux
>> +ogg_dep = dependency('ogg', version : '>= 1.0', required :
>> get_option('ogg'))
>> +if ogg_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'ogg',
>> +        'sources' : files('ogg.c', 'oggseek.c', 'ogg_granule.c'),
>> +        'link_with' : [xiph_meta_lib],
>> +        'dependencies' : [ogg_dep]
>> +    }
>> +endif
>> +
>> +# Demux dump
>> +vlc_modules += {
>> +    'name' : 'demuxdump',
>> +    'sources' : files('demuxdump.c')
>> +}
>> +
>> +# Raw DV demux
>> +vlc_modules += {
>> +    'name' : 'rawdv',
>> +    'sources' : files('rawdv.c')
>> +}
>> +
>> +# Raw Vid demux
>> +vlc_modules += {
>> +    'name' : 'rawvid',
>> +    'sources' : files('rawvid.c')
>> +}
>> +
>> +# au demux
>> +vlc_modules += {
>> +    'name' : 'au',
>> +    'sources' : files('au.c')
>> +}
>> +
>> +# Raw AUD demux
>> +vlc_modules += {
>> +    'name' : 'rawaud',
>> +    'sources' : files('rawaud.c')
>> +}
>> +
>> +# WAV demux module
>> +vlc_modules += {
>> +    'name' : 'wav',
>> +    'sources' : files(['wav.c']),
>> +}
>> +
>> +# NSV demux
>> +vlc_modules += {
>> +    'name' : 'nsv',
>> +    'sources' : files('nsv.c')
>> +}
>> +
>> +# MPEG PS demux
>> +vlc_modules += {
>> +    'name' : 'ps',
>> +    'sources' : files('mpeg/ps.c')
>> +}
>> +
>> +# libmodplug
>> +libmodplug_dep = dependency('libmodplug', version : ['>= 0.8.4', '!=
>> 0.8.8'],
>> +    required : get_option('libmodplug'))
>> +if libmodplug_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'mod',
>> +        'sources' : files('mod.c'),
>> +        'dependencies' : [libmodplug_dep]
>> +    }
>> +endif
>> +
>> +# PVA demux
>> +vlc_modules += {
>> +    'name' : 'pva',
>> +    'sources' : files('pva.c')
>> +}
>> +
>> +# AIFF demux
>> +vlc_modules += {
>> +    'name' : 'aiff',
>> +    'sources' : files('aiff.c')
>> +}
>> +
>> +# MJPEG demux
>> +vlc_modules += {
>> +    'name' : 'mjpeg',
>> +    'sources' : files('mjpeg.c')
>> +}
>> +
>> +# Subtitle demux
>> +vlc_modules += {
>> +    'name' : 'subtitle',
>> +    'sources' : files(['subtitle.c']),
>> +}
>> +
>> +# ty demux
>> +vlc_modules += {
>> +    'name' : 'ty',
>> +    'sources' : files('ty.c')
>> +}
>> +
>> +# vobsub demux
>> +vlc_modules += {
>> +    'name' : 'vobsub',
>> +    'sources' : files('vobsub.c')
>> +}
>> +
>> +# voc demux
>> +vlc_modules += {
>> +    'name' : 'voc',
>> +    'sources' : files('voc.c')
>> +}
>> +
>> +# xa demux
>> +vlc_modules += {
>> +    'name' : 'xa',
>> +    'sources' : files('xa.c')
>> +}
>> +
>> +# nuv demux
>> +vlc_modules += {
>> +    'name' : 'nuv',
>> +    'sources' : files('nuv.c')
>> +}
>> +
>> +# nsc demux
>> +vlc_modules += {
>> +    'name' : 'nsc',
>> +    'sources' : files('nsc.c')
>> +}
>> +
>> +# TODO mpc demux plugin
>> +
>> +# tta demux
>> +vlc_modules += {
>> +    'name' : 'tta',
>> +    'sources' : files('tta.c')
>> +}
>> +
>> +# VC1 demux
>> +vlc_modules += {
>> +    'name' : 'vc1',
>> +    'sources' : files('vc1.c')
>> +}
>> +
>> +# CDG demux
>> +vlc_modules += {
>> +    'name' : 'demux_cdg',
>> +    'sources' : files('cdg.c')
>> +}
>> +
>> +# SMF demux
>> +vlc_modules += {
>> +    'name' : 'smf',
>> +    'sources' : files('smf.c')
>> +}
>> +
>> +# TODO GME demux
>> +
>> +# TODO SID demux
>> +
>> +# Image demux
>> +vlc_modules += {
>> +    'name' : 'image',
>> +    'sources' : files('image.c')
>> +}
>> +
>> +# STL demux
>> +vlc_modules += {
>> +    'name' : 'demux_stl',
>> +    'sources' : files('stl.c')
>> +}
>> +
>> +# ASF demux
>> +vlc_modules += {
>> +    'name' : 'asf',
>> +    'sources' : files('asf/asf.c', 'asf/libasf.c', 
>> 'asf/asfpacket.c')
>> +}
>> +
>> +# AVI demux
>> +vlc_modules += {
>> +    'name' : 'avi',
>> +    'sources' : files('avi/avi.c', 'avi/libavi.c')
>> +}
>> +
>> +# CAF demux
>> +vlc_modules += {
>> +    'name' : 'caf',
>> +    'sources' : files('caf.c'),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# avformat demux
>> +avformat_dep = dependency('libavformat', version : '>= 53.21.0',
>> required : get_option('avformat'))
>> +if avformat_dep.found()
>> +
>> +    avformat_extra_sources = []
>> +    if get_option('stream_outputs')
>> +        avformat_extra_sources += 'avformat/mux.c'
>> +    endif
>> +
>> +    vlc_modules += {
>> +        'name' : 'avformat',
>> +        'sources' : files(
>> +            'avformat/demux.c',
>> +            'avformat/avformat.c',
>> +            avformat_extra_sources
>> +        ),
>> +        'dependencies' : [avformat_dep, avutil_dep],
>> +        'link_with' : [libavcodec_common]
>> +    }
>> +endif
>> +
>> +# Directory demuxer
>> +vlc_modules += {
>> +    'name' : 'directory_demux',
>> +    'sources' : files('directory.c')
>> +}
>> +
>> +# ES demux
>> +vlc_modules += {
>> +    'name' : 'es',
>> +    'sources' : files('mpeg/es.c', '../packetizer/dts_header.c')
>> +}
>> +
>> +# h.26x demux
>> +vlc_modules += {
>> +    'name' : 'h26x',
>> +    'sources' : files('mpeg/h26x.c', '../packetizer/h264_nal.c')
>> +}
>> +
>> +# MKV demux
>> +libebml_dep = dependency('libebml', required : 
>> get_option('matroska'))
>> +libmatroska_dep = dependency('libmatroska', required :
>> get_option('matroska'))
>> +if libebml_dep.found() and libmatroska_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'mkv',
>> +        'sources' : files(
>> +            'mkv/mkv.cpp',
>> +            'mkv/util.cpp',
>> +            'mkv/virtual_segment.cpp',
>> +            'mkv/matroska_segment.cpp',
>> +            'mkv/matroska_segment_parse.cpp',
>> +            'mkv/matroska_segment_seeker.cpp',
>> +            'mkv/demux.cpp',
>> +            'mkv/events.cpp',
>> +            'mkv/Ebml_parser.cpp',
>> +            'mkv/chapters.cpp',
>> +            'mkv/chapter_command.cpp',
>> +            'mkv/stream_io_callback.cpp',
>> +            'mp4/libmp4.c',
>> +            '../packetizer/dts_header.c',
>> +        ),
>> +        'dependencies' : [libebml_dep, libmatroska_dep, z_lib]
>> +    }
>> +endif
>> +
>> +# MP4 demux
>> +vlc_modules += {
>> +    'name' : 'mp4',
>> +    'sources' : files(
>> +        'mp4/mp4.c',
>> +        'mp4/fragments.c',
>> +        'mp4/libmp4.c',
>> +        'mp4/heif.c',
>> +        'mp4/essetup.c',
>> +        'mp4/meta.c',
>> +        'asf/asfpacket.c',
>> +    ),
>> +    'dependencies' : [m_lib, z_lib]
>> +}
>> +
>> +
>> +# mpgv demux
>> +vlc_modules += {
>> +    'name' : 'mpgv',
>> +    'sources' : files('mpeg/mpgv.c')
>> +}
>> +
>> +# Playlist demux
>> +vlc_modules += {
>> +    'name' : 'playlist',
>> +    'sources' : files(
>> +        'playlist/asx.c',
>> +        'playlist/b4s.c',
>> +        'playlist/bdmv.c',
>> +        'playlist/dvb.c',
>> +        'playlist/ifo.c',
>> +        'playlist/itml.c',
>> +        'playlist/m3u.c',
>> +        'playlist/pls.c',
>> +        'playlist/podcast.c',
>> +        'playlist/qtl.c',
>> +        'playlist/ram.c',
>> +        'playlist/sgimb.c',
>> +        'playlist/wpl.c',
>> +        'playlist/wms.c',
>> +        'playlist/xspf.c',
>> +        'playlist/playlist.c')
>> +}
>> +
>> +# TS demux
>> +aribb24_dep = dependency('aribb24', version : '>= 1.0.1', required :
>> get_option('aribb24'))
>> +libdvbpsi_dep = dependency('libdvbpsi', version : '>= 1.2.0', 
>> required
>> : get_option('libdvbpsi'))
>> +if libdvbpsi_dep.found()
>> +    arrib24_define = []
>> +    if aribb24_dep.found()
>> +        arrib24_define += '-DHAVE_ARIBB24=1'
>> +    endif
>> +
>> +    vlc_modules += {
>> +        'name' : 'ts',
>> +        'sources' : files(
>> +            'mpeg/ts.c',
>> +            'mpeg/ts_pid.c',
>> +            'mpeg/ts_psi.c',
>> +            'mpeg/ts_si.c',
>> +            'mpeg/ts_psip.c',
>> +            'mpeg/ts_psip_dvbpsi_fixes.c',
>> +            'mpeg/ts_decoders.c',
>> +            'mpeg/ts_streams.c',
>> +            'mpeg/ts_scte.c',
>> +            'mpeg/sections.c',
>> +            'mpeg/mpeg4_iod.c',
>> +            'mpeg/ts_arib.c',
>> +            'mpeg/ts_sl.c',
>> +            'mpeg/ts_metadata.c',
>> +            'mpeg/ts_hotfixes.c',
>> +            '../mux/mpeg/csa.c',
>> +            '../mux/mpeg/tables.c',
>> +            '../mux/mpeg/tsutil.c',
>> +            '../codec/atsc_a65.c',
>> +            '../codec/opus_header.c',
>> +        ),
>> +        'dependencies' : [libdvbpsi_dep, aribb24_dep],
>> +        'c_args' : arrib24_define
>> +    }
>> +endif
>> +
>> +# adaptive demux
>> +adaptive_dash_sources = [
>> +    'dash/mpd/AdaptationSet.cpp',
>> +    'dash/mpd/DASHCommonAttributesElements.cpp',
>> +    'dash/mpd/DASHSegment.cpp',
>> +    'dash/mpd/ContentDescription.cpp',
>> +    'dash/mpd/IsoffMainParser.cpp',
>> +    'dash/mpd/MPD.cpp',
>> +    'dash/mpd/Period.cpp',
>> +    'dash/mpd/Profile.cpp',
>> +    'dash/mpd/ProgramInformation.cpp',
>> +    'dash/mpd/Representation.cpp',
>> +    'dash/mpd/TemplatedUri.cpp',
>> +    'dash/mp4/IndexReader.cpp',
>> +    'dash/DASHManager.cpp',
>> +    'dash/DASHStream.cpp',
>> +]
>> +
>> +adaptive_hls_sources = [
>> +    'hls/playlist/M3U8.cpp',
>> +    'hls/playlist/Parser.cpp',
>> +    'hls/playlist/Representation.cpp',
>> +    'hls/playlist/HLSSegment.cpp',
>> +    'hls/playlist/Tags.cpp',
>> +    'hls/HLSManager.cpp',
>> +    'hls/HLSStreams.cpp',
>> +]
>> +
>> +adaptive_smooth_sources = [
>> +    'smooth/mp4/IndexReader.cpp',
>> +    'smooth/playlist/ForgedInitSegment.cpp',
>> +    'smooth/playlist/Manifest.cpp',
>> +    'smooth/playlist/MemoryChunk.cpp',
>> +    'smooth/playlist/Parser.cpp',
>> +    'smooth/playlist/Representation.cpp',
>> +    'smooth/playlist/SmoothSegment.cpp',
>> +    'smooth/SmoothManager.cpp',
>> +    'smooth/SmoothStream.cpp',
>> +    '../mux/mp4/libmp4mux.c',
>> +    '../packetizer/h264_nal.c',
>> +    '../packetizer/hevc_nal.c',
>> +]
>> +
>> +vlc_modules += {
>> +    'name' : 'adaptive',
>> +    'sources' : files(
>> +        adaptive_dash_sources,
>> +        adaptive_hls_sources,
>> +        adaptive_smooth_sources,
>> +        'adaptive/adaptive.cpp',
>> +        'adaptive/playlist/AbstractPlaylist.cpp',
>> +        'adaptive/playlist/BaseAdaptationSet.cpp',
>> +        'adaptive/playlist/BasePeriod.cpp',
>> +        'adaptive/playlist/BaseRepresentation.cpp',
>> +        'adaptive/playlist/CommonAttributesElements.cpp',
>> +        'adaptive/playlist/Inheritables.cpp',
>> +        'adaptive/playlist/Role.cpp',
>> +        'adaptive/playlist/Segment.cpp',
>> +        'adaptive/playlist/SegmentBase.cpp',
>> +        'adaptive/playlist/SegmentChunk.cpp',
>> +        'adaptive/playlist/SegmentInfoCommon.cpp',
>> +        'adaptive/playlist/SegmentList.cpp',
>> +        'adaptive/playlist/SegmentTimeline.cpp',
>> +        'adaptive/playlist/SegmentInformation.cpp',
>> +        'adaptive/playlist/SegmentTemplate.cpp',
>> +        'adaptive/playlist/Url.cpp',
>> +        'adaptive/playlist/Templates.hpp',
>> +        'adaptive/encryption/CommonEncryption.cpp',
>> +        'adaptive/encryption/Keyring.cpp',
>> +        'adaptive/logic/AbstractAdaptationLogic.cpp',
>> +        'adaptive/logic/AlwaysBestAdaptationLogic.cpp',
>> +        'adaptive/logic/AlwaysLowestAdaptationLogic.cpp',
>> +        'adaptive/logic/NearOptimalAdaptationLogic.cpp',
>> +        'adaptive/logic/PredictiveAdaptationLogic.cpp',
>> +        'adaptive/logic/RateBasedAdaptationLogic.cpp',
>> +        'adaptive/logic/Representationselectors.cpp',
>> +        'adaptive/mp4/AtomsReader.cpp',
>> +        'adaptive/http/AuthStorage.cpp',
>> +        'adaptive/http/BytesRange.cpp',
>> +        'adaptive/http/Chunk.cpp',
>> +        'adaptive/http/ConnectionParams.cpp',
>> +        'adaptive/http/Downloader.cpp',
>> +        'adaptive/http/HTTPConnection.cpp',
>> +        'adaptive/http/HTTPConnectionManager.cpp',
>> +        'adaptive/http/Transport.cpp',
>> +        'adaptive/plumbing/CommandsQueue.cpp',
>> +        'adaptive/plumbing/Demuxer.cpp',
>> +        'adaptive/plumbing/FakeESOut.cpp',
>> +        'adaptive/plumbing/FakeESOutID.cpp',
>> +        'adaptive/plumbing/SourceStream.cpp',
>> +        'adaptive/ID.cpp',
>> +        'adaptive/PlaylistManager.cpp',
>> +        'adaptive/SegmentTracker.cpp',
>> +        'adaptive/SharedResources.cpp',
>> +        'adaptive/StreamFormat.cpp',
>> +        'adaptive/Streams.cpp',
>> +        'adaptive/tools/Conversions.cpp',
>> +        'adaptive/tools/FormatNamespace.cpp',
>> +        'adaptive/tools/Helper.cpp',
>> +        'adaptive/tools/Retrieve.cpp',
>> +        'adaptive/xml/DOMHelper.cpp',
>> +        'adaptive/xml/DOMParser.cpp',
>> +        'adaptive/xml/Node.cpp',
>> +        'mp4/libmp4.c',
>> +    ),
>> +    'include_directories' : include_directories('adaptive'),
>> +    'dependencies' : [socket_libs, m_lib, z_lib]
>> +    # TODO: Add optional GCRYPT dependency!
>> +}
>> +
>> +# noseek demux
>> +vlc_modules += {
>> +    'name' : 'noseek',
>> +    'sources' : files('filter/noseek.c')
>> +}
>> diff --git a/modules/gui/meson.build b/modules/gui/meson.build
>> new file mode 100644
>> index 0000000000..12e2287863
>> --- /dev/null
>> +++ b/modules/gui/meson.build
>> @@ -0,0 +1,30 @@
>> +#
>> +# Graphical user interface (GUI) modules
>> +#
>> +
>> +# Qt interface module
>> +subdir('qt')
>> +
>> +# ncurses text-based interface
>> +ncurses_dep = dependency('ncursesw', required : false)
>> +if ncurses_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'ncurses',
>> +        'sources' : files('ncurses.c'),
>> +        'dependencies' : [m_lib, threads_dep, ncurses_dep]
>> +    }
>> +endif
>> +
>> +# Minimal macOS interface
>> +if have_osx
>> +    vlc_modules += {
>> +        'name' : 'minimal_macosx',
>> +        'sources' : files(
>> +            'minimal_macosx/intf.m',
>> +            'minimal_macosx/misc.m',
>> +            'minimal_macosx/VLCMinimalVoutWindow.m',
>> +            'minimal_macosx/macosx.c'),
>> +        'dependencies' : [cocoa_dep],
>> +        'objc_args' : ['-fobjc-arc', '-fobjc-exceptions']
>> +    }
>> +endif
>> diff --git a/modules/gui/qt/meson.build b/modules/gui/qt/meson.build
>> new file mode 100644
>> index 0000000000..21a9e86212
>> --- /dev/null
>> +++ b/modules/gui/qt/meson.build
>> @@ -0,0 +1,265 @@
>> +#
>> +# Qt-based interface module
>> +#
>> +
>> +qt5 = import('qt5')
>> +
>> +include_dir = include_directories('.')
>> +
>> +qt5_dep = dependency('qt5',
>> +    modules : [
>> +        'Core', 'Gui', 'Widgets', 'Svg', 'Qml',
>> +        'Quick', 'QuickWidgets', 'QuickControls2'
>> +        ],
>> +    required: false)
>> +
>> +moc_headers = files(
>> +    'main_interface.hpp',
>> +    'menus.hpp',
>> +    'dialogs_provider.hpp',
>> +    'extensions_manager.hpp',
>> +    'managers/addons_manager.hpp',
>> +    'managers/renderer_manager.hpp',
>> +    'recents.hpp',
>> +    'adapters/chromaprint.hpp',
>> +    'adapters/variables.hpp',
>> +    'adapters/var_choice_model.hpp',
>> +    'dialogs/bookmarks.hpp',
>> +    'dialogs/mediainfo.hpp',
>> +    'dialogs/extended.hpp',
>> +    'dialogs/messages.hpp',
>> +    'dialogs/epg.hpp',
>> +    'dialogs/errors.hpp',
>> +    'dialogs/plugins.hpp',
>> +    'dialogs/preferences.hpp',
>> +    'dialogs/sout.hpp',
>> +    'dialogs/convert.hpp',
>> +    'dialogs/help.hpp',
>> +    'dialogs/gototime.hpp',
>> +    'dialogs/toolbar.hpp',
>> +    'dialogs/open.hpp',
>> +    'dialogs/openurl.hpp',
>> +    'dialogs/podcast_configuration.hpp',
>> +    'dialogs/firstrun.hpp',
>> +    'dialogs/extensions.hpp',
>> +    'dialogs/fingerprintdialog.hpp',
>> +    'dialogs/vlm.hpp',
>> +    'components/qml_main_context.hpp',
>> +    'components/aboutmodel.hpp',
>> +    'components/dialogmodel.hpp',
>> +    'components/extended_panels.hpp',
>> +    'components/info_panels.hpp',
>> +    'components/info_widgets.hpp',
>> +    'components/player_controller.hpp',
>> +    'components/preferences_widgets.hpp',
>> +    'components/complete_preferences.hpp',
>> +    'components/simple_preferences.hpp',
>> +    'components/open_panels.hpp',
>> +    'components/interface_widgets.hpp',
>> +    'components/navigation_history.hpp',
>> +    'components/controller.hpp',
>> +    'components/playercontrolbarmodel.hpp',
>> +    'components/controller_widget.hpp',
>> +    'components/custom_menus.hpp',
>> +    'components/settings.hpp',
>> +    'components/selectable_list_model.hpp',
>> +    'components/recent_media_model.hpp',
>> +    'components/audio_device_model.hpp',
>> +    'components/voutwindow/videosurface.hpp',
>> +    'components/voutwindow/qvoutwindow.hpp',
>> +    'components/voutwindow/qvoutwindowdummy.hpp',
>> +    'components/epg/EPGChannels.hpp',
>> +    'components/epg/EPGProgram.hpp',
>> +    'components/epg/EPGRuler.hpp',
>> +    'components/epg/EPGView.hpp',
>> +    'components/epg/EPGWidget.hpp',
>> +    'components/mediacenter/mcmedialib.hpp',
>> +    'components/mediacenter/mlqmltypes.hpp',
>> +    'components/mediacenter/mlbasemodel.hpp',
>> +    'components/mediacenter/mlalbum.hpp',
>> +    'components/mediacenter/mlalbummodel.hpp',
>> +    'components/mediacenter/mlalbumtrack.hpp',
>> +    'components/mediacenter/mlalbumtrackmodel.hpp',
>> +    'components/mediacenter/mlartist.hpp',
>> +    'components/mediacenter/mlartistmodel.hpp',
>> +    'components/mediacenter/mlgenre.hpp',
>> +    'components/mediacenter/mlgenremodel.hpp',
>> +    'components/mediacenter/mlnetworkmodel.hpp',
>> +    'components/mediacenter/mlvideo.hpp',
>> +    'components/mediacenter/mlvideomodel.hpp',
>> +    'components/playlist/playlist_common.hpp',
>> +    'components/playlist/playlist_item.hpp',
>> +    'components/playlist/playlist_model.hpp',
>> +    'components/playlist/playlist_controller.hpp',
>> +    'components/sout/profile_selector.hpp',
>> +    'components/sout/sout_widgets.hpp',
>> +    'util/animators.hpp',
>> +    'util/input_slider.hpp',
>> +    'util/input_models.hpp',
>> +    'util/timetooltip.hpp',
>> +    'util/customwidgets.hpp',
>> +    'util/qmleventfilter.hpp',
>> +    'util/searchlineedit.hpp',
>> +    'util/qvlcapp.hpp',
>> +    'util/vlctick.hpp',
>> +    'util/validators.hpp',
>> +    'util/buttons/RoundButton.hpp',
>> +    'util/buttons/DeckButtonsLayout.hpp',
>> +    'util/buttons/BrowseButton.hpp',
>> +    'styles/seekstyle.hpp',
>> +    )
>> +
>> +if host_system == 'windows'
>> +    moc_headers += files('main_interface_win32.hpp')
>> +endif
>> +
>> +some_sources = files(
>> +    'qt.cpp',
>> +    'menus.cpp',
>> +    'main_interface.cpp',
>> +    'dialogs_provider.cpp',
>> +    'extensions_manager.cpp',
>> +    'managers/addons_manager.cpp',
>> +    'managers/renderer_manager.cpp',
>> +    'recents.cpp',
>> +    'adapters/chromaprint.cpp',
>> +    'adapters/variables.cpp',
>> +    'adapters/var_choice_model.cpp',
>> +    'dialogs/bookmarks.cpp',
>> +    'dialogs/preferences.cpp',
>> +    'dialogs/mediainfo.cpp',
>> +    'dialogs/epg.cpp',
>> +    'dialogs/extended.cpp',
>> +    'dialogs/messages.cpp',
>> +    'dialogs/errors.cpp',
>> +    'dialogs/plugins.cpp',
>> +    'dialogs/sout.cpp',
>> +    'dialogs/convert.cpp',
>> +    'dialogs/help.cpp',
>> +    'dialogs/gototime.cpp',
>> +    'dialogs/toolbar.cpp',
>> +    'dialogs/open.cpp',
>> +    'dialogs/openurl.cpp',
>> +    'dialogs/vlm.cpp',
>> +    'dialogs/firstrun.cpp',
>> +    'dialogs/podcast_configuration.cpp',
>> +    'dialogs/extensions.cpp',
>> +    'dialogs/fingerprintdialog.cpp',
>> +    'components/qml_main_context.cpp',
>> +    'components/aboutmodel.cpp',
>> +    'components/dialogmodel.cpp',
>> +    'components/extended_panels.cpp',
>> +    'components/info_panels.cpp',
>> +    'components/info_widgets.cpp',
>> +    'components/navigation_history.cpp',
>> +    'components/player_controller.cpp',
>> +    'components/preferences_widgets.cpp',
>> +    'components/complete_preferences.cpp',
>> +    'components/simple_preferences.cpp',
>> +    'components/open_panels.cpp',
>> +    'components/interface_widgets.cpp',
>> +    'components/controller.cpp',
>> +    'components/playercontrolbarmodel.cpp',
>> +    'components/controller_widget.cpp',
>> +    'components/recent_media_model.cpp',
>> +    'components/selectable_list_model.cpp',
>> +    'components/audio_device_model.cpp',
>> +    'components/voutwindow/videosurface.cpp',
>> +    'components/voutwindow/qvoutwindow.cpp',
>> +    'components/voutwindow/qvoutwindowdummy.cpp',
>> +    'components/custom_menus.cpp',
>> +    'components/settings.cpp',
>> +    'components/epg/EPGChannels.cpp',
>> +    'components/epg/EPGItem.cpp',
>> +    'components/epg/EPGProgram.cpp',
>> +    'components/epg/EPGRuler.cpp',
>> +    'components/epg/EPGView.cpp',
>> +    'components/epg/EPGWidget.cpp',
>> +    'components/mediacenter/mcmedialib.cpp',
>> +    'components/mediacenter/mlbasemodel.cpp',
>> +    'components/mediacenter/mlalbum.cpp',
>> +    'components/mediacenter/mlalbummodel.cpp',
>> +    'components/mediacenter/mlalbumtrack.cpp',
>> +    'components/mediacenter/mlalbumtrackmodel.cpp',
>> +    'components/mediacenter/mlartist.cpp',
>> +    'components/mediacenter/mlartistmodel.cpp',
>> +    'components/mediacenter/mlgenre.cpp',
>> +    'components/mediacenter/mlgenremodel.cpp',
>> +    'components/mediacenter/mlnetworkmodel.cpp',
>> +    'components/mediacenter/mlvideo.cpp',
>> +    'components/mediacenter/mlvideomodel.cpp',
>> +    'components/playlist/playlist_common.cpp',
>> +    'components/playlist/playlist_controller.cpp',
>> +    'components/playlist/playlist_item.cpp',
>> +    'components/playlist/playlist_model.cpp',
>> +    'components/sout/profile_selector.cpp',
>> +    'components/sout/sout_widgets.cpp',
>> +    'util/animators.cpp',
>> +    'util/input_slider.cpp',
>> +    'util/input_models.cpp',
>> +    'util/timetooltip.cpp',
>> +    'util/customwidgets.cpp',
>> +    'util/searchlineedit.cpp',
>> +    'util/registry.cpp',
>> +    'util/qt_dirs.cpp',
>> +    'util/validators.cpp',
>> +    'util/buttons/BrowseButton.cpp',
>> +    'util/buttons/DeckButtonsLayout.cpp',
>> +    'util/buttons/RoundButton.cpp',
>> +    'util/qmleventfilter.cpp',
>> +    'util/vlctick.cpp',
>> +    'util/imagehelper.cpp',
>> +    'styles/seekstyle.cpp',
>> +)
>> +
>> +if host_system == 'windows'
>> +    some_sources += files('main_interface_win32.cpp')
>> +endif
>> +
>> +ui_sources = files(
>> +    'ui/equalizer.ui',
>> +    'ui/video_effects.ui',
>> +    'ui/open_file.ui',
>> +    'ui/open_disk.ui',
>> +    'ui/open_net.ui',
>> +    'ui/open_capture.ui',
>> +    'ui/open.ui',
>> +    'ui/podcast_configuration.ui',
>> +    'ui/profiles.ui',
>> +    'ui/sprefs_audio.ui',
>> +    'ui/sprefs_input.ui',
>> +    'ui/sprefs_interface.ui',
>> +    'ui/sprefs_subtitles.ui',
>> +    'ui/sprefs_video.ui',
>> +    'ui/streampanel.ui',
>> +    'ui/messages_panel.ui',
>> +    'ui/about.ui',
>> +    'ui/update.ui',
>> +    'ui/sout.ui',
>> +    'ui/vlm.ui',
>> +    'ui/fingerprintdialog.ui')
>> +
>> +if qt5_dep.found()
>> +    qt5pre_files = qt5.preprocess(ui_files : ui_sources,
>> +        moc_headers : moc_headers,
>> +        qresources : files('vlc.qrc'))
>> +
>> +    qt_sources = files('qt.cpp')
>> +
>> +    # TODO: Properly implement LIBCOM for Windows!
>> +    qt_extra_deps = []
>> +    if host_system == 'windows'
>> +        qt_extra_deps += [
>> +            cc.find_library('ole32', required: true),
>> +            cc.find_library('comctl32', required: true),
>> +            cc.find_library('uuid', required: true)
>> +        ]
>> +    endif
>> +
>> +    vlc_modules += {
>> +        'name' : 'qt',
>> +        'sources' : [qt5pre_files, qt_sources, some_sources],
>> +        'dependencies' : [qt5_dep, x11_dep, qt_extra_deps],
>> +        'include_directories' : include_dir
>> +    }
>> +endif
>> diff --git a/modules/keystore/meson.build 
>> b/modules/keystore/meson.build
>> new file mode 100644
>> index 0000000000..1f22d36e34
>> --- /dev/null
>> +++ b/modules/keystore/meson.build
>> @@ -0,0 +1,47 @@
>> +# Memory keystore
>> +vlc_modules += {
>> +    'name' : 'memory_keystore',
>> +    'sources' : files('memory.c', 'list_util.c')
>> +}
>> +
>> +# File keystore
>> +file_keystore_extra_sources = []
>> +file_keystore_extra_deps = []
>> +if host_system == 'windows'
>> +    file_keystore_extra_sources += 'file_crypt_win32.c'
>> +    file_keystore_extra_deps += cc.find_library('crypt32', required:
>> true)
>> +endif
>> +vlc_modules += {
>> +    'name' : 'file_keystore',
>> +    'sources' : files('file.c', 'list_util.c',
>> file_keystore_extra_sources),
>> +    'dependencies' : file_keystore_extra_deps
>> +}
>> +
>> +# KWallet keystore
>> +if dbus_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'kwallet',
>> +        'sources' : files('kwallet.c'),
>> +        'dependencies' : [dbus_dep, m_lib]
>> +    }
>> +endif
>> +
>> +# libsecret keystore
>> +libsecret_dep = dependency('libsecret-1', version : '>= 0.18',
>> required : get_option('libsecret'))
>> +if libsecret_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'secret',
>> +        'sources' : files('secret.c'),
>> +        'dependencies' : [libsecret_dep]
>> +    }
>> +endif
>> +
>> +# Keychain (for appleOSes)
>> +if host_system == 'darwin'
>> +    vlc_modules += {
>> +        'name' : 'keychain',
>> +        'sources' : files('keychain.m', 'list_util.c'),
>> +        'objc_args' : ['-fobjc-arc'],
>> +        'dependencies' : [foundation_dep, security_dep]
>> +    }
>> +endif
>> diff --git a/modules/logger/meson.build b/modules/logger/meson.build
>> new file mode 100644
>> index 0000000000..dad2f52d26
>> --- /dev/null
>> +++ b/modules/logger/meson.build
>> @@ -0,0 +1,31 @@
>> +# Console logger module
>> +vlc_modules += {
>> +    'name' : 'console_logger',
>> +    'sources' : files(['console.c']),
>> +}
>> +
>> +# File logger
>> +vlc_modules += {
>> +    'name' : 'file_logger',
>> +    'sources' : files('file.c')
>> +}
>> +
>> +# Syslog logger
>> +if cc.check_header('syslog.h')
>> +    vlc_modules += {
>> +        'name' : 'syslog',
>> +        'sources' : files('syslog.c')
>> +    }
>> +endif
>> +
>> +# Systemd journal logger
>> +libsystemd_dep = dependency('libsystemd', required : false)
>> +if libsystemd_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'sd_journal',
>> +        'sources' : files('journal.c'),
>> +        'dependencies' : [libsystemd_dep]
>> +    }
>> +endif
>> +
>> +# TODO Android logger
>> diff --git a/modules/meson.build b/modules/meson.build
>> new file mode 100644
>> index 0000000000..bffdbcc722
>> --- /dev/null
>> +++ b/modules/meson.build
>> @@ -0,0 +1,157 @@
>> +#
>> +# VLC plugins
>> +# This file contains the top-level build definition for VLC
>> +# plugins, in the subdirectories are the actual build definitions
>> +# for the individual plugins.
>> +#
>> +
>> +# Module dependencies
>> +# The following section contains dependencies that are needed
>> +# by multiple module types. (There is no need to put dependencies
>> +# here that are used by multiple modules in the same subdirectory)
>> +
>> +# Pulse audio
>> +pulse_dep = dependency('libpulse', version: '>= 1.0', required:
>> get_option('pulse'))
>> +
>> +# ALSA
>> +alsa_dep = dependency('alsa', version : '>= 1.0.24', required :
>> get_option('alsa'))
>> +
>> +# JACK (TODO: set required based on a get_option())
>> +jack_dep = dependency('jack', version : '>= 1.9.7', required : 
>> false)
>> +if not jack_dep.found()
>> +    # Try jack1 instead
>> +    jack_dep = dependency('jack', version : ['>= 0.120.1', '< 1.0'],
>> +        required : false)
>> +endif
>> +
>> +# Darwin-specific dependencies
>> +if host_system == 'darwin'
>> +    cocoa_dep = dependency('Cocoa', required: true)
>> +    security_dep = dependency('Security', required : true)
>> +    coremedia_dep = dependency('CoreMedia', required : true)
>> +    corevideo_dep = dependency('CoreVideo', required : true)
>> +    videotoolbox_dep = dependency('VideoToolbox', required : true)
>> +    audiounit_dep = dependency('AudioUnit', required: true)
>> +    audiotoolbox_dep = dependency('AudioToolbox', required : true)
>> +    iokit_dep = dependency('IOKit', required : true)
>> +endif
>> +
>> +# Helper libraries for modules
>> +# These are helper libraries used by some modules
>> +if pulse_dep.found()
>> +    libvlc_pulse = library('vlc_pulse',
>> +        files('audio_output/vlcpulse.c'),
>> +        include_directories: [include_directories('audio_output'),
>> vlc_include_dirs],
>> +        dependencies: [pulse_dep],
>> +        link_with: [vlc_libcompat, libvlccore],
>> +    )
>> +endif
>> +
>> +# Array that holds all enabled VLC module dicts
>> +vlc_modules = []
>> +
>> +# codec modules
>> +subdir('codec')
>> +
>> +# demux modules
>> +subdir('demux')
>> +
>> +# access modules
>> +subdir('access')
>> +
>> +# audio filter modules
>> +subdir('audio_filter')
>> +
>> +# audio mixer
>> +subdir('audio_mixer')
>> +
>> +# audio output modules
>> +subdir('audio_output')
>> +
>> +# control modules
>> +subdir('control')
>> +
>> +# gui modules
>> +subdir('gui')
>> +
>> +# keystore modules
>> +subdir('keystore')
>> +
>> +# logger modules
>> +subdir('logger')
>> +
>> +# misc modules
>> +subdir('misc')
>> +
>> +# meta engine modules
>> +subdir('meta_engine')
>> +
>> +# packetizer modules
>> +subdir('packetizer')
>> +
>> +# service discovery modules
>> +subdir('services_discovery')
>> +
>> +# text renderer modules
>> +subdir('text_renderer')
>> +
>> +# video chroma modules
>> +subdir('video_chroma')
>> +
>> +# video filter modules
>> +subdir('video_filter')
>> +
>> +# video output modules
>> +subdir('video_output')
>> +
>> +# video splitter modules
>> +subdir('video_splitter')
>> +
>> +# visualization modules
>> +subdir('visualization')
>> +
>> +# Qt check executable
>> +# This has to be declared here as it needs to end up
>> +# in the modules folder, not in gui/qt/ subfolder as
>> +# vlc-static would not find it there.
>> +if qt5_dep.found()
>> +    executable('vlc-qt-check',
>> +        files('gui/qt/vlc-qt-check.cpp'),
>> +        dependencies: [qt5_dep],
>> +        include_directories: [vlc_include_dirs],
>> +        build_by_default: true,
>> +        install: true,
>> +        install_dir: get_option('libexecdir')
>> +    )
>> +endif
>> +
>> +#
>> +# Common module handling code
>> +#
>> +# In order to reduce boilerplate code, plugins are defined by a
>> +# dictionary which is added to the `vlc_modules` array. This
>> +# array is then iterated over and a library is defined for each
>> +# entry with the needed build definition for a VLC plugin.
>> +#
>> +foreach module : vlc_modules
>> +    common_args = [
>> +        '-DMODULE_STRING="@0@"'.format(module['name']),
>> +        '-D__PLUGIN__'
>> +    ]
>> +
>> +    library(module['name'] + '_plugin',
>> +        module['sources'],
>> +        link_with: [module.get('link_with', []), vlc_libcompat,
>> libvlccore],
>> +        link_args: module.get('link_args', []),
>> +        link_depends: module.get('link_depends', []),
>> +        #link_language: module.get('link_language', []),
>> +        include_directories: [module.get('include_directories', []),
>> vlc_include_dirs],
>> +        dependencies: module.get('dependencies', []),
>> +        c_args: [module.get('c_args', []), common_args],
>> +        cpp_args: [module.get('cpp_args', []), common_args],
>> +        objc_args: [module.get('objc_args', []), common_args],
>> +        build_by_default: true,
>> +        install: true,
>> +        install_dir: get_option('libdir') / 'vlc/plugins'
>> +    )
>> +endforeach
>> diff --git a/modules/meta_engine/meson.build
>> b/modules/meta_engine/meson.build
>> new file mode 100644
>> index 0000000000..b745251edc
>> --- /dev/null
>> +++ b/modules/meta_engine/meson.build
>> @@ -0,0 +1,15 @@
>> +# Folder
>> +vlc_modules += {
>> +    'name' : 'folder',
>> +    'sources' : files('folder.c')
>> +}
>> +
>> +# Taglib
>> +taglib_dep = dependency('taglib', version : '>= 1.11', required :
>> get_option('taglib'))
>> +if taglib_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'taglib',
>> +        'sources' : files('taglib.cpp', '../demux/xiph_metadata.c'),
>> +        'dependencies' : [taglib_dep, z_lib]
>> +    }
>> +endif
>> diff --git a/modules/misc/meson.build b/modules/misc/meson.build
>> new file mode 100644
>> index 0000000000..2edb66818f
>> --- /dev/null
>> +++ b/modules/misc/meson.build
>> @@ -0,0 +1,160 @@
>> +# stats module
>> +vlc_modules += {
>> +    'name' : 'stats',
>> +    'sources' : files('stats.c')
>> +}
>> +
>> +# audioscrobbler module
>> +vlc_modules += {
>> +    'name' : 'audioscrobbler',
>> +    'sources' : files('audioscrobbler.c'),
>> +    'dependencies' : [threads_dep, socket_libs]
>> +}
>> +
>> +# audio fingerprinter module
>> +vlc_modules += {
>> +    'name' : 'fingerprinter',
>> +    'sources' : files(
>> +        'fingerprinter.c',
>> +        'webservices/json.c',
>> +        'webservices/acoustid.c',
>> +    ),
>> +    'dependencies' : [m_lib]
>> +}
>> +
>> +# export module
>> +vlc_modules += {
>> +    'name' : 'export',
>> +    'sources' : files(
>> +        'playlist/export.c',
>> +        'playlist/html.c',
>> +        'playlist/m3u.c',
>> +        'playlist/xspf.c',
>> +    )
>> +}
>> +
>> +# libxml2 module
>> +libxml2_dep = dependency('libxml-2.0', version : '>= 2.5', required 
>> :
>> get_option('libxml2'))
>> +if libxml2_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'xml',
>> +        'sources' : files('xml/libxml.c'),
>> +        'dependencies' : [libxml2_dep]
>> +    }
>> +endif
>> +
>> +# medialibrary module
>> +medialibrary_dep = dependency('medialibrary', required :
>> get_option('medialibrary'), method : 'pkg-config')
>> +if medialibrary_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'medialibrary',
>> +        'sources' : files(
>> +            'medialibrary/medialib.cpp',
>> +            'medialibrary/MetadataExtractor.cpp',
>> +            'medialibrary/entities.cpp',
>> +            'medialibrary/Thumbnailer.cpp',
>> +            'medialibrary/fs/device.cpp',
>> +            'medialibrary/fs/directory.cpp',
>> +            'medialibrary/fs/file.cpp',
>> +            'medialibrary/fs/fs.cpp',
>> +            'medialibrary/fs/util.cpp',
>> +        ),
>> +        'dependencies' : [medialibrary_dep]
>> +    }
>> +endif
>> +
>> +# Securetransport
>> +if host_system == 'darwin'
>> +    vlc_modules += {
>> +        'name' : 'securetransport',
>> +        'sources' : files('securetransport.c'),
>> +        'link_args' :
>> ['-Wl,-U,_SSLCopyALPNProtocols,-U,_SSLSetALPNProtocols'],
>> +        'dependencies' : [security_dep, corefoundation_dep]
>> +    }
>> +endif
>> +
>> +# GnuTLS module
>> +# If there are errors with this, probably due to lack of:
>> +# https://github.com/mesonbuild/meson/pull/5656
>> +gnutls_dep = dependency('gnutls', version : '>= 3.5.0', required :
>> get_option('gnutls'))
>> +if gnutls_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'gnutls',
>> +        'sources' : files('gnutls.c'),
>> +        'dependencies' : [gnutls_dep]
>> +    }
>> +endif
>> +
>> +# IOKit inhibit module (macOS only)
>> +if have_osx
>> +    vlc_modules += {
>> +        'name' : 'iokit_inhibit',
>> +        'sources' : files('inhibit/iokit-inhibit.c'),
>> +        'dependencies' : [corefoundation_dep, iokit_dep]
>> +    }
>> +endif
>> +
>> +if get_option('addon_manager')
>> +    # Add-on manager module
>> +    vlc_modules += {
>> +        'name' : 'addonsvorepository',
>> +        'sources' : files('addons/vorepository.c')
>> +    }
>> +    # Add-on filesystem storage module
>> +    vlc_modules += {
>> +        'name' : 'addonsfsstorage',
>> +        'sources' : files('addons/fsstorage.c')
>> +    }
>> +endif
>> +
>> +vlc_modules += {
>> +    'name' : 'vod_rtsp',
>> +    'sources' : files('rtsp.c'),
>> +    'dependencies' : [socket_libs]
>> +}
>> +
>> +# Wayland inhibit module
>> +if have_wayland
>> +    # FIXME: Includes are currently set up in a way that they will 
>> not
>> +    # include this file correctly. This needs to be fixed.
>> +    wl_inhibit_client_proto = custom_target(
>> +        'idle-inhibit-client-protocol-generator',
>> +        output : 'idle-inhibit-client-protocol.h',
>> +        input : wayland_protocols_dir /
>> 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml',
>> +        command : [wayland_scanner, 'client-header', '@INPUT@',
>> '@OUTPUT@'],
>> +    )
>> +    wl_inhibit_proto = custom_target(
>> +        'idle-inhibit-protocol-generator',
>> +        output : 'idle-inhibit-protocol.c',
>> +        input : wayland_protocols_dir /
>> 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml',
>> +        command : [wayland_scanner, 'private-code', '@INPUT@',
>> '@OUTPUT@'],
>> +    )
>> +
>> +    vlc_modules += {
>> +        'name' : 'wl_idle_inhibit',
>> +        'sources' : [
>> +            files('inhibit/wl-idle-inhibit.c'),
>> +            wl_inhibit_client_proto,
>> +            wl_inhibit_proto,
>> +        ],
>> +        'dependencies' : [wayland_deps],
>> +    }
>> +endif
>> +
>> +# XCB screensaver inhibit module
>> +if xcb_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'xdg_screensaver',
>> +        'sources' : files('inhibit/xdg.c'),
>> +        'dependencies' : [xcb_dep]
>> +    }
>> +endif
>> +
>> +# DBUS
>> +if dbus_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'dbus_screensaver',
>> +        'sources' : files('inhibit/dbus.c'),
>> +        'dependencies' : [dbus_dep]
>> +    }
>> +endif
>> diff --git a/modules/packetizer/meson.build
>> b/modules/packetizer/meson.build
>> new file mode 100644
>> index 0000000000..413957aea7
>> --- /dev/null
>> +++ b/modules/packetizer/meson.build
>> @@ -0,0 +1,98 @@
>> +# AV1 packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_av1',
>> +    'sources' : files('av1.c', 'av1_obu.c')
>> +}
>> +
>> +# Copy packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_copy',
>> +    'sources' : files('copy.c')
>> +}
>> +
>> +# MPEG-I/II video packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_mpegvideo',
>> +    'sources' : files('mpegvideo.c')
>> +}
>> +
>> +# MPEG audio layer I/II/III packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_mpegaudio',
>> +    'sources' : files('mpegaudio.c')
>> +}
>> +
>> +# MPEG4 video packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_mpeg4video',
>> +    'sources' : files('mpeg4video.c')
>> +}
>> +
>> +# MPEG4 audio packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_mpeg4audio',
>> +    'sources' : files('mpeg4audio.c')
>> +}
>> +
>> +# H.264 packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_h264',
>> +    'sources' : files(
>> +        'h264.c',
>> +        'h264_nal.c',
>> +        'h264_slice.c',
>> +        'hxxx_sei.c',
>> +        'hxxx_common.c'
>> +    )
>> +}
>> +
>> +# VC-1 packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_vc1',
>> +    'sources' : files('vc1.c')
>> +}
>> +
>> +# Meridian Lossless Packing packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_mlp',
>> +    'sources' : files('mlp.c')
>> +}
>> +
>> +# FLAC packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_flac',
>> +    'sources' : files('flac.c')
>> +}
>> +
>> +# HEVC packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_hevc',
>> +    'sources' : files(
>> +        'hevc.c',
>> +        'hevc_nal.c',
>> +        'hxxx_sei.c',
>> +        'hxxx_common.c'
>> +        )
>> +}
>> +
>> +# A/52 audio packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_a52',
>> +    'sources' : files('a52.c')
>> +}
>> +
>> +# DTS audio packetizer
>> +vlc_modules += {
>> +    'name' : 'packetizer_dts',
>> +    'sources' : files('dts.c', 'dts_header.c')
>> +}
>> +
>> +# FFmpeg-based packetizer
>> +if avcodec_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'packetizer_avparser',
>> +        'sources' : files('avparser.c'),
>> +        'dependencies' : [avutil_dep, avcodec_dep],
>> +        'link_with' : [libavcodec_common]
>> +    }
>> +endif
>> diff --git a/modules/services_discovery/meson.build
>> b/modules/services_discovery/meson.build
>> new file mode 100644
>> index 0000000000..4eec512c90
>> --- /dev/null
>> +++ b/modules/services_discovery/meson.build
>> @@ -0,0 +1,71 @@
>> +# Podcast
>> +vlc_modules += {
>> +    'name' : 'podcast',
>> +    'sources' : files('podcast.c'),
>> +    'dependencies' : [threads_dep]
>> +}
>> +
>> +# Zeroconf services discovery
>> +avahi_dep = dependency('avahi-client', version : '>= 0.6', required 
>> :
>> get_option('avahi'))
>> +if avahi_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'avahi',
>> +        'sources' : files('avahi.c'),
>> +        'dependencies' : [avahi_dep]
>> +    }
>> +endif
>> +
>> +# MTP devices support
>> +mtp_dep = dependency('libmtp', version : '>= 1.0.0', required :
>> get_option('mtp'))
>> +if mtp_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'mtp',
>> +        'sources' : files('mtp.c'),
>> +        'dependencies' : [mtp_dep]
>> +    }
>> +endif
>> +
>> +# UPnP Plugin (Intel SDK)
>> +upnp_dep = dependency('libupnp', required : get_option('upnp'))
>> +if upnp_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'upnp',
>> +        'sources' : files(
>> +            'upnp.cpp',
>> +            'upnp-wrapper.cpp',
>> +            '../stream_out/renderer_common.cpp',
>> +            '../stream_out/dlna/dlna.cpp',
>> +            ),
>> +        'dependencies' : [upnp_dep]
>> +    }
>> +endif
>> +
>> +# mDNS using libmicrodns
>> +microdns_dep = dependency('microdns', required :
>> get_option('microdns'))
>> +if microdns_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'microdns',
>> +        'sources' : files('microdns.c'),
>> +        'dependencies' : [microdns_dep, socket_libs]
>> +    }
>> +endif
>> +
>> +# mDNS using Bonjour
>> +if host_system == 'darwin'
>> +    foundation_dep = dependency('Foundation', required : true)
>> +    vlc_modules += {
>> +        'name' : 'bonjour',
>> +        'sources' : files('bonjour.m'),
>> +        'objc_args' : ['-fobjc-arc'],
>> +        'dependencies' : [foundation_dep]
>> +    }
>> +endif
>> +
>> +# XCB apps discovery
>> +if xcb_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'xcb_apps',
>> +        'sources' : files('xcb_apps.c'),
>> +        'dependencies' : [xcb_dep]
>> +    }
>> +endif
>> diff --git a/modules/text_renderer/meson.build
>> b/modules/text_renderer/meson.build
>> new file mode 100644
>> index 0000000000..833ca90d66
>> --- /dev/null
>> +++ b/modules/text_renderer/meson.build
>> @@ -0,0 +1,11 @@
>> +#
>> +# Text renderer modules
>> +# Modules that are used to render subtitles and OSD text
>> +#
>> +
>> +# Dummy text renderer
>> +vlc_modules += {
>> +    'name' : 'tdummy',
>> +    'sources' : files('tdummy.c')
>> +}
>> +
>> diff --git a/modules/video_chroma/meson.build
>> b/modules/video_chroma/meson.build
>> new file mode 100644
>> index 0000000000..69f135a304
>> --- /dev/null
>> +++ b/modules/video_chroma/meson.build
>> @@ -0,0 +1,20 @@
>> +# chroma copy helper library
>> +chroma_copy_lib = static_library(
>> +    'chroma_copy',
>> +    files('copy.c'),
>> +    include_directories : [vlc_include_dirs],
>> +    pic : true
>> +)
>> +
>> +# CVPX chroma converter
>> +if host_system == 'darwin'
>> +    vlc_modules += {
>> +        'name' : 'cvpx',
>> +        'sources' : files(
>> +            '../codec/vt_utils.c',
>> +            'cvpx.c',
>> +        ),
>> +        'link_with' : [chroma_copy_lib],
>> +        'dependencies' : [videotoolbox_dep, foundation_dep,
>> coremedia_dep, corevideo_dep]
>> +    }
>> +endif
>> diff --git a/modules/video_filter/meson.build
>> b/modules/video_filter/meson.build
>> new file mode 100644
>> index 0000000000..a74b91d3e7
>> --- /dev/null
>> +++ b/modules/video_filter/meson.build
>> @@ -0,0 +1,25 @@
>> +# deinterlace common helper lib
>> +deinterlacecommon_lib = static_library(
>> +    'deinterlace_common',
>> +    files('deinterlace/common.c'),
>> +    include_directories : [vlc_include_dirs],
>> +    pic : true
>> +)
>> +
>> +# deinterlace filter
>> +vlc_modules += {
>> +    'name' : 'deinterlace',
>> +    'sources' : files(
>> +        'deinterlace/deinterlace.c',
>> +        'deinterlace/merge.c',
>> +        'deinterlace/helpers.c',
>> +        'deinterlace/algo_basic.c',
>> +        'deinterlace/algo_x.c',
>> +        'deinterlace/algo_yadif.c',
>> +        'deinterlace/algo_phosphor.c',
>> +        'deinterlace/algo_ivtc.c',
>> +    ),
>> +    # Inline ASM doesn't build with -O0
>> +    'c_args' : ['-O2'],
>> +    'link_with' : [deinterlacecommon_lib]
>> +}
>> diff --git a/modules/video_output/meson.build
>> b/modules/video_output/meson.build
>> new file mode 100644
>> index 0000000000..3bcc01d2b8
>> --- /dev/null
>> +++ b/modules/video_output/meson.build
>> @@ -0,0 +1,164 @@
>> +#
>> +# Video output modules
>> +#
>> +
>> +# Dummy video output
>> +vlc_modules += {
>> +    'name' : 'vdummy',
>> +    'sources' : files('vdummy.c')
>> +}
>> +
>> +# Dummy window provider
>> +vlc_modules += {
>> +    'name' : 'wdummy',
>> +    'sources' : files('wdummy.c')
>> +}
>> +
>> +# Video splitter
>> +vlc_modules += {
>> +    'name' : 'video_splitter',
>> +    'sources' : files('splitter.c')
>> +}
>> +
>> +# YUV video output
>> +vlc_modules += {
>> +    'name' : 'yuv',
>> +    'sources' : files('yuv.c')
>> +}
>> +
>> +# Flaschen video output
>> +vlc_modules += {
>> +    'name' : 'flaschen',
>> +    'sources' : files('flaschen.c'),
>> +    'dependencies' : [socket_libs]
>> +}
>> +
>> +# Coloured ASCII art (Caca)
>> +caca_dep = dependency('caca', version : '>= 0.99.beta14', required :
>> get_option('caca'))
>> +if caca_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'caca',
>> +        'sources' : files('caca.c'),
>> +        'dependencies' : [caca_dep, x11_dep]
>> +    }
>> +endif
>> +
>> +# Kernel Mode Setting
>> +drm_dep = dependency('libdrm', version : '>= 2.4.83', required :
>> get_option('drm'))
>> +if drm_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'kms',
>> +        'sources' : files('kms.c'),
>> +        'dependencies' : [drm_dep]
>> +    }
>> +endif
>> +
>> +# Linux FrameBuffer
>> +if cc.check_header('linux/fb.h')
>> +    vlc_modules += {
>> +        'name' : 'fb',
>> +        'sources' : files('fb.c')
>> +    }
>> +endif
>> +
>> +# TODO Android EGL stuff
>> +
>> +# TODO OS2 KVA stuff
>> +
>> +# TODO drawable
>> +
>> +# TODO inhibit
>> +
>> +# TODO egl win32
>> +
>> +# TODO wingdi
>> +
>> +# TODO glwin32
>> +
>> +# TODO directdraw
>> +
>> +# TODO direct3d11
>> +
>> +# TODO direct3d9
>> +
>> +# TODO ALL THE OTHER STUFF!
>> +
>> +#
>> +# OpenGL video outputs
>> +#
>> +
>> +opengl_common_sources = files(
>> +    'opengl/vout_helper.c',
>> +    'opengl/fragment_shaders.c',
>> +    'opengl/converter_sw.c'
>> +    )
>> +
>> +opengl_common_deps = []
>> +
>> +if have_osx
>> +    quartz_dep = dependency('QuartzCore', required: true)
>> +    opengl_dep = dependency('OpenGL', method: 'extraframework',
>> required : true)
>> +
>> +    vlc_modules += {
>> +        'name' : 'vout_macosx',
>> +        'sources' : [files('macosx.m'), opengl_common_sources],
>> +        'c_args' : ['-DHAVE_GL_CORE_SYMBOLS'],
>> +        'dependencies' : [m_lib, cocoa_dep, opengl_dep,
>> opengl_common_deps]
>> +    }
>> +
>> +    vlc_modules += {
>> +        'name' : 'caopengllayer',
>> +        'sources' : [files('caopengllayer.m'), 
>> opengl_common_sources],
>> +        'c_args' : ['-DHAVE_GL_CORE_SYMBOLS'],
>> +        'dependencies' : [m_lib, cocoa_dep, opengl_dep, quartz_dep,
>> opengl_common_deps]
>> +    }
>> +endif
>> +
>> +#
>> +# Vulkan video outputs
>> +#
>> +
>> +vulkan_common_sources = [
>> +    'vulkan/instance.c',
>> +    'placebo_utils.c',
>> +]
>> +
>> +vulkan_dep = dependency('vulkan', version : '>= 1.0.26', required :
>> false)
>> +placebo_dep = dependency('libplacebo', version : '>= 1.7', required 
>> :
>> false)
>> +
>> +vulkan_common_deps = [vulkan_dep, placebo_dep]
>> +
>> +if placebo_dep.found() and vulkan_dep.found()
>> +    #TODO: and placebo_dep.version().version_compare('>= 1.7')
>> +    # TODO: link_language kwarg is not yet accepted for library() in
>> released
>> +    # meson versions
>> +    vlc_modules += {
>> +        'name' : 'vk',
>> +        'sources' : files(
>> +            'vulkan/display.c',
>> +            vulkan_common_sources
>> +        ),
>> +        'dependencies' : [vulkan_common_deps]
>> +    }
>> +
>> +    if xcb_dep.found() and x11_dep.found()
>> +        vlc_modules += {
>> +            'name' : 'vk_x11',
>> +            'sources' : files(
>> +                'vulkan/surface.c',
>> +                'vulkan/platform_xcb.c',
>> +                vulkan_common_sources
>> +            ),
>> +            'c_args' : ['-DVK_USE_PLATFORM_XCB_KHR',
>> '-DPLATFORM_NAME=X11'],
>> +            'dependencies' : [vulkan_common_deps, x11_dep, xcb_dep]
>> +        }
>> +    endif
>> +endif
>> +
>> +if xcb_dep.found() and xproto_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'xcb_window',
>> +        'sources' : files('xcb/window.c'),
>> +        'dependencies' : [xcb_dep, xproto_dep]
>> +    }
>> +endif
>> diff --git a/modules/video_splitter/meson.build
>> b/modules/video_splitter/meson.build
>> new file mode 100644
>> index 0000000000..008d12cd68
>> --- /dev/null
>> +++ b/modules/video_splitter/meson.build
>> @@ -0,0 +1,24 @@
>> +# Clone video splitter
>> +vlc_modules += {
>> +    'name' : 'clone',
>> +    'sources' : files('clone.c')
>> +}
>> +
>> +# Wall video splitter
>> +vlc_modules += {
>> +    'name' : 'wall',
>> +    'sources' : files('wall.c')
>> +}
>> +
>> +if xcb_dep.found() and xcb_randr_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'panoramix',
>> +        'sources' : files('panoramix.c'),
>> +        'dependencies' : [xcb_dep, xcb_randr_dep]
>> +    }
>> +elif host_system == 'windows'
>> +    vlc_modules += {
>> +        'name' : 'panoramix',
>> +        'sources' : files('panoramix.c')
>> +    }
>> +endif
>> diff --git a/modules/visualization/meson.build
>> b/modules/visualization/meson.build
>> new file mode 100644
>> index 0000000000..a6af877ad5
>> --- /dev/null
>> +++ b/modules/visualization/meson.build
>> @@ -0,0 +1,29 @@
>> +# goom visualization plugin
>> +goom2_dep = dependency('libgoom2', required : get_option('goom2'))
>> +if goom2_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'goom',
>> +        'sources' : files('goom.c'),
>> +        'dependencies' : [goom2_dep, m_lib]
>> +    }
>> +endif
>> +
>> +# projectM visualization plugin
>> +projectm_dep = dependency('libprojectM', version : '>= 2.0.0',
>> required : false)
>> +projectm_args = []
>> +
>> +if projectm_dep.found()
>> +    projectm_args += '-DHAVE_PROJECTM2'
>> +else
>> +    projectm_dep = dependency('libprojectM', version : '< 2.0.0',
>> +        required : false)
>> +endif
>> +
>> +if projectm_dep.found()
>> +    vlc_modules += {
>> +        'name' : 'projectm',
>> +        'sources' : files('projectm.cpp'),
>> +        'dependencies' : [projectm_dep],
>> +        'cpp_args' : [projectm_args]
>> +    }
>> +endif
>> diff --git a/src/meson.build b/src/meson.build
>> new file mode 100644
>> index 0000000000..3e9bb72ecd
>> --- /dev/null
>> +++ b/src/meson.build
>> @@ -0,0 +1,268 @@
>> +#
>> +# VLC revision file generation
>> +#
>> +git_dir = join_paths(vlc_src_root, '.git')
>> +rev_target = vcs_tag(command : ['git',
>> +    '--git-dir', git_dir,
>> +    'describe', '--tags', '--long',
>> +    '--match', '?.*.*', '--always'],
>> +    input : 'revision.c.in',
>> +    output : 'revision.c')
>> +
>> +#
>> +# FourCC preprocessor
>> +#
>> +
>> +fourcc_gen = executable('fourcc_gen',
>> +    ['misc/fourcc_gen.c'],
>> +    include_directories: vlc_include_dirs,
>> +    native: true
>> +)
>> +
>> +fourcc = custom_target('fourcc_tables.h',
>> +                        output :  ['fourcc_tables.h'],
>> +                        depend_files : ['misc/fourcc_list.h',
>> '../include/vlc_fourcc.h'],
>> +                        capture : true,
>> +                        command : [fourcc_gen])
>> +
>> +
>> +#
>> +# libvlccore dependencies
>> +#
>> +anl_lib = cc.find_library('anl', required: false)
>> +
>> +libvlccore_deps = [
>> +    m_lib, dl_lib, threads_dep, libintl_lib, socket_libs, iconv_lib,
>> anl_lib
>> +]
>> +
>> +if host_system == 'darwin'
>> +    libvlccore_deps += foundation_dep
>> +    libvlccore_deps += corefoundation_dep
>> +    libvlccore_deps += dependency('CFNetwork', required: true)
>> +endif
>> +
>> +#
>> +# libvlccore library
>> +#
>> +libvlccore_sources_base = [
>> +    'libvlc.c',
>> +    'libvlc.h',
>> +    'libvlc-module.c',
>> +    'missing.c',
>> +    'version.c',
>> +    'config/core.c',
>> +    'config/chain.c',
>> +    'config/file.c',
>> +    'config/help.c',
>> +    'config/intf.c',
>> +    'config/cmdline.c',
>> +    'config/getopt.c',
>> +    'clock/clock.c',
>> +    'clock/input_clock.c',
>> +    'clock/clock_internal.c',
>> +    'extras/libc.c',
>> +    'modules/modules.h',
>> +    'modules/modules.c',
>> +    'modules/bank.c',
>> +    'modules/cache.c',
>> +    'modules/entry.c',
>> +    'modules/textdomain.c',
>> +    'network/stream.c',
>> +    'interface/dialog.c',
>> +    'interface/interface.c',
>> +    'playlist/playlist.c',
>> +    'playlist/item.c',
>> +    'playlist/control.c',
>> +    'playlist/content.c',
>> +    'playlist/notify.c',
>> +    'playlist/player.c',
>> +    'playlist/preparse.c',
>> +    'playlist/randomizer.c',
>> +    'playlist/request.c',
>> +    'playlist/sort.c',
>> +    'playlist/export.c',
>> +    'playlist/shuffle.c',
>> +    'media_source/media_source.c',
>> +    'media_source/media_tree.c',
>> +    'preparser/art.c',
>> +    'preparser/fetcher.c',
>> +    'preparser/preparser.c',
>> +    'input/item.c',
>> +    'input/access.c',
>> +    'input/decoder.c',
>> +    'input/decoder_helpers.c',
>> +    'input/demux.c',
>> +    'input/demux_chained.c',
>> +    'input/es_out.c',
>> +    'input/es_out_timeshift.c',
>> +    'input/input.c',
>> +    'input/meta.c',
>> +    'input/thumbnailer.c',
>> +    'input/resource.c',
>> +    'input/services_discovery.c',
>> +    'input/stats.c',
>> +    'input/stream.c',
>> +    'input/stream_fifo.c',
>> +    'input/stream_extractor.c',
>> +    'input/stream_filter.c',
>> +    'input/stream_memory.c',
>> +    'input/subtitles.c',
>> +    'input/player.c',
>> +    'input/var.c',
>> +    'audio_output/common.c',
>> +    'audio_output/dec.c',
>> +    'audio_output/filters.c',
>> +    'audio_output/output.c',
>> +    'audio_output/volume.c',
>> +    'video_output/control.c',
>> +    'video_output/display.c',
>> +    'video_output/inhibit.c',
>> +    'video_output/interlacing.c',
>> +    'video_output/snapshot.c',
>> +    'video_output/video_output.c',
>> +    'video_output/video_text.c',
>> +    'video_output/video_epg.c',
>> +    'video_output/video_widgets.c',
>> +    'video_output/vout_subpictures.c',
>> +    'video_output/window.c',
>> +    'video_output/opengl.c',
>> +    'video_output/vout_intf.c',
>> +    'video_output/vout_wrapper.c',
>> +    'network/getaddrinfo.c',
>> +    'network/http_auth.c',
>> +    'network/httpd.c',
>> +    'network/io.c',
>> +    'network/tcp.c',
>> +    'network/udp.c',
>> +    'network/rootbind.c',
>> +    'network/tls.c',
>> +    'text/charset.c',
>> +    'text/memstream.c',
>> +    'text/strings.c',
>> +    'text/unicode.c',
>> +    'text/url.c',
>> +    'text/filesystem.c',
>> +    'text/iso_lang.c',
>> +    'misc/actions.c',
>> +    'misc/background_worker.c',
>> +    'misc/md5.c',
>> +    'misc/probe.c',
>> +    'misc/rand.c',
>> +    'misc/mtime.c',
>> +    'misc/block.c',
>> +    'misc/fifo.c',
>> +    'misc/fourcc.c',
>> +    'misc/es_format.c',
>> +    'misc/picture.c',
>> +    'misc/picture_fifo.c',
>> +    'misc/picture_pool.c',
>> +    'misc/interrupt.c',
>> +    'misc/keystore.c',
>> +    'misc/renderer_discovery.c',
>> +    'misc/threads.c',
>> +    'misc/cpu.c',
>> +    'misc/epg.c',
>> +    'misc/exit.c',
>> +    'misc/events.c',
>> +    'misc/image.c',
>> +    'misc/messages.c',
>> +    'misc/mime.c',
>> +    'misc/objects.c',
>> +    'misc/objres.c',
>> +    'misc/variables.c',
>> +    'misc/viewpoint.c',
>> +    'misc/xml.c',
>> +    'misc/addons.c',
>> +    'misc/filter.c',
>> +    'misc/filter_chain.c',
>> +    'misc/httpcookies.c',
>> +    'misc/fingerprinter.c',
>> +    'misc/text_style.c',
>> +    'misc/subpicture.c',
>> +    'misc/medialibrary.c',
>> +    'misc/sort.c',
>> +]
>> +
>> +libvlccore_sout_sources = [
>> +    'stream_output/sap.c',
>> +    'stream_output/sdp.c',
>> +    'stream_output/stream_output.c',
>> +    'stream_output/stream_output.h'
>> +]
>> +
>> +libvlccore_vlm_sources = [
>> +    'input/vlm.c',
>> +    'input/vlm_event.c',
>> +    'input/vlmshell.c'
>> +]
>> +
>> +libvlccore_sources = [
>> +    libvlccore_sources_base,
>> +    libvlccore_sout_sources,
>> +    libvlccore_vlm_sources
>> +]
>> +
>> +if host_system == 'darwin'
>> +    libvlccore_sources += [
>> +        'darwin/dirs.m',
>> +        'darwin/error.c',
>> +        'darwin/netconf.m',
>> +        'darwin/specific.c',
>> +        'darwin/thread.c',
>> +
>> +        'posix/filesystem.c',
>> +        'posix/plugin.c',
>> +        'posix/rand.c',
>> +        'posix/timer.c',
>> +        'posix/sort.c',
>> +    ]
>> +elif host_system == 'windows'
>> +    libvlccore_sources += [
>> +        'win32/dirs.c',
>> +        'win32/error.c',
>> +        'win32/filesystem.c',
>> +        'win32/netconf.c',
>> +        'win32/plugin.c',
>> +        'win32/rand.c',
>> +        'win32/specific.c',
>> +        'win32/thread.c',
>> +        'win32/winsock.c',
>> +
>> +        'win32/timer.c' # TODO: this is non-winstore
>> +    ]
>> +elif host_system == 'linux'
>> +    libvlccore_sources += [
>> +        'posix/dirs.c',
>> +        'posix/error.c',
>> +        'posix/netconf.c',
>> +        'posix/specific.c',
>> +        'posix/thread.c',
>> +        'posix/filesystem.c',
>> +        'posix/plugin.c',
>> +        'posix/rand.c',
>> +        'posix/timer.c',
>> +        'posix/sort.c',
>> +        'linux/cpu.c',
>> +        'linux/dirs.c',
>> +        'linux/filesystem.c',
>> +        'linux/thread.c',
>> +    ]
>> +
>> +    if anl_lib.found()
>> +        libvlccore_sources += 'linux/getaddrinfo.c'
>> +    else
>> +        libvlccore_sources += 'posix/getaddrinfo.c'
>> +    endif
>> +endif
>> +
>> +
>> +libvlccore = library(
>> +    'vlccore',
>> +    libvlccore_sources, vlc_about, fourcc, rev_target,
>> +    include_directories: vlc_include_dirs,
>> +    version: '9.0.0',
>> +    c_args: ['-DMODULE_STRING="core"', '-DHAVE_DYNAMIC_PLUGINS' ],
>> +    link_with: [vlc_libcompat],
>> +    dependencies: libvlccore_deps,
>> +    install: true
>> +)
>> diff --git a/src/revision.c.in b/src/revision.c.in
>> new file mode 100644
>> index 0000000000..afc1e6724e
>> --- /dev/null
>> +++ b/src/revision.c.in
>> @@ -0,0 +1,2 @@
>> +const char psz_vlc_changeset[] = "@VCS_TAG@";
>> +
>> -- 
>> 2.19.1
>>
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list