diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 49eabf98c..000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,61 +0,0 @@
-# This file is part of Pinos.
-#
-# Pinos is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# Pinos is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with Pinos; if not, see .
-
-ACLOCAL_AMFLAGS = -I m4
-
-EXTRA_DIST = \
- bootstrap.sh \
- git-version-gen \
- LICENSE \
- GPL \
- LGPL \
- PROTOCOL \
- README
-
-SUBDIRS = pinos man po
-
-DIST_SUBDIRS = pinos man po
-
-MAINTAINERCLEANFILES =
-noinst_DATA =
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = pkgconfig/libpinos-$(PINOS_MAJORMINOR).pc
-
-DISTCLEANFILES = pkgconfig/libpinos-$(PINOS_MAJORMINOR).pc
-
-
-eolspace:
- find \( -name '*.c' -o -name '*.h' -o -name 'Makefile.am' \) -exec perl -i -pe 's/\s+\n$$/\1\n/;' \{\} \;
-
-untabify:
- find \( -name '*.c' -o -name '*.h' \) -exec perl -i -pe 's/\t/ /g;' \{\} \;
-
-fedora-snapshot: dist
- cp $(distdir).tar.gz $$HOME/git.fedora/pinos/$(distdir).tar.gz
-
-dist-hook:
- echo $(VERSION) > $(distdir)/.tarball-version
- echo $(VERSION) > $(distdir)/.version
-
-.PHONY: distcleancheck
-
-# see git-version-gen
-BUILT_SOURCES = $(top_srcdir)/.version
-$(top_srcdir)/.version:
- echo $(VERSION) > $@-t && mv $@-t $@
-
-DISTCLEANFILES += \
- po/.intltool-merge-cache
diff --git a/bootstrap.sh b/bootstrap.sh
deleted file mode 100755
index d9c64907b..000000000
--- a/bootstrap.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env bash
-
-# This file is part of Pinos
-#
-# Pinos is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# Pinos is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with Pinos; if not, see .
-
-case $(uname) in
- *Darwin*)
- LIBTOOLIZE="glibtoolize"
- ;;
-esac
-test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
-
-if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
- cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
- chmod +x .git/hooks/pre-commit && \
- echo "Activated pre-commit hook."
-fi
-
-if [ -f .tarball-version ]; then
- echo "Marking tarball version as modified."
- echo -n `cat .tarball-version | sed 's/-rebootstrapped$//'`-rebootstrapped >.tarball-version
-fi
-
-# We check for this here, because if pkg-config is not found in the
-# system, it's likely that the pkg.m4 macro file is also not present,
-# which will make PKG_PROG_PKG_CONFIG be undefined and the generated
-# configure file faulty.
-if ! pkg-config --version &>/dev/null; then
- echo "pkg-config is required to bootstrap this program" &>/dev/null
- DIE=1
-fi
-
-# Other necessary programs
-intltoolize --version >/dev/null || DIE=1
-test "$DIE" = 1 && exit 1
-
-autopoint --force
-AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
-
-if test "x$NOCONFIGURE" = "x"; then
- CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
- make clean
-fi
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 000000000..55930e1e1
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,447 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+#mesondefine AC_APPLE_UNIVERSAL_BUILD
+
+/* poll doesn't work on devices */
+#mesondefine BROKEN_POLL
+
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+#mesondefine ENABLE_NLS
+
+/* Subunit protocol result output */
+#mesondefine ENABLE_SUBUNIT
+
+/* gettext package name */
+#mesondefine GETTEXT_PACKAGE
+
+/* The GIO library directory. */
+#mesondefine GIO_LIBDIR
+
+/* The GIO modules directory. */
+#mesondefine GIO_MODULE_DIR
+
+/* GStreamer API Version */
+#mesondefine GST_API_VERSION
+
+/* data dir */
+#mesondefine GST_DATADIR
+
+/* Define if option parsing is disabled */
+#mesondefine GST_DISABLE_OPTION_PARSING
+
+/* Define if pipeline parsing code is disabled */
+#mesondefine GST_DISABLE_PARSE
+
+/* Extra platform specific plugin suffix */
+#mesondefine GST_EXTRA_MODULE_SUFFIX
+
+/* macro to use to show function name */
+#mesondefine GST_FUNCTION
+
+/* Defined if gcov is enabled to force a rebuild due to config.h changing */
+#mesondefine GST_GCOV_ENABLED
+
+/* Defined when registry scanning through fork is unsafe */
+#mesondefine GST_HAVE_UNSAFE_FORK
+
+/* Default errorlevel to use */
+#mesondefine GST_LEVEL_DEFAULT
+
+/* GStreamer license */
+#mesondefine GST_LICENSE
+
+/* package name in plugins */
+#mesondefine GST_PACKAGE_NAME
+
+/* package origin */
+#mesondefine GST_PACKAGE_ORIGIN
+
+/* GStreamer package release date/time for plugins as YYYY-MM-DD */
+#mesondefine GST_PACKAGE_RELEASE_DATETIME
+
+/* Define if static plugins should be built */
+#mesondefine GST_PLUGIN_BUILD_STATIC
+
+/* location of the installed gst-plugin-scanner */
+#mesondefine GST_PLUGIN_SCANNER_INSTALLED
+
+#mesondefine GST_PTP_HELPER_INSTALLED
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+ CoreFoundation framework. */
+#mesondefine HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+#mesondefine HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#mesondefine HAVE_CLOCK_GETTIME
+
+/* Define if the target CPU is an Alpha */
+#mesondefine HAVE_CPU_ALPHA
+
+/* Define if the target CPU is an ARM */
+#mesondefine HAVE_CPU_ARM
+
+/* Define if the target CPU is a CRIS */
+#mesondefine HAVE_CPU_CRIS
+
+/* Define if the target CPU is a CRISv32 */
+#mesondefine HAVE_CPU_CRISV32
+
+/* Define if the target CPU is a HPPA */
+#mesondefine HAVE_CPU_HPPA
+
+/* Define if the target CPU is an x86 */
+#mesondefine HAVE_CPU_I386
+
+/* Define if the target CPU is a IA64 */
+#mesondefine HAVE_CPU_IA64
+
+/* Define if the target CPU is a M68K */
+#mesondefine HAVE_CPU_M68K
+
+/* Define if the target CPU is a MIPS */
+#mesondefine HAVE_CPU_MIPS
+
+/* Define if the target CPU is a PowerPC */
+#mesondefine HAVE_CPU_PPC
+
+/* Define if the target CPU is a 64 bit PowerPC */
+#mesondefine HAVE_CPU_PPC64
+
+/* Define if the target CPU is a S390 */
+#mesondefine HAVE_CPU_S390
+
+/* Define if the target CPU is a SPARC */
+#mesondefine HAVE_CPU_SPARC
+
+/* Define if the target CPU is a x86_64 */
+#mesondefine HAVE_CPU_X86_64
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+ */
+#mesondefine HAVE_DCGETTEXT
+
+/* Defined if we have dladdr () */
+#mesondefine HAVE_DLADDR
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_DLFCN_H
+
+/* Define to 1 if you have the `fgetpos' function. */
+#mesondefine HAVE_FGETPOS
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#mesondefine HAVE_FSEEKO
+
+/* Define to 1 if you have the `fsetpos' function. */
+#mesondefine HAVE_FSETPOS
+
+/* Define to 1 if you have the `ftello' function. */
+#mesondefine HAVE_FTELLO
+
+/* defined if the compiler implements __func__ */
+#mesondefine HAVE_FUNC
+
+/* defined if the compiler implements __FUNCTION__ */
+#mesondefine HAVE_FUNCTION
+
+/* Define to 1 if you have the `getpagesize' function. */
+#mesondefine HAVE_GETPAGESIZE
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#mesondefine HAVE_GETTEXT
+
+/* Have GMP library */
+#mesondefine HAVE_GMP
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#mesondefine HAVE_GMTIME_R
+
+/* Have GSL library */
+#mesondefine HAVE_GSL
+
+/* Define if you have the iconv() function and it works. */
+#mesondefine HAVE_ICONV
+
+/* Define to 1 if the system has the type `intmax_t'. */
+#mesondefine HAVE_INTMAX_T
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_INTTYPES_H
+
+/* Define if exists, doesn't clash with , and
+ declares uintmax_t. */
+#mesondefine HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define to 1 if you have the `localtime_r' function. */
+#mesondefine HAVE_LOCALTIME_R
+
+/* Define to 1 if the system has the type long long */
+#mesondefine HAVE_LONG_LONG
+
+/* Define to 1 if the system has the type `long long int'. */
+#mesondefine HAVE_LONG_LONG_INT
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_MEMORY_H
+
+/* Define to 1 if you have a working `mmap' system call. */
+#mesondefine HAVE_MMAP
+
+/* Have a monotonic clock */
+#mesondefine HAVE_MONOTONIC_CLOCK
+
+/* Defined if compiling for OSX */
+#mesondefine HAVE_OSX
+
+/* Define to 1 if you have the `poll' function. */
+#mesondefine HAVE_POLL
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_POLL_H
+
+/* Define to 1 if you have the `posix_memalign' function. */
+#mesondefine HAVE_POSIX_MEMALIGN
+
+/* Have posix timers */
+#mesondefine HAVE_POSIX_TIMERS
+
+/* Define to 1 if you have the `ppoll' function. */
+#mesondefine HAVE_PPOLL
+
+/* defined if the compiler implements __PRETTY_FUNCTION__ */
+#mesondefine HAVE_PRETTY_FUNCTION
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_PROCESS_H
+
+/* Define to 1 if you have the `pselect' function. */
+#mesondefine HAVE_PSELECT
+
+/* Define if you have POSIX threads libraries and header files. */
+#mesondefine HAVE_PTHREAD
+
+/* Have PTHREAD_PRIO_INHERIT. */
+#mesondefine HAVE_PTHREAD_PRIO_INHERIT
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#mesondefine HAVE_PTRDIFF_T
+
+/* Define if RDTSC is available */
+#mesondefine HAVE_RDTSC
+
+/* Define to 1 if you have the `sigaction' function. */
+#mesondefine HAVE_SIGACTION
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_STDINT_H
+
+/* Define if exists, doesn't clash with , and declares
+ uintmax_t. */
+#mesondefine HAVE_STDINT_H_WITH_UINTMAX
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_STDIO_EXT_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_STDLIB_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_STRING_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_POLL_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_PRCTL_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_TIMES_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_SYS_WAIT_H
+
+/* Have tm_gmtoff field in struct tm */
+#mesondefine HAVE_TM_GMTOFF
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_UCONTEXT_H
+
+/* Have __uint128_t type */
+#mesondefine HAVE_UINT128_T
+
+/* defined if unaligned memory access works correctly */
+#mesondefine HAVE_UNALIGNED_ACCESS
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_UNISTD_H
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#mesondefine HAVE_UNSIGNED_LONG_LONG_INT
+
+/* Define if valgrind should be used */
+#mesondefine HAVE_VALGRIND
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_VALGRIND_VALGRIND_H
+
+/* Defined if compiling for Windows */
+#mesondefine HAVE_WIN32
+
+/* Define to 1 if you have the header file. */
+#mesondefine HAVE_WINSOCK2_H
+
+/* the host CPU */
+#mesondefine HOST_CPU
+
+/* library dir */
+#mesondefine LIBDIR
+
+/* gettext locale dir */
+#mesondefine LOCALEDIR
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#mesondefine LT_OBJDIR
+
+/* Memory alignment to use */
+#mesondefine MEMORY_ALIGNMENT
+
+/* Memory alignment by malloc default */
+#mesondefine MEMORY_ALIGNMENT_MALLOC
+
+/* Memory alignment by pagesize */
+#mesondefine MEMORY_ALIGNMENT_PAGESIZE
+
+/* Name of package */
+#mesondefine PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#mesondefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#mesondefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#mesondefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#mesondefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#mesondefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#mesondefine PACKAGE_VERSION
+
+/* directory where plugins are located */
+#mesondefine PLUGINDIR
+
+/* directory where plugins are located */
+#mesondefine MODULEDIR
+
+/* directory where config files are located */
+#mesondefine PINOS_CONFIG_DIR
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+#mesondefine PTHREAD_CREATE_JOINABLE
+
+/* The size of `char', as computed by sizeof. */
+#mesondefine SIZEOF_CHAR
+
+/* The size of `int', as computed by sizeof. */
+#mesondefine SIZEOF_INT
+
+/* The size of `long', as computed by sizeof. */
+#mesondefine SIZEOF_LONG
+
+/* The size of `short', as computed by sizeof. */
+#mesondefine SIZEOF_SHORT
+
+/* The size of `void*', as computed by sizeof. */
+#mesondefine SIZEOF_VOIDP
+
+/* Define to 1 if you have the ANSI C header files. */
+#mesondefine STDC_HEADERS
+
+/* the target CPU */
+#mesondefine TARGET_CPU
+
+/* Define if we should poison deallocated memory */
+#mesondefine USE_POISONING
+
+/* Version number of package */
+#mesondefine VERSION
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#mesondefine _FILE_OFFSET_BITS
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#mesondefine _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#mesondefine _LARGE_FILES
+
+/* We need at least WinXP SP2 for __stat64 */
+#mesondefine __MSVCRT_VERSION__
+
+/* Define to the widest signed integer type if and do
+ not define. */
+#mesondefine intmax_t
+
+/* Define to `unsigned int' if does not define. */
+#mesondefine size_t
+
+#mesondefine HAVE_GETPID
+#mesondefine HAVE__GETPID
+#mesondefine HAVE_DECL_STRDUP
+#mesondefine HAVE__STRDUP
+#mesondefine HAVE_MKSTEMP
+#mesondefine HAVE_FORK
+#mesondefine HAVE_ALARM
+#mesondefine HAVE_DECL_LOCALTIME_R
+#mesondefine HAVE_DECL_STRSIGNAL
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 1abd17da6..000000000
--- a/configure.ac
+++ /dev/null
@@ -1,313 +0,0 @@
-AC_PREREQ(2.63)
-
-AC_INIT(pinos, 0.1)
-AC_CONFIG_SRCDIR([pinos/daemon/main.c])
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability subdir-objects silent-rules color-tests dist-xz tar-ustar])
-
-AS_IF([! test -n "$VERSION"], [
- AC_MSG_ERROR([git-version-gen failed])
-])
-
-m4_define(pinos_major, `echo $VERSION | cut -d. -f1 | cut -d- -f1`)
-m4_define(pinos_minor, `echo $VERSION | cut -d. -f2 | cut -d- -f1`)
-
-AC_SUBST(PINOS_MAJOR, pinos_major)
-AC_SUBST(PINOS_MINOR, pinos_minor)
-AC_SUBST(PINOS_MAJORMINOR, pinos_major.pinos_minor)
-
-AC_SUBST(PINOS_API_VERSION, 0)
-AC_SUBST(PINOS_PROTOCOL_VERSION, 0)
-
-# The stable ABI for client applications, for the version info x:y:z
-# always will hold y=z
-AC_SUBST(LIBPINOS_VERSION_INFO, [0:0:0])
-
-dnl sets host_* variables
-AC_CANONICAL_HOST
-
-AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
-
-AC_CHECK_PROG([STOW], [stow], [yes], [no])
-
-AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [
- AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
- ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
-])
-
-AM_SILENT_RULES([yes])
-
-#### Checks for programs. ####
-
-# mkdir -p
-
-AC_PROG_MKDIR_P
-
-# ln -s
-
-AC_PROG_LN_S
-
-# CC
-
-AC_PROG_CC
-AC_PROG_CC_C99
-AM_PROG_CC_C_O
-# Only required if you want the WebRTC canceller -- no runtime dep on
-# libstdc++ otherwise
-AC_PROG_CXX
-AC_PROG_GCC_TRADITIONAL
-AC_USE_SYSTEM_EXTENSIONS
-
-# M4
-
-AC_CHECK_PROGS([M4], gm4 m4, no)
-AS_IF([test "x$M4" = "xno"], AC_MSG_ERROR([m4 missing]))
-
-# pkg-config
-
-PKG_PROG_PKG_CONFIG
-
-# gettext
-
-if test "x$enable_nls" != "xno"; then
-IT_PROG_INTLTOOL([0.35.0])
-
-AM_GNU_GETTEXT_VERSION([0.18.1])
-AM_GNU_GETTEXT([external])
-
-GETTEXT_PACKAGE=pinos
-AC_SUBST([GETTEXT_PACKAGE])
-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
-
-pinoslocaledir='${prefix}/${DATADIRNAME}/locale'
-AX_DEFINE_DIR(PINOS_LOCALEDIR, pinoslocaledir, [Gettext locale dir])
-else
-# workaround till an intltool m4 bug is fixed upstream
-# (https://bugs.launchpad.net/intltool/+bug/904647)
-USE_NLS=no
-AC_SUBST(USE_NLS)
-fi
-
-AC_ARG_WITH([module-dir],
- AS_HELP_STRING([--with-module-dir=PATH],
- [Directory where modules are located (default is ${libdir}/pinos/modules]),
- [moduledir=$withval],
- [moduledir="${libdir}/pinos-${PINOS_MAJORMINOR}/modules"])
-AC_SUBST(moduledir)
-AX_DEFINE_DIR(MODULEDIR, moduledir, [Directory where modules are located])
-
-#### Compiler flags ####
-
-AX_APPEND_COMPILE_FLAGS(
- [-Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto],
- [], [-pedantic -Werror])
-
-AS_CASE([" $CFLAGS "], [*" -O0 "*], [], [
- # Don't append the flag if it already exists.
- # Only enable fastpath asserts when doing a debug build, e.g. from bootstrap.sh.
- AX_APPEND_FLAG([-DFASTPATH], [CPPFLAGS])
-
- # Cannot use AX_APPEND_FLAG here, as it assumes no space inside the added flags.
- # Cannot append flags with AX_APPEND_FLAG one by one, as this would destroy all fortifications
- # if CPPFLAGS already contain -D_FORTIFY_SOURCE=2.
-
- # Warnings to be aware of that appear with -D_FORTIFY_SOURCE=2 but without -U_FORTIFY_SOURCE:
- # On Fedora 20 with -O0: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
- # On Gentoo with -O2: "_FORTIFY_SOURCE" redefined [enabled by default]
- AS_VAR_APPEND([CPPFLAGS],[" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"])
-])
-
-#### Linker flags ####
-
-# Check whether the linker supports the -version-script option.
-# The Make variable $(srcdir) needs to be in the LDFLAGS in that form,
-# so that it is expanded the right way in every subdir.
-AX_CHECK_LINK_FLAG(["-Wl,-version-script=${srcdir}/pinos/map-file"],
- [VERSIONING_LDFLAGS='-Wl,-version-script=$(abs_top_srcdir)/pinos/map-file'])
-AC_SUBST([VERSIONING_LDFLAGS])
-
-# Use immediate (now) bindings; avoids the funky re-call in itself.
-# The -z now syntax is lifted from Sun's linker and works with GNU's too, other linkers might be added later.
-AX_APPEND_LINK_FLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS])
-AC_SUBST([IMMEDIATE_LDFLAGS])
-
-# On ELF systems we don't want the libraries to be unloaded since we don't clean them up properly,
-# so we request the nodelete flag to be enabled.
-# On other systems, we don't really know how to do that, but it's welcome if somebody can tell.
-AX_APPEND_LINK_FLAGS([-Wl,-z,nodelete], [NODELETE_LDFLAGS])
-AC_SUBST([NODELETE_LDFLAGS])
-
-# Check for the proper way to build libraries that have no undefined symbols
-case $host in
- # FreeBSD (et al.) does not complete linking for shared objects when pthreads
- # are requested, as different implementations are present.
- *-freebsd* | *-openbsd*) ;;
- *)
- for possible_flag in "-Wl,--no-undefined" "-Wl,-z,defs"; do
- AX_CHECK_LINK_FLAG([$possible_flag], [NOUNDEFINED_LDFLAGS="$possible_flag"; break])
- done
- ;;
-esac
-AC_SUBST([NOUNDEFINED_LDFLAGS])
-
-#### libtool stuff ####
-
-LT_PREREQ(2.4)
-LT_INIT([dlopen win32-dll disable-static])
-
-dnl As an extra safety device, check for lt_dladvise_init() which is
-dnl only implemented in libtool 2.x, and refine as we go if we have
-dnl refined requirements.
-dnl
-dnl Check the header files first since the system may have a
-dnl libltdl.so for runtime, but no headers, and we want to bail out as
-dnl soon as possible.
-dnl
-dnl We don't need any special variable for this though, since the user
-dnl can give the proper place to find libltdl through the standard
-dnl variables like LDFLAGS and CPPFLAGS.
-
-AC_CHECK_HEADER([ltdl.h],
- [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
- [LIBLTDL=])
-
-AS_IF([test "x$LIBLTDL" = "x"],
- [AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.4 or later installed.])])
-AC_SUBST([LIBLTDL])
-
-
-#### Pinos runtime environment ####
-
-AC_SUBST(pinosconfdir, ["${sysconfdir}/pinos"])
-AX_DEFINE_DIR(PINOS_CONFIG_DIR, pinosconfdir, [Directory for configuration files])
-
-###################################
-# External libraries #
-###################################
-
-#### [lib]iconv ####
-
-AM_ICONV
-
-#### Valgrind (optional) ####
-
-AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h])
-
-#### GLib ####
-
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
- AC_MSG_ERROR(GLib >= 2.32 is required))
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-PKG_CHECK_MODULES(GIOUNIX, gio-unix-2.0 >= 2.32, dummy=yes,
- AC_MSG_ERROR(GIO-Unix >= 2.32 is required))
-GLIB_CFLAGS="$GLIB_CFLAGS $GIOUNIX_CFLAGS"
-GLIB_LIBS="$GLIB_LIBS $GIOUNIX_LIBS"
-
-PKG_CHECK_MODULES(GMODULE, gmodule-no-export-2.0 >= 2.32, dummy=yes,
- AC_MSG_ERROR(GModule >= 2.32 is required))
-GLIB_CFLAGS="$GLIB_CFLAGS $GMODULE_CFLAGS"
-GLIB_LIBS="$GLIB_LIBS $GMODULE_LIBS"
-
-AC_MSG_CHECKING([for glib-mkenums script])
-GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
-AS_IF([test "x$GLIB_MKENUMS" = "x"],
- [AC_MSG_ERROR([glib-mkenums not listed in glib-2.0 pkg-config file])],
- [AC_SUBST([GLIB_MKENUMS])
- AC_MSG_RESULT([$GLIB_MKENUMS])])
-
-AC_SUBST([GDBUS_CODEGEN], [`$PKG_CONFIG --variable gdbus_codegen gio-2.0`])
-
-#### GStreamer ####
-
-PKG_CHECK_MODULES(GST, gstreamer-1.0 >= 1.5.0, dummy=yes,
- AC_MSG_ERROR(GStreamer >= 1.5.0 is required))
-AC_SUBST(GST_CFLAGS)
-AC_SUBST(GST_LIBS)
-
-PKG_CHECK_MODULES(GSTBASE, gstreamer-base-1.0 >= 1.5.0, dummy=yes,
- AC_MSG_ERROR(GStreamer Base>= 1.5.0 is required))
-GST_CFLAGS="$GST_CFLAGS $GSTBASE_CFLAGS"
-GST_LIBS="$GST_LIBS $GSTBASE_LIBS"
-
-PKG_CHECK_MODULES(GSTPBASE, gstreamer-plugins-base-1.0 >= 1.5.0, dummy=yes,
- AC_MSG_ERROR(GStreamer Plugins Base>= 1.5.0 is required))
-GST_CFLAGS="$GST_CFLAGS $GSTPBASE_CFLAGS"
-GST_LIBS="$GST_LIBS $GSTPBASE_LIBS"
-
-PKG_CHECK_MODULES(GSTNET, gstreamer-net-1.0 >= 1.5.0, dummy=yes,
- AC_MSG_ERROR(GStreamer Net>= 1.5.0 is required))
-GST_CFLAGS="$GST_CFLAGS $GSTNET_CFLAGS"
-GST_LIBS="$GST_LIBS $GSTNET_LIBS"
-
-PKG_CHECK_MODULES(GSTALLOC, gstreamer-allocators-1.0 >= 1.5.0, dummy=yes,
- AC_MSG_ERROR(GStreamer Allocators>= 1.5.0 is required))
-GST_CFLAGS="$GST_CFLAGS $GSTALLOC_CFLAGS"
-GST_LIBS="$GST_LIBS $GSTALLOC_LIBS"
-
-#### ALSA ####
-PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, dummy=yes,
- AC_MSG_ERROR(ALSA >= 0.9.1 is required))
-
-AC_SUBST(ALSA_CFLAGS)
-AC_SUBST(ALSA_LIBS)
-
-###################################
-# Modules #
-###################################
-
-#### module-gst (Gstreamer module) ####
-AC_ARG_ENABLE([module-gst],
- AS_HELP_STRING([--disable-module-gst],[Disable building of GStreamer module]))
-
-AM_CONDITIONAL([BUILD_MODULE_GST], [test "x$enable_module_gst" != "xno"])
-AS_IF([test "x$enable_module_gst" != "xno"], ENABLE_MODULE_GST=yes, ENABLE_MODULE_GST=no)
-
-#### module-spa (SPA module) ####
-AC_ARG_ENABLE([module-spa],
- AS_HELP_STRING([--disable-module-spa],[Disable building of SPA module]))
-
-AM_CONDITIONAL([BUILD_MODULE_SPA], [test "x$enable_module_spa" != "xno"])
-AS_IF([test "x$enable_module_spa" != "xno"], ENABLE_MODULE_SPA=yes, ENABLE_MODULE_SPA=no)
-
-
-#### Build and Install man pages ####
-
-AC_ARG_ENABLE([manpages],
- AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]))
-
-AM_CONDITIONAL([BUILD_MANPAGES], [test "x$enable_manpages" != "xno"])
-
-dnl *** output files ***
-
-dnl keep this alphabetic per directory, please
-AC_CONFIG_FILES([
-Makefile
-pinos/Makefile
-pinos/daemon/pinos.conf
-man/Makefile
-man/pinos.1.xml
-man/pinos-monitor.1.xml
-pkgconfig/libpinos-$PINOS_MAJORMINOR.pc:pkgconfig/libpinos.pc.in
-po/Makefile.in
-])
-AC_OUTPUT
-
-echo "
-
-Configuration
- Version : ${VERSION}
- Source code location : ${srcdir}
- Prefix : ${prefix}
- Moduledir : ${moduledir}
- Compiler : ${CC}
-
-Modules
- module-gst : ${ENABLE_MODULE_GST}
- module-spa : ${ENABLE_MODULE_SPA}
-
-pinos configured. Type 'make' to build.
-"
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index bb4d571f2..000000000
--- a/m4/.gitignore
+++ /dev/null
@@ -1,36 +0,0 @@
-codeset.m4
-fcntl-o.m4
-gettext.m4
-glibc*.m4
-iconv.m4
-intdiv0.m4
-intl.m4
-intldir.m4
-intlmacosx.m4
-intltool.m4
-intmax.m4
-inttypes-pri.m4
-inttypes_h.m4
-lcmessage.m4
-lib-ld.m4
-lib-link.m4
-lib-prefix.m4
-libtool.m4
-lock.m4
-longlong.m4
-ltoptions.m4
-ltsugar.m4
-ltversion.m4
-lt~obsolete.m4
-nls.m4
-po.m4
-printf-posix.m4
-progtest.m4
-size_max.m4
-stdint_h.m4
-threadlib.m4
-uintmax_t.m4
-visibility.m4
-wchar_t.m4
-wint_t.m4
-xsize.m4
diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4
deleted file mode 100644
index dc7b86600..000000000
--- a/m4/ax_append_compile_flags.m4
+++ /dev/null
@@ -1,65 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
-#
-# DESCRIPTION
-#
-# For every FLAG1, FLAG2 it is checked whether the compiler works with the
-# flag. If it does, the flag is added FLAGS-VARIABLE
-#
-# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
-# CFLAGS) is used. During the check the flag is always added to the
-# current language's flags.
-#
-# If EXTRA-FLAGS is defined, it is added to the current language's default
-# flags (e.g. CFLAGS) when the check is done. The check is thus made with
-# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
-# force the compiler to issue an error when a bad flag is given.
-#
-# NOTE: This macro depends on the AX_APPEND_FLAG and
-# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
-# AX_APPEND_LINK_FLAGS.
-#
-# LICENSE
-#
-# Copyright (c) 2011 Maarten Bosmans
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see .
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 4
-
-AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
-[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
-AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-for flag in $1; do
- AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
-done
-])dnl AX_APPEND_COMPILE_FLAGS
diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
deleted file mode 100644
index aeab89979..000000000
--- a/m4/ax_append_flag.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
-#
-# DESCRIPTION
-#
-# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
-# added in between.
-#
-# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
-# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
-# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
-# FLAG.
-#
-# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Guido U. Draheim
-# Copyright (c) 2011 Maarten Bosmans
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see .
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 5
-
-AC_DEFUN([AX_APPEND_FLAG],
-[dnl
-AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
-AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
-AS_VAR_SET_IF(FLAGS,[
- AS_CASE([" AS_VAR_GET(FLAGS) "],
- [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
- [
- AS_VAR_APPEND(FLAGS," $1")
- AC_RUN_LOG([: FLAGS="$FLAGS"])
- ])
- ],
- [
- AS_VAR_SET(FLAGS,[$1])
- AC_RUN_LOG([: FLAGS="$FLAGS"])
- ])
-AS_VAR_POPDEF([FLAGS])dnl
-])dnl AX_APPEND_FLAG
diff --git a/m4/ax_append_link_flags.m4 b/m4/ax_append_link_flags.m4
deleted file mode 100644
index c73ddafc2..000000000
--- a/m4/ax_append_link_flags.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
-#
-# DESCRIPTION
-#
-# For every FLAG1, FLAG2 it is checked whether the linker works with the
-# flag. If it does, the flag is added FLAGS-VARIABLE
-#
-# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is
-# used. During the check the flag is always added to the linker's flags.
-#
-# If EXTRA-FLAGS is defined, it is added to the linker's default flags
-# when the check is done. The check is thus made with the flags: "LDFLAGS
-# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
-# issue an error when a bad flag is given.
-#
-# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
-# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
-#
-# LICENSE
-#
-# Copyright (c) 2011 Maarten Bosmans
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see .
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 4
-
-AC_DEFUN([AX_APPEND_LINK_FLAGS],
-[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
-AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-for flag in $1; do
- AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
-done
-])dnl AX_APPEND_LINK_FLAGS
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
deleted file mode 100644
index ca3639715..000000000
--- a/m4/ax_check_compile_flag.m4
+++ /dev/null
@@ -1,74 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-# Check whether the given FLAG works with the current language's compiler
-# or gives an error. (Warnings, however, are ignored)
-#
-# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-# success/failure.
-#
-# If EXTRA-FLAGS is defined, it is added to the current language's default
-# flags (e.g. CFLAGS) when the check is done. The check is thus made with
-# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
-# force the compiler to issue an error when a bad flag is given.
-#
-# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
-#
-# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Guido U. Draheim
-# Copyright (c) 2011 Maarten Bosmans
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see .
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 4
-
-AC_DEFUN([AX_CHECK_COMPILE_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
-AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
- ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
- _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
- AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
- [AS_VAR_SET(CACHEVAR,[yes])],
- [AS_VAR_SET(CACHEVAR,[no])])
- _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
- [m4_default([$2], :)],
- [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4
deleted file mode 100644
index eb01a6ce1..000000000
--- a/m4/ax_check_link_flag.m4
+++ /dev/null
@@ -1,74 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-# Check whether the given FLAG works with the linker or gives an error.
-# (Warnings, however, are ignored)
-#
-# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-# success/failure.
-#
-# If EXTRA-FLAGS is defined, it is added to the linker's default flags
-# when the check is done. The check is thus made with the flags: "LDFLAGS
-# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
-# issue an error when a bad flag is given.
-#
-# INPUT gives an alternative input source to AC_LINK_IFELSE.
-#
-# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Guido U. Draheim
-# Copyright (c) 2011 Maarten Bosmans
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see .
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 4
-
-AC_DEFUN([AX_CHECK_LINK_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
-AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
- ax_check_save_flags=$LDFLAGS
- LDFLAGS="$LDFLAGS $4 $1"
- AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
- [AS_VAR_SET(CACHEVAR,[yes])],
- [AS_VAR_SET(CACHEVAR,[no])])
- LDFLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
- [m4_default([$2], :)],
- [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_LINK_FLAGS
diff --git a/m4/ax_define_dir.m4 b/m4/ax_define_dir.m4
deleted file mode 100644
index b74d155fd..000000000
--- a/m4/ax_define_dir.m4
+++ /dev/null
@@ -1,49 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
-#
-# DESCRIPTION
-#
-# This macro sets VARNAME to the expansion of the DIR variable, taking
-# care of fixing up ${prefix} and such.
-#
-# VARNAME is then offered as both an output variable and a C preprocessor
-# symbol.
-#
-# Example:
-#
-# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
-#
-# LICENSE
-#
-# Copyright (c) 2008 Stepan Kasal
-# Copyright (c) 2008 Andreas Schwab
-# Copyright (c) 2008 Guido U. Draheim
-# Copyright (c) 2008 Alexandre Oliva
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 6
-
-AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR])
-AC_DEFUN([AX_DEFINE_DIR], [
- prefix_NONE=
- exec_prefix_NONE=
- test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
- test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
-dnl refers to ${prefix}. Thus we have to use `eval' twice.
- eval ax_define_dir="\"[$]$2\""
- eval ax_define_dir="\"$ax_define_dir\""
- AC_SUBST($1, "$ax_define_dir")
- AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3])
- test "$prefix_NONE" && prefix=NONE
- test "$exec_prefix_NONE" && exec_prefix=NONE
-])
diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4
deleted file mode 100644
index cae11112d..000000000
--- a/m4/ax_require_defined.m4
+++ /dev/null
@@ -1,37 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_REQUIRE_DEFINED(MACRO)
-#
-# DESCRIPTION
-#
-# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
-# been defined and thus are available for use. This avoids random issues
-# where a macro isn't expanded. Instead the configure script emits a
-# non-fatal:
-#
-# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
-#
-# It's like AC_REQUIRE except it doesn't expand the required macro.
-#
-# Here's an example:
-#
-# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
-#
-# LICENSE
-#
-# Copyright (c) 2014 Mike Frysinger
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 1
-
-AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
- m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
-])dnl AX_REQUIRE_DEFINED
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000..6fdb3c710
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,144 @@
+project('pinos', 'c',
+ version : '0.0.1.1',
+ meson_version : '>= 0.33.0',
+ default_options : [ 'warning_level=1',
+ 'c_std=gnu99',
+ 'buildtype=debugoptimized' ])
+
+
+pinos_version = meson.project_version()
+version_arr = pinos_version.split('.')
+pinos_version_major = version_arr[0]
+pinos_version_minor = version_arr[1]
+pinos_version_micro = version_arr[2]
+if version_arr.length() == 4
+ pinos_version_nano = version_arr[3]
+else
+ pinos_version_nano = 0
+endif
+
+apiversion = '1.0'
+soversion = 0
+libversion = '@0@.@1@.0'.format(soversion, pinos_version_minor.to_int() * 100 + pinos_version_micro.to_int())
+
+prefix = get_option('prefix')
+
+gnome = import('gnome')
+
+cc = meson.get_compiler('c')
+
+
+cdata = configuration_data()
+cdata.set('PINOS_VERSION_MAJOR', pinos_version_major)
+cdata.set('PINOS_VERSION_MINOR', pinos_version_minor)
+cdata.set('PINOS_VERSION_MICRO', pinos_version_micro)
+cdata.set('PINOS_VERSION_NANO', pinos_version_nano)
+cdata.set('PINOS_API_VERSION', '"@0@"'.format(apiversion))
+cdata.set('PINOS_DATADIR', '"@0@/@1@"'.format(prefix, get_option('datadir')))
+cdata.set('LOCALEDIR', '"@0@/@1@"'.format(prefix, get_option('localedir')))
+cdata.set('LIBDIR', '"@0@/@1@"'.format(prefix, get_option('libdir')))
+cdata.set('PINOS_API_VERSION', '"0.1"')
+cdata.set('GETTEXT_PACKAGE', '"pinos"')
+cdata.set('PINOS_LICENSE', '"LGPL"')
+cdata.set('PINOS_PACKAGE_ORIGIN', '"Unknown package origin"')
+cdata.set('PINOS_PACKAGE_NAME', '"Pinos source release"')
+cdata.set('PACKAGE', '"pinos"')
+cdata.set('PACKAGE_NAME', '"Pinos"')
+cdata.set('PACKAGE_STRING', '"Pinos @0@"'.format(pinos_version))
+cdata.set('PACKAGE_TARNAME', '"pinos"')
+cdata.set('PACKAGE_URL', '""')
+cdata.set('PACKAGE_VERSION', '"@0@"'.format(pinos_version))
+cdata.set('PLUGINDIR', '"@0@/@1@/pinos"'.format(get_option('prefix'),get_option('libdir')))
+cdata.set('MODULEDIR', '"@0@/@1@/pinos"'.format(get_option('prefix'),get_option('libdir')))
+cdata.set('PINOS_CONFIG_DIR', '"@0@/etc/pinos"'.format(get_option('prefix')))
+cdata.set('VERSION', '"@0@"'.format(pinos_version))
+# FIXME: --with-memory-alignment],[8,N,malloc,pagesize (default is 32)]) option
+cdata.set('MEMORY_ALIGNMENT_MALLOC', 1)
+
+
+check_headers = [['dlfcn.h','HAVE_DLFCN_H'],
+ ['inttypes.h', 'HAVE_INTTYPES_H'],
+ ['memory.h', 'HAVE_MEMORY_H'],
+ ['poll.h', 'HAVE_POLL_H'],
+ ['stdint.h', 'HAVE_STDINT_H'],
+ ['stdio_ext.h', 'HAVE_STDIO_EXT_H'],
+ ['strings.h', 'HAVE_STRINGS_H'],
+ ['string.h', 'HAVE_STRING_H'],
+ ['sys/param.h', 'HAVE_SYS_PARAM_H'],
+ ['sys/poll.h', 'HAVE_SYS_POLL_H'],
+ ['sys/prctl.h', 'HAVE_SYS_PRCTL_H'],
+ ['sys/socket.h', 'HAVE_SYS_SOCKET_H'],
+ ['sys/stat.h', 'HAVE_SYS_STAT_H'],
+ ['sys/times.h', 'HAVE_SYS_TIMES_H'],
+ ['sys/time.h', 'HAVE_SYS_TIME_H'],
+ ['sys/types.h', 'HAVE_SYS_TYPES_H'],
+ ['sys/utsname.h', 'HAVE_SYS_UTSNAME_H'],
+ ['sys/wait.h', 'HAVE_SYS_WAIT_H'],
+ ['ucontext.h', 'HAVE_UCONTEXT_H'],
+ ['unistd.h', 'HAVE_UNISTD_H'],
+ ['valgrind/valgrind.h', 'HAVE_VALGRIND_VALGRIND_H'],
+]
+
+foreach h : check_headers
+ if cc.has_header(h.get(0))
+ cdata.set(h.get(1), 1)
+ endif
+endforeach
+
+if cc.has_function('poll', prefix : '#include')
+ cdata.set('HAVE_POLL', 1)
+endif
+if cc.has_function('pselect', prefix : '#include')
+ cdata.set('HAVE_PSELECT', 1)
+endif
+cdata.set('HAVE_MMAP', 1)
+
+if cc.has_function('posix_memalign', prefix : '#include')
+ cdata.set('HAVE_POSIX_MEMALIGN', 1)
+endif
+if cc.has_function('getpagesize', prefix : '#include')
+ cdata.set('HAVE_GETPAGESIZE', 1)
+endif
+if cc.has_function('clock_gettime', prefix : '#include ')
+ cdata.set('HAVE_CLOCK_GETTIME', 1)
+endif
+
+if cc.has_type('ptrdiff_t')
+ cdata.set('HAVE_PTRDIFF_T')
+endif
+
+if cc.has_function('mkstemp', prefix : '#include ')
+ cdata.set('HAVE_MKSTEMP', 1)
+endif
+
+configure_file(input : 'config.h.meson',
+ output : 'config.h',
+ configuration : cdata)
+
+configinc = include_directories('.')
+pinosinc = include_directories('pinos')
+
+# Find dependencies
+glib_dep = dependency('glib-2.0', version : '>=2.32.0')
+gobject_dep = dependency('gobject-2.0')
+gmodule_dep = dependency('gmodule-2.0')
+gio_dep = [dependency('gio-2.0'), dependency('gio-unix-2.0')]
+mathlib = cc.find_library('m', required : false)
+rt_lib = cc.find_library('rt', required : false) # clock_gettime
+dl_lib = cc.find_library('dl', required : false)
+gst_dep = [dependency('gstreamer-1.0'),
+ dependency('gstreamer-plugins-base-1.0'),
+ dependency('gstreamer-video-1.0'),
+ dependency('gstreamer-audio-1.0'),
+ dependency('gstreamer-allocators-1.0'),]
+
+subdir('spa')
+subdir('pinos')
+subdir('pkgconfig')
+
+#gtkdoc = find_program('gtkdoc-scan', required : false)
+#if gtkdoc.found()
+# subdir('docs')
+#else
+# message('Not building documentation as gtk-doc was not found')
+#endif
diff --git a/pinos/client/build_mkenum.py b/pinos/client/build_mkenum.py
new file mode 100755
index 000000000..9ab27520d
--- /dev/null
+++ b/pinos/client/build_mkenum.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python3
+
+# This is in its own file rather than inside meson.build
+# because a) mixing the two is ugly and b) trying to
+# make special characters such as \n go through all
+# backends is a fool's errand.
+
+import sys, os, shutil, subprocess
+
+h_array = ['--fhead',
+ "#ifndef __PINOS_ENUM_TYPES_H__\n#define __PINOS_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n",
+ '--fprod',
+ "\n/* enumerations from \"@filename@\" */\n",
+ '--vhead',
+ "GType @enum_name@_get_type (void);\n#define PINOS_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n",
+ '--ftail',
+ "G_END_DECLS\n\n#endif /* __PINOS_ENUM_TYPES_H__ */"]
+
+c_array = [
+ '--fhead',
+ "#include \"pinos.h\"\n#define C_ENUM(v) ((gint) v)\n#define C_FLAGS(v) ((guint) v)\n ",
+ '--fprod',
+ "\n/* enumerations from \"@filename@\" */",
+ '--vhead',
+ "GType\n@enum_name@_get_type (void)\n{\n static gsize id = 0;\n static const G@Type@Value values[] = {",
+ '--vprod',
+ " { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" },",
+ '--vtail',
+ " { 0, NULL, NULL }\n };\n\n if (g_once_init_enter (&id)) {\n GType tmp = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&id, tmp);\n }\n\n return (GType) id;\n}"
+ ]
+
+cmd = []
+argn = 1
+# Find the full command needed to run glib-mkenums
+# On UNIX-like, this is just the full path to glib-mkenums
+# On Windows, this is the full path to interpreter + full path to glib-mkenums
+for arg in sys.argv[1:]:
+ cmd.append(arg)
+ argn += 1
+ if arg.endswith('glib-mkenums'):
+ break
+ofilename = sys.argv[argn]
+headers = sys.argv[argn + 1:]
+
+if ofilename.endswith('.h'):
+ arg_array = h_array
+else:
+ arg_array = c_array
+
+pc = subprocess.Popen(cmd + arg_array + headers, stdout=subprocess.PIPE)
+(stdo, _) = pc.communicate()
+if pc.returncode != 0:
+ sys.exit(pc.returncode)
+open(ofilename, 'wb').write(stdo)
diff --git a/pinos/client/format.c b/pinos/client/format.c
index d52b56ab9..d31d2d897 100644
--- a/pinos/client/format.c
+++ b/pinos/client/format.c
@@ -17,6 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
+#include
#include
static SpaFormat *
diff --git a/pinos/client/mainloop.c b/pinos/client/mainloop.c
index ddb5d2ce0..24d246f0d 100644
--- a/pinos/client/mainloop.c
+++ b/pinos/client/mainloop.c
@@ -17,6 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
+#include "pinos.h"
#include "mainloop.h"
struct _PinosMainLoopPrivate
diff --git a/pinos/client/meson.build b/pinos/client/meson.build
new file mode 100644
index 000000000..7e6bc3764
--- /dev/null
+++ b/pinos/client/meson.build
@@ -0,0 +1,69 @@
+pinos_headers = [
+ 'context.h',
+ 'format.h',
+ 'introspect.h',
+ 'mainloop.h',
+ 'pinos.h',
+ 'properties.h',
+ 'stream.h',
+ 'ringbuffer.h',
+ 'subscribe.h',
+]
+
+pinos_sources = [
+ 'context.c',
+ 'format.c',
+ 'introspect.c',
+ 'mainloop.c',
+ 'properties.c',
+ 'stream.c',
+ 'pinos.c',
+ 'ringbuffer.c',
+ 'subscribe.c',
+]
+
+install_headers(pinos_headers, subdir : 'pinos/client')
+
+mkenums = find_program('build_mkenum.py')
+glib_mkenums = find_program('glib-mkenums')
+
+enumtypes_h = custom_target('enumtypes_h',
+ output : 'enumtypes.h',
+ input : pinos_headers,
+ install : true,
+ install_dir : 'include/pinos/client',
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+enumtypes_c = custom_target('enumtypes_c',
+ output : 'enumtypes.c',
+ input : pinos_headers,
+ depends : [enumtypes_h],
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+
+
+libpinos_c_args = [
+ '-DHAVE_CONFIG_H',
+ '-D_GNU_SOURCE',
+ '-DG_LOG_DOMAIN=g_log_domain_pinos',
+]
+
+
+pinos_gen_sources = [enumtypes_h]
+
+libpinos = shared_library('pinos', pinos_sources,
+ enumtypes_h, enumtypes_c,
+ version : libversion,
+ soversion : soversion,
+ c_args : libpinos_c_args,
+ include_directories : [configinc, spa_inc],
+ link_with : spalib,
+ install : true,
+ dependencies : [gobject_dep, gmodule_dep, glib_dep, gio_dep, mathlib],
+)
+
+pinos_dep = declare_dependency(link_with : libpinos,
+ include_directories : [configinc, spa_inc],
+ dependencies : [glib_dep, gobject_dep, gmodule_dep],
+ # Everything that uses libpinos needs this built to compile
+ sources : pinos_gen_sources,
+)
diff --git a/pinos/client/pinos.c b/pinos/client/pinos.c
index 6d31e85cf..78092bf37 100644
--- a/pinos/client/pinos.c
+++ b/pinos/client/pinos.c
@@ -22,6 +22,8 @@
#include "pinos/client/pinos.h"
#include "spa/include/spa/memory.h"
+const gchar g_log_domain_pinos[] = "Pinos";
+
GQuark
pinos_error_quark (void)
{
diff --git a/pinos/client/pinos.h b/pinos/client/pinos.h
index 60129b1e2..e5157caf9 100644
--- a/pinos/client/pinos.h
+++ b/pinos/client/pinos.h
@@ -20,6 +20,8 @@
#ifndef __PINOS_H__
#define __PINOS_H__
+extern const char g_log_domain_pinos[];
+
#include
#include
#include
diff --git a/pinos/client/properties.c b/pinos/client/properties.c
index 6bcdcbe25..b78ec3627 100644
--- a/pinos/client/properties.c
+++ b/pinos/client/properties.c
@@ -19,6 +19,7 @@
#include
+#include "pinos/client/pinos.h"
#include "pinos/client/properties.h"
struct _PinosProperties {
diff --git a/pinos/client/ringbuffer.c b/pinos/client/ringbuffer.c
index 655c0bb3f..644b9db11 100644
--- a/pinos/client/ringbuffer.c
+++ b/pinos/client/ringbuffer.c
@@ -17,8 +17,6 @@
* Boston, MA 02110-1301, USA.
*/
-#define _GNU_SOURCE
-
#include
#include
#include
@@ -28,6 +26,7 @@
#include
#include
+#include
#include
#include
diff --git a/pinos/client/stream.c b/pinos/client/stream.c
index d36edde9c..fa852e991 100644
--- a/pinos/client/stream.c
+++ b/pinos/client/stream.c
@@ -632,8 +632,10 @@ add_state_change (PinosStream *stream, SpaControlBuilder *builder, SpaNodeState
PinosStreamPrivate *priv = stream->priv;
SpaControlCmdNodeStateChange sc;
- sc.state = priv->node_state = state;
- spa_control_builder_add_cmd (builder, SPA_CONTROL_CMD_NODE_STATE_CHANGE, &sc);
+ if (priv->node_state != state) {
+ sc.state = priv->node_state = state;
+ spa_control_builder_add_cmd (builder, SPA_CONTROL_CMD_NODE_STATE_CHANGE, &sc);
+ }
}
static void
@@ -1504,27 +1506,7 @@ pinos_stream_start (PinosStream *stream)
static gboolean
do_stop (PinosStream *stream)
{
- PinosStreamPrivate *priv = stream->priv;
- SpaControlBuilder builder;
- SpaControl control;
- SpaControlCmdNodeCommand cnc;
- SpaNodeCommand nc;
-
- control_builder_init (stream, &builder);
- cnc.command = &nc;
- nc.type = SPA_NODE_COMMAND_PAUSE;
- nc.data = NULL;
- nc.size = 0;
- spa_control_builder_add_cmd (&builder, SPA_CONTROL_CMD_NODE_COMMAND, &cnc);
- spa_control_builder_end (&builder, &control);
-
- if (spa_control_write (&control, priv->fd) < 0)
- g_warning ("stream %p: failed to write control", stream);
-
- spa_control_clear (&control);
-
g_object_unref (stream);
-
return FALSE;
}
diff --git a/pinos/daemon/daemon-config.c b/pinos/daemon/daemon-config.c
index 4f202e41a..a879f9834 100644
--- a/pinos/daemon/daemon-config.c
+++ b/pinos/daemon/daemon-config.c
@@ -25,7 +25,8 @@
#include
#include
-#include
+#include
+#include
#include "pinos/daemon/daemon-config.h"
diff --git a/pinos/daemon/daemon-config.h b/pinos/daemon/daemon-config.h
index 1e4f50e3b..30df4c597 100644
--- a/pinos/daemon/daemon-config.h
+++ b/pinos/daemon/daemon-config.h
@@ -25,7 +25,7 @@
G_BEGIN_DECLS
-#include
+#include
#define PINOS_TYPE_DAEMON_CONFIG (pinos_daemon_config_get_type ())
diff --git a/pinos/daemon/main.c b/pinos/daemon/main.c
index 455f09d33..c5dc38bcc 100644
--- a/pinos/daemon/main.c
+++ b/pinos/daemon/main.c
@@ -20,9 +20,9 @@
#include
#include
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include "daemon-config.h"
diff --git a/pinos/daemon/meson.build b/pinos/daemon/meson.build
new file mode 100644
index 000000000..edac7416a
--- /dev/null
+++ b/pinos/daemon/meson.build
@@ -0,0 +1,22 @@
+pinos_sources = [
+ 'main.c',
+ 'daemon-config.c',
+]
+
+pinos_headers = [
+ 'daemon-config.h',
+]
+
+pinos_c_args = [
+ '-DHAVE_CONFIG_H',
+ '-D_GNU_SOURCE',
+ '-DG_LOG_DOMAIN=g_log_domain_pinos',
+]
+
+executable('pinos',
+ pinos_sources,
+ install: true,
+ c_args : pinos_c_args,
+ include_directories : [configinc, spa_inc],
+ dependencies : [glib_dep, gobject_dep, gmodule_dep, pinos_dep, pinoscore_dep],
+)
diff --git a/pinos/dbus/meson.build b/pinos/dbus/meson.build
new file mode 100644
index 000000000..0ebd03a2d
--- /dev/null
+++ b/pinos/dbus/meson.build
@@ -0,0 +1,15 @@
+
+gdbus_codegen = find_program('gdbus-codegen')
+
+org_pinos_files = ['org-pinos.c', 'org-pinos.h']
+
+gdbus_target = custom_target('org-pinos',
+output : org_pinos_files,
+input : 'org.pinos.xml',
+command : [gdbus_codegen,
+ '--interface-prefix', 'org.pinos.',
+ '--generate-c-code', 'pinos/dbus/org-pinos',
+ '--c-namespace', 'Pinos',
+ '--c-generate-object-manager',
+ '@INPUT@'],
+)
diff --git a/pinos/gst/gstpinosclock.h b/pinos/gst/gstpinosclock.h
index 89e0ce247..33c68fb77 100644
--- a/pinos/gst/gstpinosclock.h
+++ b/pinos/gst/gstpinosclock.h
@@ -22,7 +22,7 @@
#include
-#include
+#include
G_BEGIN_DECLS
diff --git a/pinos/gst/gstpinosdeviceprovider.h b/pinos/gst/gstpinosdeviceprovider.h
index 9dbb066f5..db0e771ee 100644
--- a/pinos/gst/gstpinosdeviceprovider.h
+++ b/pinos/gst/gstpinosdeviceprovider.h
@@ -28,7 +28,7 @@
#include "config.h"
#endif
-#include
+#include
#include
diff --git a/pinos/gst/gstpinospool.h b/pinos/gst/gstpinospool.h
index 5a42b2dca..7f654a072 100644
--- a/pinos/gst/gstpinospool.h
+++ b/pinos/gst/gstpinospool.h
@@ -22,7 +22,7 @@
#include
-#include
+#include
G_BEGIN_DECLS
diff --git a/pinos/gst/gstpinossink.h b/pinos/gst/gstpinossink.h
index 2d22e5542..4469c2061 100644
--- a/pinos/gst/gstpinossink.h
+++ b/pinos/gst/gstpinossink.h
@@ -23,8 +23,8 @@
#include
#include
-#include
-#include
+#include
+#include
G_BEGIN_DECLS
diff --git a/pinos/gst/gstpinossrc.h b/pinos/gst/gstpinossrc.h
index 2c991789a..f4e40e7a4 100644
--- a/pinos/gst/gstpinossrc.h
+++ b/pinos/gst/gstpinossrc.h
@@ -23,7 +23,7 @@
#include
#include
-#include
+#include
G_BEGIN_DECLS
diff --git a/pinos/gst/meson.build b/pinos/gst/meson.build
new file mode 100644
index 000000000..22c5b22f0
--- /dev/null
+++ b/pinos/gst/meson.build
@@ -0,0 +1,31 @@
+pinos_gst_sources = [
+ 'gstpinos.c',
+ 'gstpinosclock.c',
+ 'gstpinosdeviceprovider.c',
+ 'gstpinosformat.c',
+ 'gstpinospool.c',
+ 'gstpinossink.c',
+ 'gstpinossrc.c',
+]
+
+pinos_gst_headers = [
+ 'gstpinosclock.h',
+ 'gstpinosdeviceprovider.h',
+ 'gstpinosformat.h',
+ 'gstpinospool.h',
+ 'gstpinossink.h',
+ 'gstpinossrc.h',
+]
+
+pinos_gst_c_args = [
+ '-DHAVE_CONFIG_H',
+]
+
+pinos_gst = shared_library('gstpinos',
+ pinos_gst_sources,
+ c_args : pinos_gst_c_args,
+ include_directories : [configinc, spa_inc],
+ dependencies : [gobject_dep, glib_dep, gio_dep, gst_dep, pinos_dep, pinoscore_dep],
+ install : true,
+ install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),
+)
diff --git a/pinos/meson.build b/pinos/meson.build
new file mode 100644
index 000000000..77e70e57a
--- /dev/null
+++ b/pinos/meson.build
@@ -0,0 +1,8 @@
+
+subdir('dbus')
+subdir('client')
+subdir('server')
+subdir('daemon')
+subdir('tools')
+subdir('modules')
+subdir('gst')
diff --git a/pinos/modules/gst/meson.build b/pinos/modules/gst/meson.build
new file mode 100644
index 000000000..d3f75e221
--- /dev/null
+++ b/pinos/modules/gst/meson.build
@@ -0,0 +1,27 @@
+pinos_module_spa_headers = [
+ 'spa-alsa-monitor.h',
+ 'spa-audiotestsrc.h',
+ 'spa-v4l2-monitor.h',
+ 'spa-videotestsrc.h',
+]
+
+pinos_module_spa_sources = [
+ 'module.c',
+ 'spa-alsa-monitor.c',
+ 'spa-audiotestsrc.c',
+ 'spa-v4l2-monitor.c',
+ 'spa-videotestsrc.c',
+]
+
+pinos_module_spa_c_args = [
+ '-DHAVE_CONFIG_H',
+ '-D_GNU_SOURCE',
+]
+
+
+pinos_module_spa = shared_library('pinos-module-spa', pinos_module_spa_sources,
+ c_args : pinos_module_spa_c_args,
+ include_directories : [configinc, pinosinc, spa_inc],
+ link_with : spalib,
+ dependencies : [gobject_dep, gmodule_dep, glib_dep, gio_dep, mathlib, dl_lib, pinos_dep, pinoscore_dep],
+)
diff --git a/pinos/modules/meson.build b/pinos/modules/meson.build
new file mode 100644
index 000000000..a5b87326e
--- /dev/null
+++ b/pinos/modules/meson.build
@@ -0,0 +1,2 @@
+#subdir('gst')
+subdir('spa')
diff --git a/pinos/modules/spa/meson.build b/pinos/modules/spa/meson.build
new file mode 100644
index 000000000..da3ccd354
--- /dev/null
+++ b/pinos/modules/spa/meson.build
@@ -0,0 +1,29 @@
+pinos_module_spa_headers = [
+ 'spa-alsa-monitor.h',
+ 'spa-audiotestsrc.h',
+ 'spa-v4l2-monitor.h',
+ 'spa-videotestsrc.h',
+]
+
+pinos_module_spa_sources = [
+ 'module.c',
+ 'spa-alsa-monitor.c',
+ 'spa-audiotestsrc.c',
+ 'spa-v4l2-monitor.c',
+ 'spa-videotestsrc.c',
+]
+
+pinos_module_spa_c_args = [
+ '-DHAVE_CONFIG_H',
+ '-D_GNU_SOURCE',
+]
+
+
+pinos_module_spa = shared_library('pinos-module-spa', pinos_module_spa_sources,
+ c_args : pinos_module_spa_c_args,
+ include_directories : [configinc, pinosinc, spa_inc],
+ link_with : spalib,
+ install : true,
+ install_dir : '@0@/pinos-0.1'.format(get_option('libdir')),
+ dependencies : [gobject_dep, gmodule_dep, glib_dep, gio_dep, mathlib, dl_lib, pinos_dep, pinoscore_dep],
+)
diff --git a/pinos/modules/spa/spa-alsa-monitor.c b/pinos/modules/spa/spa-alsa-monitor.c
index 7a342e057..5db4db84c 100644
--- a/pinos/modules/spa/spa-alsa-monitor.c
+++ b/pinos/modules/spa/spa-alsa-monitor.c
@@ -17,8 +17,6 @@
* Boston, MA 02110-1301, USA.
*/
-#define _GNU_SOURCE
-
#include
#include
#include
diff --git a/pinos/modules/spa/spa-v4l2-monitor.c b/pinos/modules/spa/spa-v4l2-monitor.c
index 794633f45..f1daf1a4f 100644
--- a/pinos/modules/spa/spa-v4l2-monitor.c
+++ b/pinos/modules/spa/spa-v4l2-monitor.c
@@ -17,8 +17,6 @@
* Boston, MA 02110-1301, USA.
*/
-#define _GNU_SOURCE
-
#include
#include
#include
diff --git a/pinos/modules/spa/spa-videotestsrc.c b/pinos/modules/spa/spa-videotestsrc.c
index ec896ff4b..fe9be234c 100644
--- a/pinos/modules/spa/spa-videotestsrc.c
+++ b/pinos/modules/spa/spa-videotestsrc.c
@@ -17,8 +17,6 @@
* Boston, MA 02110-1301, USA.
*/
-#define _GNU_SOURCE
-
#include
#include
diff --git a/pinos/server/client-node.c b/pinos/server/client-node.c
index 3e9c91c49..bcae2e2b5 100644
--- a/pinos/server/client-node.c
+++ b/pinos/server/client-node.c
@@ -17,8 +17,6 @@
* Boston, MA 02110-1301, USA.
*/
-#define _GNU_SOURCE
-
#include
#include
#include
diff --git a/pinos/server/command.c b/pinos/server/command.c
index efe77a438..f5403d973 100644
--- a/pinos/server/command.c
+++ b/pinos/server/command.c
@@ -21,7 +21,8 @@
#include
#include
-#include
+#include
+#include
#include "command.h"
diff --git a/pinos/server/command.h b/pinos/server/command.h
index f26e2330d..5051b1d06 100644
--- a/pinos/server/command.h
+++ b/pinos/server/command.h
@@ -25,7 +25,7 @@
G_BEGIN_DECLS
-#include
+#include
typedef struct _PinosCommand PinosCommand;
diff --git a/pinos/server/link.c b/pinos/server/link.c
index 4d98adaaa..2622abea4 100644
--- a/pinos/server/link.c
+++ b/pinos/server/link.c
@@ -554,11 +554,17 @@ do_start (PinosLink *this, SpaNodeState in_state, SpaNodeState out_state)
} else {
pinos_link_update_state (this, PINOS_LINK_STATE_PAUSED);
- if (in_state == SPA_NODE_STATE_PAUSED)
+ if (in_state == SPA_NODE_STATE_PAUSED) {
pinos_node_set_state (this->input_node, PINOS_NODE_STATE_RUNNING);
+ if (pinos_node_get_state (this->input_node) != PINOS_NODE_STATE_RUNNING)
+ res = SPA_RESULT_RETURN_ASYNC (0);
+ }
- if (out_state == SPA_NODE_STATE_PAUSED)
+ if (out_state == SPA_NODE_STATE_PAUSED) {
pinos_node_set_state (this->output_node, PINOS_NODE_STATE_RUNNING);
+ if (pinos_node_get_state (this->output_node) != PINOS_NODE_STATE_RUNNING)
+ res = SPA_RESULT_RETURN_ASYNC (0);
+ }
}
return res;
}
diff --git a/pinos/server/meson.build b/pinos/server/meson.build
new file mode 100644
index 000000000..45e81f91e
--- /dev/null
+++ b/pinos/server/meson.build
@@ -0,0 +1,42 @@
+pinoscore_headers = [
+ 'client.h',
+ 'client-node.h',
+ 'command.h',
+ 'daemon.h',
+ 'link.h',
+ 'module.h',
+ 'node.h',
+ 'node-factory.h',
+]
+
+pinoscore_sources = [
+ 'client.c',
+ 'client-node.c',
+ 'command.c',
+ 'daemon.c',
+ 'link.c',
+ 'module.c',
+ 'node.c',
+ 'node-factory.c',
+]
+
+libpinoscore_c_args = [
+ '-DHAVE_CONFIG_H',
+ '-D_GNU_SOURCE',
+]
+
+
+libpinoscore = shared_library('pinoscore', pinoscore_sources, gdbus_target,
+ version : libversion,
+ soversion : soversion,
+ c_args : libpinoscore_c_args,
+ include_directories : [configinc, spa_inc],
+ link_with : spalib,
+ install : true,
+ dependencies : [gobject_dep, gmodule_dep, glib_dep, gio_dep, mathlib, dl_lib, pinos_dep],
+)
+
+pinoscore_dep = declare_dependency(link_with : libpinoscore,
+ include_directories : [configinc, spa_inc],
+ dependencies : [glib_dep, gobject_dep, gmodule_dep, pinos_dep],
+)
diff --git a/pinos/server/module.c b/pinos/server/module.c
index 5a62cf443..32cc2b2fa 100644
--- a/pinos/server/module.c
+++ b/pinos/server/module.c
@@ -25,6 +25,7 @@
#include
#include
+#include "pinos/client/pinos.h"
#include "pinos/server/module.h"
#define PINOS_SYMBOL_MODULE_INIT "pinos__module_init"
diff --git a/pinos/server/node-factory.h b/pinos/server/node-factory.h
index ecc31dc40..543013ed1 100644
--- a/pinos/server/node-factory.h
+++ b/pinos/server/node-factory.h
@@ -28,7 +28,7 @@ typedef struct _PinosNodeFactory PinosNodeFactory;
typedef struct _PinosNodeFactoryClass PinosNodeFactoryClass;
typedef struct _PinosNodeFactoryPrivate PinosNodeFactoryPrivate;
-#include
+#include
#define PINOS_TYPE_NODE_FACTORY (pinos_node_factory_get_type ())
#define PINOS_IS_NODE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PINOS_TYPE_NODE_FACTORY))
diff --git a/pinos/server/node.c b/pinos/server/node.c
index b99ee4aa3..5d1edfc90 100644
--- a/pinos/server/node.c
+++ b/pinos/server/node.c
@@ -80,6 +80,8 @@ struct _PinosNodePrivate
guint n_used_input_links;
SpaNodeEventAsyncComplete ac;
+ uint32_t pending_state_seq;
+ PinosNodeState pending_state;
};
G_DEFINE_TYPE (PinosNode, pinos_node, G_TYPE_OBJECT);
@@ -359,13 +361,20 @@ start_node (PinosNode *this)
static SpaResult
suspend_node (PinosNode *this)
{
- SpaResult res;
+ PinosNodePrivate *priv = this->priv;
+ SpaResult res = SPA_RESULT_OK;
+ guint i;
g_debug ("node %p: suspend node", this);
- if ((res = spa_node_port_set_format (this->node, 0, 0, NULL)) < 0)
- g_warning ("error unset format output: %d", res);
-
+ for (i = 0; i < priv->n_input_ports; i++) {
+ if ((res = spa_node_port_set_format (this->node, priv->input_port_ids[i], 0, NULL)) < 0)
+ g_warning ("error unset format output: %d", res);
+ }
+ for (i = 0; i < priv->n_output_ports; i++) {
+ if ((res = spa_node_port_set_format (this->node, priv->output_port_ids[i], 0, NULL)) < 0)
+ g_warning ("error unset format output: %d", res);
+ }
return res;
}
@@ -404,6 +413,7 @@ static gboolean
node_set_state (PinosNode *this,
PinosNodeState state)
{
+ PinosNodePrivate *priv = this->priv;
SpaResult res = SPA_RESULT_OK;
g_debug ("node %p: set state %s", this, pinos_node_state_as_string (state));
@@ -434,7 +444,12 @@ node_set_state (PinosNode *this,
if (SPA_RESULT_IS_ERROR (res))
return FALSE;
- pinos_node_update_state (this, state);
+ if (SPA_RESULT_IS_ASYNC (res)) {
+ priv->pending_state_seq = SPA_RESULT_ASYNC_SEQ (res);
+ priv->pending_state = state;
+ } else {
+ pinos_node_update_state (this, state);
+ }
return TRUE;
}
@@ -482,6 +497,9 @@ do_handle_async_complete (PinosNode *this)
init_complete (this);
priv->async_init = FALSE;
}
+ if (priv->pending_state_seq == ac->seq) {
+ pinos_node_update_state (this, priv->pending_state);
+ }
g_signal_emit (this, signals[SIGNAL_ASYNC_COMPLETE], 0, ac->seq, ac->res);
}
@@ -1029,6 +1047,7 @@ pinos_node_init (PinosNode * node)
(GCallback) handle_remove,
node);
priv->state = PINOS_NODE_STATE_CREATING;
+ priv->pending_state_seq = SPA_ID_INVALID;
pinos_node1_set_state (priv->iface, priv->state);
priv->input_links = g_array_new (FALSE, TRUE, sizeof (NodeLink));
diff --git a/pinos/tools/meson.build b/pinos/tools/meson.build
new file mode 100644
index 000000000..eed75e882
--- /dev/null
+++ b/pinos/tools/meson.build
@@ -0,0 +1,5 @@
+executable('pinos-monitor',
+ 'pinos-monitor.c',
+ install: true,
+ dependencies : [glib_dep, gobject_dep, gmodule_dep, pinos_dep],
+)
diff --git a/pinos/tools/pinos-monitor.c b/pinos/tools/pinos-monitor.c
index 942badde9..c94d24aed 100644
--- a/pinos/tools/pinos-monitor.c
+++ b/pinos/tools/pinos-monitor.c
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include
+#include
static GMainLoop *loop;
diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build
new file mode 100644
index 000000000..2e251b3db
--- /dev/null
+++ b/pkgconfig/meson.build
@@ -0,0 +1,22 @@
+pkgconf = configuration_data()
+
+pkgconf.set('prefix', get_option('prefix'))
+pkgconf.set('exec_prefix', '${prefix}')
+pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
+pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
+pkgconf.set('PINOS_API_VERSION', apiversion)
+pkgconf.set('VERSION', pinos_version)
+
+pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
+
+pkg_files = ['libpinos',
+]
+
+foreach p : pkg_files
+ infile = p + '.pc.in'
+ outfile = p + '-0.1.pc'
+ configure_file(input : infile,
+ output : outfile,
+ configuration : pkgconf,
+ install_dir : pkg_install_dir)
+endforeach
diff --git a/spa/include/spa/control.h b/spa/include/spa/control.h
index 181985067..bfbab0b31 100644
--- a/spa/include/spa/control.h
+++ b/spa/include/spa/control.h
@@ -130,9 +130,10 @@ typedef struct {
/* SPA_CONTROL_CMD_SET_FORMAT */
typedef struct {
- uint32_t seq;
- uint32_t port_id;
- SpaFormat *format;
+ uint32_t seq;
+ uint32_t port_id;
+ SpaPortFormatFlags flags;
+ SpaFormat *format;
} SpaControlCmdSetFormat;
/* SPA_CONTROL_CMD_SET_PROPERTY */
diff --git a/spa/include/spa/meson.build b/spa/include/spa/meson.build
index 6d3afa170..26c9c953a 100644
--- a/spa/include/spa/meson.build
+++ b/spa/include/spa/meson.build
@@ -1,8 +1,22 @@
-install_headers('buffer.h',
- 'command.h',
- 'defs.h',
- 'event.h',
- 'node.h',
- 'plugin.h',
- 'port.h',
- 'props.h')
+spa_headers = [
+ 'buffer.h',
+ 'clock.h',
+ 'control.h',
+ 'debug.h',
+ 'defs.h',
+ 'dict.h',
+ 'format.h',
+ 'memory.h',
+ 'monitor.h',
+ 'node-command.h',
+ 'node-event.h',
+ 'node.h',
+ 'plugin.h',
+ 'poll.h',
+ 'port.h',
+ 'props.h',
+ 'queue.h',
+ 'ringbuffer.h'
+]
+
+install_headers(spa_headers, subdir : 'spa')
diff --git a/spa/lib/meson.build b/spa/lib/meson.build
index 8b80922e3..ae947e735 100644
--- a/spa/lib/meson.build
+++ b/spa/lib/meson.build
@@ -10,9 +10,13 @@ spalib_sources = ['audio-raw.c',
spalib = shared_library('spa-lib',
spalib_sources,
- include_directories : inc,
- install : true)
-spalibs = static_library('spa-lib',
- spalib_sources,
- include_directories : inc,
+ include_directories : spa_inc,
install : true)
+#spalibs = static_library('spa-lib',
+# spalib_sources,
+# include_directories : spa_inc,
+# install : true)
+
+spalib_dep = declare_dependency(link_with : spalib,
+ include_directories : spa_inc,
+)
diff --git a/spa/meson.build b/spa/meson.build
index 83a665832..409d820d2 100644
--- a/spa/meson.build
+++ b/spa/meson.build
@@ -1,4 +1,4 @@
-project('spa', 'c')
+#project('spa', 'c')
alsa_dep = dependency('alsa')
v4l2_dep = dependency('libv4l2')
@@ -16,7 +16,7 @@ cc = meson.get_compiler('c')
dl_lib = cc.find_library('dl', required : true)
pthread_lib = cc.find_library('pthread', required : true)
-inc = include_directories('include')
+spa_inc = include_directories('include')
subdir('include')
subdir('lib')
diff --git a/spa/plugins/alsa/alsa-monitor.c b/spa/plugins/alsa/alsa-monitor.c
index 35f8ea506..4ef87bc06 100644
--- a/spa/plugins/alsa/alsa-monitor.c
+++ b/spa/plugins/alsa/alsa-monitor.c
@@ -255,7 +255,7 @@ spa_alsa_monitor_set_event_callback (SpaMonitor *monitor,
return SPA_RESULT_ERROR;
udev_monitor_filter_add_match_subsystem_devtype (this->umonitor,
- "video4linux",
+ "sound",
NULL);
udev_monitor_enable_receiving (this->umonitor);
diff --git a/spa/plugins/alsa/meson.build b/spa/plugins/alsa/meson.build
index 272b2fdc4..a287f0b61 100644
--- a/spa/plugins/alsa/meson.build
+++ b/spa/plugins/alsa/meson.build
@@ -1,12 +1,13 @@
-alsa_sources = ['alsa.c',
+spa_alsa_sources = ['alsa.c',
'alsa-monitor.c',
'alsa-sink.c',
'alsa-source.c',
'alsa-utils.c']
-alsalib = shared_library('spa-alsa',
- alsa_sources,
- include_directories : inc,
- dependencies : [ alsa_dep, libudev_dep ],
- link_with : spalib,
- install : true)
+spa_alsa = shared_library('spa-alsa',
+ spa_alsa_sources,
+ include_directories : spa_inc,
+ dependencies : [ alsa_dep, libudev_dep ],
+ link_with : spalib,
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/audiomixer/meson.build b/spa/plugins/audiomixer/meson.build
index 5c51205bc..06faee094 100644
--- a/spa/plugins/audiomixer/meson.build
+++ b/spa/plugins/audiomixer/meson.build
@@ -2,6 +2,7 @@ audiomixer_sources = ['audiomixer.c', 'plugin.c']
audiomixerlib = shared_library('spa-audiomixer',
audiomixer_sources,
- include_directories : inc,
+ include_directories : spa_inc,
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/audiotestsrc/meson.build b/spa/plugins/audiotestsrc/meson.build
index 130b4b7ef..40e1cb686 100644
--- a/spa/plugins/audiotestsrc/meson.build
+++ b/spa/plugins/audiotestsrc/meson.build
@@ -2,6 +2,7 @@ audiotestsrc_sources = ['audiotestsrc.c', 'plugin.c']
audiotestsrclib = shared_library('spa-audiotestsrc',
audiotestsrc_sources,
- include_directories : inc,
+ include_directories : spa_inc,
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/ffmpeg/meson.build b/spa/plugins/ffmpeg/meson.build
index ad886fe84..8aa26bda0 100644
--- a/spa/plugins/ffmpeg/meson.build
+++ b/spa/plugins/ffmpeg/meson.build
@@ -4,7 +4,8 @@ ffmpeg_sources = ['ffmpeg.c',
ffmpeglib = shared_library('spa-ffmpeg',
ffmpeg_sources,
- include_directories : inc,
+ include_directories : spa_inc,
dependencies : [ avcodec_dep, avformat_dep ],
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/libva/meson.build b/spa/plugins/libva/meson.build
index ce8142f93..ced52b4dc 100644
--- a/spa/plugins/libva/meson.build
+++ b/spa/plugins/libva/meson.build
@@ -7,4 +7,5 @@ libvalib = shared_library('spa-libva',
include_directories : inc,
dependencies : libva_dep,
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/remote/meson.build b/spa/plugins/remote/meson.build
index 880b8e3ba..8f599d5fe 100644
--- a/spa/plugins/remote/meson.build
+++ b/spa/plugins/remote/meson.build
@@ -2,6 +2,7 @@ remote_sources = ['proxy.c', 'plugin.c']
remotelib = shared_library('spa-remote',
remote_sources,
- include_directories : inc,
+ include_directories : spa_inc,
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/remote/proxy.c b/spa/plugins/remote/proxy.c
index ab4560a0b..27eb0ed3d 100644
--- a/spa/plugins/remote/proxy.c
+++ b/spa/plugins/remote/proxy.c
@@ -496,6 +496,7 @@ spa_proxy_node_port_set_format (SpaNode *node,
spa_control_builder_init_into (&builder, buf, sizeof (buf), NULL, 0);
sf.seq = this->seq++;
sf.port_id = port_id;
+ sf.flags = flags;
sf.format = (SpaFormat *) format;
spa_control_builder_add_cmd (&builder, SPA_CONTROL_CMD_SET_FORMAT, &sf);
spa_control_builder_end (&builder, &control);
diff --git a/spa/plugins/v4l2/meson.build b/spa/plugins/v4l2/meson.build
index c033d5adf..451ce9f74 100644
--- a/spa/plugins/v4l2/meson.build
+++ b/spa/plugins/v4l2/meson.build
@@ -4,7 +4,8 @@ v4l2_sources = ['v4l2.c',
v4l2lib = shared_library('spa-v4l2',
v4l2_sources,
- include_directories : inc,
+ include_directories : spa_inc,
dependencies : [ v4l2_dep, libudev_dep ],
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/videotestsrc/meson.build b/spa/plugins/videotestsrc/meson.build
index 6b760abc3..f112ac381 100644
--- a/spa/plugins/videotestsrc/meson.build
+++ b/spa/plugins/videotestsrc/meson.build
@@ -2,7 +2,8 @@ videotestsrc_sources = ['videotestsrc.c', 'plugin.c']
videotestsrclib = shared_library('spa-videotestsrc',
videotestsrc_sources,
- include_directories : inc,
+ include_directories : spa_inc,
dependencies : threads_dep,
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/volume/meson.build b/spa/plugins/volume/meson.build
index e0d63cfe8..06d3bf437 100644
--- a/spa/plugins/volume/meson.build
+++ b/spa/plugins/volume/meson.build
@@ -2,6 +2,7 @@ volume_sources = ['volume.c', 'plugin.c']
volumelib = shared_library('spa-volume',
volume_sources,
- include_directories : inc,
+ include_directories : spa_inc,
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/plugins/xv/meson.build b/spa/plugins/xv/meson.build
index c56ce6387..073528a95 100644
--- a/spa/plugins/xv/meson.build
+++ b/spa/plugins/xv/meson.build
@@ -3,7 +3,8 @@ xv_sources = ['xv.c',
xvlib = shared_library('spa-xv',
xv_sources,
- include_directories : inc,
+ include_directories : spa_inc,
dependencies : xv_dep,
link_with : spalib,
- install : true)
+ install : true,
+ install_dir : '@0@/spa'.format(get_option('libdir')))
diff --git a/spa/tests/meson.build b/spa/tests/meson.build
index b5964cf4f..ab644738e 100644
--- a/spa/tests/meson.build
+++ b/spa/tests/meson.build
@@ -1,11 +1,11 @@
executable('test-mixer', 'test-mixer.c',
- include_directories : inc,
+ include_directories : spa_inc,
dependencies : [dl_lib, pthread_lib],
link_with : spalib,
install : false)
executable('test-v4l2', 'test-v4l2.c',
- include_directories : inc,
+ include_directories : spa_inc,
dependencies : [dl_lib, sdl_dep, pthread_lib],
link_with : spalib,
install : false)
diff --git a/spa/tools/meson.build b/spa/tools/meson.build
index 94f4b8d64..476b5169f 100644
--- a/spa/tools/meson.build
+++ b/spa/tools/meson.build
@@ -1,11 +1,11 @@
executable('spa-inspect', 'spa-inspect.c',
- include_directories : inc,
+ include_directories : spa_inc,
dependencies : [dl_lib],
link_with : spalib,
install : true)
executable('spa-monitor', 'spa-monitor.c',
- include_directories : inc,
+ include_directories : spa_inc,
dependencies : [dl_lib],
link_with : spalib,
install : true)