diff options
author | Wim Taymans <wtaymans@redhat.com> | 2017-07-11 15:57:20 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2017-07-11 16:08:22 +0200 |
commit | d1655196c3a54de9dad08cde7ecde17d9c0acf8b (patch) | |
tree | fa3c48546d7c400882b18aba81a35d6fa4c0e85f | |
parent | 847cef83b665fcdeb7d50fe02ea51df460c857c4 (diff) |
move things around
-rw-r--r-- | Makefile.in | 8 | ||||
-rw-r--r-- | doc/Doxyfile.in | 7 | ||||
-rw-r--r-- | meson.build | 3 | ||||
-rw-r--r-- | pipewire.spec | 5 | ||||
-rw-r--r-- | pkgconfig/libpipewire.pc.in | 2 | ||||
-rw-r--r-- | pkgconfig/libpipewirecore.pc.in | 11 | ||||
-rw-r--r-- | pkgconfig/meson.build | 1 | ||||
-rw-r--r-- | src/.gitignore (renamed from pipewire/.gitignore) | 0 | ||||
-rw-r--r-- | src/daemon/.gitignore (renamed from pipewire/daemon/.gitignore) | 0 | ||||
-rw-r--r-- | src/daemon/daemon-config.c (renamed from pipewire/daemon/daemon-config.c) | 6 | ||||
-rw-r--r-- | src/daemon/daemon-config.h (renamed from pipewire/daemon/daemon-config.h) | 2 | ||||
-rw-r--r-- | src/daemon/main.c (renamed from pipewire/daemon/main.c) | 6 | ||||
-rw-r--r-- | src/daemon/meson.build (renamed from pipewire/daemon/meson.build) | 2 | ||||
-rw-r--r-- | src/daemon/pipewire-system.conf (renamed from pipewire/daemon/pipewire-system.conf) | 0 | ||||
-rw-r--r-- | src/daemon/pipewire.conf.in (renamed from pipewire/daemon/pipewire.conf.in) | 0 | ||||
-rw-r--r-- | src/daemon/pipewire.desktop.in (renamed from pipewire/daemon/pipewire.desktop.in) | 0 | ||||
-rw-r--r-- | src/examples/local-v4l2.c (renamed from pipewire/examples/local-v4l2.c) | 11 | ||||
-rw-r--r-- | src/examples/meson.build (renamed from pipewire/examples/meson.build) | 6 | ||||
-rw-r--r-- | src/examples/video-play.c (renamed from pipewire/examples/video-play.c) | 10 | ||||
-rw-r--r-- | src/examples/video-src.c (renamed from pipewire/examples/video-src.c) | 6 | ||||
-rw-r--r-- | src/extensions/client-node.h (renamed from pipewire/extensions/client-node.h) | 0 | ||||
-rw-r--r-- | src/extensions/meson.build (renamed from pipewire/extensions/meson.build) | 0 | ||||
-rw-r--r-- | src/gst/gstpipewire.c (renamed from pipewire/gst/gstpipewire.c) | 0 | ||||
-rw-r--r-- | src/gst/gstpipewireclock.c (renamed from pipewire/gst/gstpipewireclock.c) | 0 | ||||
-rw-r--r-- | src/gst/gstpipewireclock.h (renamed from pipewire/gst/gstpipewireclock.h) | 2 | ||||
-rw-r--r-- | src/gst/gstpipewiredeviceprovider.c (renamed from pipewire/gst/gstpipewiredeviceprovider.c) | 0 | ||||
-rw-r--r-- | src/gst/gstpipewiredeviceprovider.h (renamed from pipewire/gst/gstpipewiredeviceprovider.h) | 2 | ||||
-rw-r--r-- | src/gst/gstpipewireformat.c (renamed from pipewire/gst/gstpipewireformat.c) | 0 | ||||
-rw-r--r-- | src/gst/gstpipewireformat.h (renamed from pipewire/gst/gstpipewireformat.h) | 0 | ||||
-rw-r--r-- | src/gst/gstpipewirepool.c (renamed from pipewire/gst/gstpipewirepool.c) | 0 | ||||
-rw-r--r-- | src/gst/gstpipewirepool.h (renamed from pipewire/gst/gstpipewirepool.h) | 2 | ||||
-rw-r--r-- | src/gst/gstpipewiresink.c (renamed from pipewire/gst/gstpipewiresink.c) | 0 | ||||
-rw-r--r-- | src/gst/gstpipewiresink.h (renamed from pipewire/gst/gstpipewiresink.h) | 4 | ||||
-rw-r--r-- | src/gst/gstpipewiresrc.c (renamed from pipewire/gst/gstpipewiresrc.c) | 18 | ||||
-rw-r--r-- | src/gst/gstpipewiresrc.h (renamed from pipewire/gst/gstpipewiresrc.h) | 2 | ||||
-rw-r--r-- | src/gst/meson.build (renamed from pipewire/gst/meson.build) | 2 | ||||
-rw-r--r-- | src/meson.build (renamed from pipewire/meson.build) | 3 | ||||
-rw-r--r-- | src/modules/meson.build (renamed from pipewire/modules/meson.build) | 19 | ||||
-rw-r--r-- | src/modules/module-autolink.c (renamed from pipewire/modules/module-autolink.c) | 6 | ||||
-rw-r--r-- | src/modules/module-client-node.c (renamed from pipewire/modules/module-client-node.c) | 7 | ||||
-rw-r--r-- | src/modules/module-client-node/client-node.c (renamed from pipewire/modules/module-client-node/client-node.c) | 10 | ||||
-rw-r--r-- | src/modules/module-client-node/client-node.h (renamed from pipewire/modules/module-client-node/client-node.h) | 4 | ||||
-rw-r--r-- | src/modules/module-client-node/protocol-native.c (renamed from pipewire/modules/module-client-node/protocol-native.c) | 12 | ||||
-rw-r--r-- | src/modules/module-flatpak.c (renamed from pipewire/modules/module-flatpak.c) | 8 | ||||
-rw-r--r-- | src/modules/module-jack.c (renamed from pipewire/modules/module-jack.c) | 38 | ||||
-rw-r--r-- | src/modules/module-jack/defs.h (renamed from pipewire/modules/module-jack/defs.h) | 2 | ||||
-rw-r--r-- | src/modules/module-jack/server.h (renamed from pipewire/modules/module-jack/server.h) | 0 | ||||
-rw-r--r-- | src/modules/module-jack/shared.h (renamed from pipewire/modules/module-jack/shared.h) | 0 | ||||
-rw-r--r-- | src/modules/module-jack/shm.c (renamed from pipewire/modules/module-jack/shm.c) | 0 | ||||
-rw-r--r-- | src/modules/module-jack/shm.h (renamed from pipewire/modules/module-jack/shm.h) | 0 | ||||
-rw-r--r-- | src/modules/module-jack/synchro.h (renamed from pipewire/modules/module-jack/synchro.h) | 0 | ||||
-rw-r--r-- | src/modules/module-mixer.c (renamed from pipewire/modules/module-mixer.c) | 6 | ||||
-rw-r--r-- | src/modules/module-protocol-dbus.c (renamed from pipewire/modules/module-protocol-dbus.c) | 0 | ||||
-rw-r--r-- | src/modules/module-protocol-native.c (renamed from pipewire/modules/module-protocol-native.c) | 28 | ||||
-rw-r--r-- | src/modules/module-protocol-native/connection.c (renamed from pipewire/modules/module-protocol-native/connection.c) | 3 | ||||
-rw-r--r-- | src/modules/module-protocol-native/connection.h (renamed from pipewire/modules/module-protocol-native/connection.h) | 2 | ||||
-rw-r--r-- | src/modules/module-protocol-native/protocol-native.c (renamed from pipewire/modules/module-protocol-native/protocol-native.c) | 8 | ||||
-rw-r--r-- | src/modules/module-suspend-on-idle.c (renamed from pipewire/modules/module-suspend-on-idle.c) | 4 | ||||
-rw-r--r-- | src/modules/spa/meson.build (renamed from pipewire/modules/spa/meson.build) | 6 | ||||
-rw-r--r-- | src/modules/spa/module-monitor.c (renamed from pipewire/modules/spa/module-monitor.c) | 6 | ||||
-rw-r--r-- | src/modules/spa/module-node-factory.c (renamed from pipewire/modules/spa/module-node-factory.c) | 7 | ||||
-rw-r--r-- | src/modules/spa/module-node.c (renamed from pipewire/modules/spa/module-node.c) | 6 | ||||
-rw-r--r-- | src/modules/spa/spa-monitor.c (renamed from pipewire/modules/spa/spa-monitor.c) | 5 | ||||
-rw-r--r-- | src/modules/spa/spa-monitor.h (renamed from pipewire/modules/spa/spa-monitor.h) | 3 | ||||
-rw-r--r-- | src/modules/spa/spa-node.c (renamed from pipewire/modules/spa/spa-node.c) | 0 | ||||
-rw-r--r-- | src/modules/spa/spa-node.h (renamed from pipewire/modules/spa/spa-node.h) | 4 | ||||
-rw-r--r-- | src/pipewire/.gitignore (renamed from pipewire/client/.gitignore) | 0 | ||||
-rw-r--r-- | src/pipewire/array.h (renamed from pipewire/client/array.h) | 0 | ||||
-rw-r--r-- | src/pipewire/client.c (renamed from pipewire/server/client.c) | 8 | ||||
-rw-r--r-- | src/pipewire/client.h (renamed from pipewire/server/client.h) | 11 | ||||
-rw-r--r-- | src/pipewire/command.c (renamed from pipewire/server/command.c) | 6 | ||||
-rw-r--r-- | src/pipewire/command.h (renamed from pipewire/server/command.h) | 2 | ||||
-rw-r--r-- | src/pipewire/core.c (renamed from pipewire/server/core.c) | 9 | ||||
-rw-r--r-- | src/pipewire/core.h (renamed from pipewire/server/core.h) | 18 | ||||
-rw-r--r-- | src/pipewire/data-loop.c (renamed from pipewire/server/data-loop.c) | 6 | ||||
-rw-r--r-- | src/pipewire/data-loop.h (renamed from pipewire/server/data-loop.h) | 2 | ||||
-rw-r--r-- | src/pipewire/interfaces.h (renamed from pipewire/client/interfaces.h) | 2 | ||||
-rw-r--r-- | src/pipewire/introspect.c (renamed from pipewire/client/introspect.c) | 5 | ||||
-rw-r--r-- | src/pipewire/introspect.h (renamed from pipewire/client/introspect.h) | 2 | ||||
-rw-r--r-- | src/pipewire/link.c (renamed from pipewire/server/link.c) | 9 | ||||
-rw-r--r-- | src/pipewire/link.h (renamed from pipewire/server/link.h) | 10 | ||||
-rw-r--r-- | src/pipewire/log.c (renamed from pipewire/client/log.c) | 2 | ||||
-rw-r--r-- | src/pipewire/log.h (renamed from pipewire/client/log.h) | 0 | ||||
-rw-r--r-- | src/pipewire/loop.c (renamed from pipewire/client/loop.c) | 6 | ||||
-rw-r--r-- | src/pipewire/loop.h (renamed from pipewire/client/loop.h) | 2 | ||||
-rw-r--r-- | src/pipewire/main-loop.c (renamed from pipewire/server/main-loop.c) | 4 | ||||
-rw-r--r-- | src/pipewire/main-loop.h (renamed from pipewire/server/main-loop.h) | 2 | ||||
-rw-r--r-- | src/pipewire/map.h (renamed from pipewire/client/map.h) | 4 | ||||
-rw-r--r-- | src/pipewire/mem.c (renamed from pipewire/client/mem.c) | 4 | ||||
-rw-r--r-- | src/pipewire/mem.h (renamed from pipewire/client/mem.h) | 0 | ||||
-rw-r--r-- | src/pipewire/memfd-wrappers.h (renamed from pipewire/client/memfd-wrappers.h) | 0 | ||||
-rw-r--r-- | src/pipewire/meson.build (renamed from pipewire/client/meson.build) | 33 | ||||
-rw-r--r-- | src/pipewire/module.c (renamed from pipewire/server/module.c) | 20 | ||||
-rw-r--r-- | src/pipewire/module.h (renamed from pipewire/server/module.h) | 2 | ||||
-rw-r--r-- | src/pipewire/node-factory.c (renamed from pipewire/server/node-factory.c) | 4 | ||||
-rw-r--r-- | src/pipewire/node-factory.h (renamed from pipewire/server/node-factory.h) | 4 | ||||
-rw-r--r-- | src/pipewire/node.c (renamed from pipewire/server/node.c) | 12 | ||||
-rw-r--r-- | src/pipewire/node.h (renamed from pipewire/server/node.h) | 18 | ||||
-rw-r--r-- | src/pipewire/pipewire.c (renamed from pipewire/client/pipewire.c) | 10 | ||||
-rw-r--r-- | src/pipewire/pipewire.h (renamed from pipewire/client/pipewire.h) | 20 | ||||
-rw-r--r-- | src/pipewire/port.c (renamed from pipewire/server/port.c) | 5 | ||||
-rw-r--r-- | src/pipewire/port.h (renamed from pipewire/server/port.h) | 8 | ||||
-rw-r--r-- | src/pipewire/properties.c (renamed from pipewire/client/properties.c) | 4 | ||||
-rw-r--r-- | src/pipewire/properties.h (renamed from pipewire/client/properties.h) | 0 | ||||
-rw-r--r-- | src/pipewire/protocol.c (renamed from pipewire/client/protocol.c) | 2 | ||||
-rw-r--r-- | src/pipewire/protocol.h (renamed from pipewire/client/protocol.h) | 5 | ||||
-rw-r--r-- | src/pipewire/proxy.c (renamed from pipewire/client/proxy.c) | 6 | ||||
-rw-r--r-- | src/pipewire/proxy.h (renamed from pipewire/client/proxy.h) | 6 | ||||
-rw-r--r-- | src/pipewire/remote.c (renamed from pipewire/server/remote.c) | 24 | ||||
-rw-r--r-- | src/pipewire/remote.h (renamed from pipewire/server/remote.h) | 20 | ||||
-rw-r--r-- | src/pipewire/resource.c (renamed from pipewire/server/resource.c) | 6 | ||||
-rw-r--r-- | src/pipewire/resource.h (renamed from pipewire/server/resource.h) | 6 | ||||
-rw-r--r-- | src/pipewire/rtkit.c (renamed from pipewire/client/rtkit.c) | 2 | ||||
-rw-r--r-- | src/pipewire/rtkit.h (renamed from pipewire/client/rtkit.h) | 0 | ||||
-rw-r--r-- | src/pipewire/sig.h (renamed from pipewire/client/sig.h) | 0 | ||||
-rw-r--r-- | src/pipewire/stream.c (renamed from pipewire/client/stream.c) | 17 | ||||
-rw-r--r-- | src/pipewire/stream.h (renamed from pipewire/client/stream.h) | 2 | ||||
-rw-r--r-- | src/pipewire/thread-loop.c (renamed from pipewire/client/thread-loop.c) | 0 | ||||
-rw-r--r-- | src/pipewire/thread-loop.h (renamed from pipewire/client/thread-loop.h) | 2 | ||||
-rw-r--r-- | src/pipewire/transport.c (renamed from pipewire/client/transport.c) | 4 | ||||
-rw-r--r-- | src/pipewire/transport.h (renamed from pipewire/client/transport.h) | 4 | ||||
-rw-r--r-- | src/pipewire/type.c (renamed from pipewire/client/type.c) | 6 | ||||
-rw-r--r-- | src/pipewire/type.h (renamed from pipewire/client/type.h) | 4 | ||||
-rw-r--r-- | src/pipewire/utils.c (renamed from pipewire/client/utils.c) | 6 | ||||
-rw-r--r-- | src/pipewire/utils.h (renamed from pipewire/client/utils.h) | 0 | ||||
-rw-r--r-- | src/pipewire/work-queue.c (renamed from pipewire/server/work-queue.c) | 4 | ||||
-rw-r--r-- | src/pipewire/work-queue.h (renamed from pipewire/server/work-queue.h) | 2 | ||||
-rw-r--r-- | src/server/meson.build (renamed from pipewire/server/meson.build) | 0 | ||||
-rw-r--r-- | src/tools/meson.build (renamed from pipewire/tools/meson.build) | 2 | ||||
-rw-r--r-- | src/tools/pipewire-monitor.c (renamed from pipewire/tools/pipewire-monitor.c) | 9 |
130 files changed, 368 insertions, 340 deletions
diff --git a/Makefile.in b/Makefile.in index e6050354..ad646b7a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -10,13 +10,13 @@ clean: run: SPA_PLUGIN_DIR=build/spa/plugins \ PIPEWIRE_MODULE_DIR=build \ - PIPEWIRE_CONFIG_FILE=build/pipewire/daemon/pipewire.conf \ - build/pipewire/daemon/pipewire + PIPEWIRE_CONFIG_FILE=build/src/daemon/pipewire.conf \ + build/src/daemon/pipewire monitor: SPA_PLUGIN_DIR=build/spa/plugins \ - PIPEWIRE_MODULE_DIR=build/pipewire/modules/ \ - build/pipewire/tools/pipewire-monitor + PIPEWIRE_MODULE_DIR=build/src/modules/ \ + build/src/tools/pipewire-monitor dist: git archive --prefix=pipewire-@VERSION@/ -o pipewire-@VERSION@.tar.gz @TAG@ diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 9dc3d390..ca0072a7 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -780,8 +780,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = "@top_srcdir@/pipewire/client/" \ - "@top_srcdir@/pipewire/server/" +INPUT = "@top_srcdir@/src/" # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -854,8 +853,8 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = "@top_srcdir@/pipewire/tools" \ - "@top_srcdir@/pipewire/examples" +EXAMPLE_PATH = "@top_srcdir@/src/tools" \ + "@top_srcdir@/src/examples" # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and diff --git a/meson.build b/meson.build index 71396659..f56c7ae3 100644 --- a/meson.build +++ b/meson.build @@ -121,6 +121,7 @@ configure_file(input : 'config.h.meson', configuration : cdata) configinc = include_directories('.') +pipewire_inc = include_directories('src') makedata = configuration_data() makedata.set('VERSION', pipewire_version) @@ -152,7 +153,7 @@ gst_dep = [dependency('gstreamer-1.0'), dependency('gstreamer-allocators-1.0'),] subdir('spa') -subdir('pipewire') +subdir('src') subdir('pkgconfig') doxygen = find_program('doxygen', required: false) diff --git a/pipewire.spec b/pipewire.spec index 87e914c7..d2e7fe18 100644 --- a/pipewire.spec +++ b/pipewire.spec @@ -13,7 +13,7 @@ Name: pipewire Summary: Media Sharing Server -Version: 0.1.2 +Version: 0.1.2.1 Release: 1%{?snap:.%{snap}git%{shortcommit}}%{?dist} License: LGPLv2+ URL: http://www.freedesktop.org/wiki/Software/PipeWire @@ -108,7 +108,6 @@ exit 0 %{_datadir}/doc/pipewire/html %{_bindir}/pipewire %{_libdir}/libpipewire-%{majorminor}.so.* -%{_libdir}/libpipewirecore-%{majorminor}.so.* %{_libdir}/libspa-lib.so.* %{_libdir}/gstreamer-1.0/libgstpipewire.* %{_libdir}/pipewire-%{majorminor}/ @@ -124,12 +123,10 @@ exit 0 %files devel %{_libdir}/libpipewire-%{majorminor}.so -%{_libdir}/libpipewirecore-%{majorminor}.so %{_libdir}/libspa-lib.so %{_includedir}/pipewire/ %{_includedir}/spa/ %{_libdir}/pkgconfig/libpipewire-%{majorminor}.pc -%{_libdir}/pkgconfig/libpipewirecore-%{majorminor}.pc %{_libdir}/pkgconfig/libspa-%{majorminor}.pc %files utils diff --git a/pkgconfig/libpipewire.pc.in b/pkgconfig/libpipewire.pc.in index 7087f53a..ca302fbe 100644 --- a/pkgconfig/libpipewire.pc.in +++ b/pkgconfig/libpipewire.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@/ moduledir=@moduledir@ Name: libpipewire -Description: PipeWire Client Interface +Description: PipeWire Interface Version: @VERSION@ Libs: -L${libdir} -lpipewire-@PIPEWIRE_API_VERSION@ Cflags: -I${includedir} -D_REENTRANT diff --git a/pkgconfig/libpipewirecore.pc.in b/pkgconfig/libpipewirecore.pc.in deleted file mode 100644 index f16198c2..00000000 --- a/pkgconfig/libpipewirecore.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/ -moduledir=@moduledir@ - -Name: libpipewirecore -Description: PipeWire Core -Version: @VERSION@ -Libs: -L${libdir} -lpipewirecore-@PIPEWIRE_API_VERSION@ -Cflags: -I${includedir} -D_REENTRANT diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build index a919ab72..f3159bc4 100644 --- a/pkgconfig/meson.build +++ b/pkgconfig/meson.build @@ -11,7 +11,6 @@ pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir')) pkg_files = [ 'libpipewire', - 'libpipewirecore', 'libspa', ] diff --git a/pipewire/.gitignore b/src/.gitignore index e69de29b..e69de29b 100644 --- a/pipewire/.gitignore +++ b/src/.gitignore diff --git a/pipewire/daemon/.gitignore b/src/daemon/.gitignore index 5347568e..5347568e 100644 --- a/pipewire/daemon/.gitignore +++ b/src/daemon/.gitignore diff --git a/pipewire/daemon/daemon-config.c b/src/daemon/daemon-config.c index 3d19204f..290639a3 100644 --- a/pipewire/daemon/daemon-config.c +++ b/src/daemon/daemon-config.c @@ -25,10 +25,10 @@ #include <string.h> #include <errno.h> -#include <pipewire/client/pipewire.h> -#include <pipewire/server/command.h> +#include <pipewire/pipewire.h> +#include <pipewire/command.h> -#include "pipewire/daemon/daemon-config.h" +#include "daemon/daemon-config.h" #define DEFAULT_CONFIG_FILE PIPEWIRE_CONFIG_DIR "/pipewire.conf" diff --git a/pipewire/daemon/daemon-config.h b/src/daemon/daemon-config.h index d4b4b64e..c5f7bdc2 100644 --- a/pipewire/daemon/daemon-config.h +++ b/src/daemon/daemon-config.h @@ -25,7 +25,7 @@ extern "C" { #endif -#include <pipewire/server/core.h> +#include <pipewire/core.h> struct pw_daemon_config { struct spa_list commands; diff --git a/pipewire/daemon/main.c b/src/daemon/main.c index 840552a1..d8c566ce 100644 --- a/pipewire/daemon/main.c +++ b/src/daemon/main.c @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include <pipewire/client/pipewire.h> -#include <pipewire/server/core.h> -#include <pipewire/server/module.h> +#include <pipewire/pipewire.h> +#include <pipewire/core.h> +#include <pipewire/module.h> #include "daemon-config.h" diff --git a/pipewire/daemon/meson.build b/src/daemon/meson.build index 72c616c9..6bd4f31c 100644 --- a/pipewire/daemon/meson.build +++ b/src/daemon/meson.build @@ -26,5 +26,5 @@ executable('pipewire', install: true, c_args : pipewire_c_args, include_directories : [configinc, spa_inc], - dependencies : [pipewire_dep, pipewirecore_dep], + dependencies : [pipewire_dep], ) diff --git a/pipewire/daemon/pipewire-system.conf b/src/daemon/pipewire-system.conf index 9ea2adec..9ea2adec 100644 --- a/pipewire/daemon/pipewire-system.conf +++ b/src/daemon/pipewire-system.conf diff --git a/pipewire/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in index dd547514..dd547514 100644 --- a/pipewire/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in diff --git a/pipewire/daemon/pipewire.desktop.in b/src/daemon/pipewire.desktop.in index 7ff72c55..7ff72c55 100644 --- a/pipewire/daemon/pipewire.desktop.in +++ b/src/daemon/pipewire.desktop.in diff --git a/pipewire/examples/local-v4l2.c b/src/examples/local-v4l2.c index 5698aa84..5dc3569c 100644 --- a/pipewire/examples/local-v4l2.c +++ b/src/examples/local-v4l2.c @@ -27,13 +27,13 @@ #include <spa/video/format-utils.h> #include <spa/format-builder.h> #include <spa/props.h> - -#include <pipewire/client/pipewire.h> -#include <pipewire/client/sig.h> -#include <pipewire/server/module.h> -#include <pipewire/server/node-factory.h> #include <spa/lib/debug.h> +#include <pipewire/pipewire.h> +#include <pipewire/sig.h> +#include <pipewire/module.h> +#include <pipewire/node-factory.h> + struct type { uint32_t format; uint32_t props; @@ -475,7 +475,6 @@ static void make_nodes(struct data *data) pw_node_export(data->node); factory = pw_core_find_node_factory(data->core, "spa-node-factory"); - props = pw_properties_new("spa.library.name", "v4l2/libspa-v4l2", "spa.factory.name", "v4l2-source", NULL); data->v4l2 = pw_node_factory_create_node(factory, NULL, "v4l2-source", props); diff --git a/pipewire/examples/meson.build b/src/examples/meson.build index a4653a9f..e087f98d 100644 --- a/pipewire/examples/meson.build +++ b/src/examples/meson.build @@ -1,18 +1,18 @@ executable('video-src', 'video-src.c', install: false, - dependencies : [pipewirecore_dep], + dependencies : [pipewire_dep], ) if sdl_dep.found() executable('video-play', 'video-play.c', install: false, - dependencies : [pipewire_dep,pipewirecore_dep, sdl_dep], + dependencies : [pipewire_dep, sdl_dep], ) executable('local-v4l2', 'local-v4l2.c', install: false, - dependencies : [pipewire_dep,pipewirecore_dep, sdl_dep], + dependencies : [pipewire_dep, sdl_dep], ) endif diff --git a/pipewire/examples/video-play.c b/src/examples/video-play.c index 24779410..e47d8986 100644 --- a/pipewire/examples/video-play.c +++ b/src/examples/video-play.c @@ -27,11 +27,11 @@ #include <spa/video/format-utils.h> #include <spa/format-builder.h> #include <spa/props.h> - -#include <pipewire/client/pipewire.h> -#include <pipewire/client/sig.h> #include <spa/lib/debug.h> +#include <pipewire/pipewire.h> +#include <pipewire/sig.h> + struct type { uint32_t format; uint32_t props; @@ -294,12 +294,12 @@ static void on_state_changed(struct pw_listener *listener, struct pw_remote *rem struct data *data = SPA_CONTAINER_OF(listener, struct data, on_state_changed); switch (remote->state) { - case PW_CONTEXT_STATE_ERROR: + case PW_REMOTE_STATE_ERROR: printf("remote error: %s\n", remote->error); data->running = false; break; - case PW_CONTEXT_STATE_CONNECTED: + case PW_REMOTE_STATE_CONNECTED: { const struct spa_format *formats[1]; uint8_t buffer[1024]; diff --git a/pipewire/examples/video-src.c b/src/examples/video-src.c index ebcd16d3..a4d7234c 100644 --- a/pipewire/examples/video-src.c +++ b/src/examples/video-src.c @@ -27,11 +27,11 @@ #include <spa/video/format-utils.h> #include <spa/format-builder.h> #include <spa/props.h> - -#include <pipewire/client/pipewire.h> -#include <pipewire/client/sig.h> #include <spa/lib/debug.h> +#include <pipewire/pipewire.h> +#include <pipewire/sig.h> + struct type { uint32_t format; uint32_t props; diff --git a/pipewire/extensions/client-node.h b/src/extensions/client-node.h index 445d9de3..445d9de3 100644 --- a/pipewire/extensions/client-node.h +++ b/src/extensions/client-node.h diff --git a/pipewire/extensions/meson.build b/src/extensions/meson.build index ca784be2..ca784be2 100644 --- a/pipewire/extensions/meson.build +++ b/src/extensions/meson.build diff --git a/pipewire/gst/gstpipewire.c b/src/gst/gstpipewire.c index b77640fd..b77640fd 100644 --- a/pipewire/gst/gstpipewire.c +++ b/src/gst/gstpipewire.c diff --git a/pipewire/gst/gstpipewireclock.c b/src/gst/gstpipewireclock.c index a82631ef..a82631ef 100644 --- a/pipewire/gst/gstpipewireclock.c +++ b/src/gst/gstpipewireclock.c diff --git a/pipewire/gst/gstpipewireclock.h b/src/gst/gstpipewireclock.h index 4832dbeb..3020c83c 100644 --- a/pipewire/gst/gstpipewireclock.h +++ b/src/gst/gstpipewireclock.h @@ -22,7 +22,7 @@ #include <gst/gst.h> -#include <pipewire/client/pipewire.h> +#include <pipewire/pipewire.h> G_BEGIN_DECLS diff --git a/pipewire/gst/gstpipewiredeviceprovider.c b/src/gst/gstpipewiredeviceprovider.c index 1af78463..1af78463 100644 --- a/pipewire/gst/gstpipewiredeviceprovider.c +++ b/src/gst/gstpipewiredeviceprovider.c diff --git a/pipewire/gst/gstpipewiredeviceprovider.h b/src/gst/gstpipewiredeviceprovider.h index a4ad23a1..462d98c3 100644 --- a/pipewire/gst/gstpipewiredeviceprovider.h +++ b/src/gst/gstpipewiredeviceprovider.h @@ -28,7 +28,7 @@ #include "config.h" #endif -#include <pipewire/client/pipewire.h> +#include <pipewire/pipewire.h> #include <gst/gst.h> diff --git a/pipewire/gst/gstpipewireformat.c b/src/gst/gstpipewireformat.c index 346d35cb..346d35cb 100644 --- a/pipewire/gst/gstpipewireformat.c +++ b/src/gst/gstpipewireformat.c diff --git a/pipewire/gst/gstpipewireformat.h b/src/gst/gstpipewireformat.h index e5cc0776..e5cc0776 100644 --- a/pipewire/gst/gstpipewireformat.h +++ b/src/gst/gstpipewireformat.h diff --git a/pipewire/gst/gstpipewirepool.c b/src/gst/gstpipewirepool.c index eb36f957..eb36f957 100644 --- a/pipewire/gst/gstpipewirepool.c +++ b/src/gst/gstpipewirepool.c diff --git a/pipewire/gst/gstpipewirepool.h b/src/gst/gstpipewirepool.h index 617eb8b7..80188f71 100644 --- a/pipewire/gst/gstpipewirepool.h +++ b/src/gst/gstpipewirepool.h @@ -22,7 +22,7 @@ #include <gst/gst.h> -#include <pipewire/client/pipewire.h> +#include <pipewire/pipewire.h> G_BEGIN_DECLS diff --git a/pipewire/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c index 2d61fe8d..2d61fe8d 100644 --- a/pipewire/gst/gstpipewiresink.c +++ b/src/gst/gstpipewiresink.c diff --git a/pipewire/gst/gstpipewiresink.h b/src/gst/gstpipewiresink.h index 85ba863e..d4287d6f 100644 --- a/pipewire/gst/gstpipewiresink.h +++ b/src/gst/gstpipewiresink.h @@ -23,8 +23,8 @@ #include <gst/gst.h> #include <gst/base/gstbasesink.h> -#include <pipewire/client/pipewire.h> -#include <pipewire/gst/gstpipewirepool.h> +#include <pipewire/pipewire.h> +#include <gst/gstpipewirepool.h> G_BEGIN_DECLS diff --git a/pipewire/gst/gstpipewiresrc.c b/src/gst/gstpipewiresrc.c index ae521862..0395b19f 100644 --- a/pipewire/gst/gstpipewiresrc.c +++ b/src/gst/gstpipewiresrc.c @@ -1016,7 +1016,8 @@ gst_pipewire_src_open (GstPipeWireSrc * pwsrc) goto mainloop_failed; pw_thread_loop_lock (pwsrc->main_loop); - pwsrc->remote = pw_remote_new (pwsrc->core, NULL); + if ((pwsrc->remote = pw_remote_new (pwsrc->core, NULL)) == NULL) + goto no_remote; pw_signal_add (&pwsrc->remote->state_changed, &pwsrc->remote_state_changed, on_remote_state_changed); @@ -1042,7 +1043,8 @@ gst_pipewire_src_open (GstPipeWireSrc * pwsrc) props = NULL; } - pwsrc->stream = pw_stream_new (pwsrc->remote, pwsrc->client_name, props); + if ((pwsrc->stream = pw_stream_new (pwsrc->remote, pwsrc->client_name, props)) == NULL) + goto no_stream; pw_signal_add (&pwsrc->stream->state_changed, &pwsrc->stream_state_changed, on_state_changed); pw_signal_add (&pwsrc->stream->format_changed, &pwsrc->stream_format_changed, on_format_changed); @@ -1061,11 +1063,23 @@ mainloop_failed: GST_ELEMENT_ERROR (pwsrc, RESOURCE, FAILED, ("error starting mainloop"), (NULL)); return FALSE; } +no_remote: + { + GST_ELEMENT_ERROR (pwsrc, RESOURCE, FAILED, ("can't create remote"), (NULL)); + pw_thread_loop_unlock (pwsrc->main_loop); + return FALSE; + } connect_error: { pw_thread_loop_unlock (pwsrc->main_loop); return FALSE; } +no_stream: + { + GST_ELEMENT_ERROR (pwsrc, RESOURCE, FAILED, ("can't create stream"), (NULL)); + pw_thread_loop_unlock (pwsrc->main_loop); + return FALSE; + } } static void diff --git a/pipewire/gst/gstpipewiresrc.h b/src/gst/gstpipewiresrc.h index 265dd309..f888bcca 100644 --- a/pipewire/gst/gstpipewiresrc.h +++ b/src/gst/gstpipewiresrc.h @@ -23,7 +23,7 @@ #include <gst/gst.h> #include <gst/base/gstpushsrc.h> -#include <pipewire/client/pipewire.h> +#include <pipewire/pipewire.h> G_BEGIN_DECLS diff --git a/pipewire/gst/meson.build b/src/gst/meson.build index b1569fd5..cfc604d6 100644 --- a/pipewire/gst/meson.build +++ b/src/gst/meson.build @@ -25,7 +25,7 @@ pipewire_gst = shared_library('gstpipewire', pipewire_gst_sources, c_args : pipewire_gst_c_args, include_directories : [configinc, spa_inc], - dependencies : [gobject_dep, glib_dep, gio_dep, gst_dep, pipewire_dep, pipewirecore_dep], + dependencies : [gobject_dep, glib_dep, gio_dep, gst_dep, pipewire_dep], install : true, install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')), ) diff --git a/pipewire/meson.build b/src/meson.build index c19cc088..c9032de4 100644 --- a/pipewire/meson.build +++ b/src/meson.build @@ -1,7 +1,6 @@ -subdir('client') +subdir('pipewire') subdir('extensions') -subdir('server') subdir('daemon') subdir('tools') subdir('modules') diff --git a/pipewire/modules/meson.build b/src/modules/meson.build index b32c4a5e..de3be9de 100644 --- a/pipewire/modules/meson.build +++ b/src/modules/meson.build @@ -11,7 +11,7 @@ pipewire_module_flatpak = shared_library('pipewire-module-flatpak', [ 'module-fl link_with : spalib, install : true, install_dir : modules_install_dir, - dependencies : [dbus_dep, mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [dbus_dep, mathlib, dl_lib, pipewire_dep], ) pipewire_module_autolink = shared_library('pipewire-module-autolink', [ 'module-autolink.c' ], @@ -20,7 +20,7 @@ pipewire_module_autolink = shared_library('pipewire-module-autolink', [ 'module- link_with : spalib, install : true, install_dir : modules_install_dir, - dependencies : [mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [mathlib, dl_lib, pipewire_dep], ) pipewire_module_mixer = shared_library('pipewire-module-mixer', @@ -30,7 +30,7 @@ pipewire_module_mixer = shared_library('pipewire-module-mixer', link_with : spalib, install : true, install_dir : modules_install_dir, - dependencies : [mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [mathlib, dl_lib, pipewire_dep], ) pipewire_module_client_node = shared_library('pipewire-module-client-node', @@ -44,7 +44,7 @@ pipewire_module_client_node = shared_library('pipewire-module-client-node', link_with : spalib, install : true, install_dir : modules_install_dir, - dependencies : [mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [mathlib, dl_lib, pipewire_dep], ) #pipewire_module_protocol_dbus = shared_library('pipewire-module-protocol-dbus', [ 'module-protocol-dbus.c', gdbus_target ], @@ -53,7 +53,7 @@ pipewire_module_client_node = shared_library('pipewire-module-client-node', # link_with : spalib, # install : true, # install_dir : modules_install_dir, -# dependencies : [glib_dep, gio_dep, mathlib, dl_lib, pipewire_dep, pipewirecore_dep], +# dependencies : [glib_dep, gio_dep, mathlib, dl_lib, pipewire_dep], #) pipewire_module_protocol_native = shared_library('pipewire-module-protocol-native', @@ -65,20 +65,19 @@ pipewire_module_protocol_native = shared_library('pipewire-module-protocol-nativ link_with : spalib, install : true, install_dir : modules_install_dir, - dependencies : [mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [mathlib, dl_lib, pipewire_dep], ) if jack_dep.found() pipewire_module_jack = shared_library('pipewire-module-jack', [ 'module-jack.c', - 'module-jack/shm.c', - 'module-jack/jack-node.c' ], + 'module-jack/shm.c' ], c_args : pipewire_module_c_args, include_directories : [configinc, spa_inc], link_with : spalib, install : true, install_dir : modules_install_dir, - dependencies : [jack_dep, mathlib, dl_lib, rt_lib, pipewire_dep, pipewirecore_dep], + dependencies : [jack_dep, mathlib, dl_lib, rt_lib, pipewire_dep], ) endif @@ -88,5 +87,5 @@ pipewire_module_suspend_on_idle = shared_library('pipewire-module-suspend-on-idl link_with : spalib, install : true, install_dir : modules_install_dir, - dependencies : [mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [mathlib, dl_lib, pipewire_dep], ) diff --git a/pipewire/modules/module-autolink.c b/src/modules/module-autolink.c index fd9076fa..edcb145b 100644 --- a/pipewire/modules/module-autolink.c +++ b/src/modules/module-autolink.c @@ -23,9 +23,9 @@ #include "config.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/server/core.h" -#include "pipewire/server/module.h" +#include "pipewire/interfaces.h" +#include "pipewire/core.h" +#include "pipewire/module.h" struct impl { struct pw_core *core; diff --git a/pipewire/modules/module-client-node.c b/src/modules/module-client-node.c index e32fb866..d1505068 100644 --- a/pipewire/modules/module-client-node.c +++ b/src/modules/module-client-node.c @@ -24,9 +24,10 @@ #include "config.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/server/core.h" -#include "pipewire/server/module.h" +#include "pipewire/interfaces.h" +#include "pipewire/core.h" +#include "pipewire/module.h" + #include "module-client-node/client-node.h" struct pw_protocol *pw_protocol_native_ext_client_node_init(void); diff --git a/pipewire/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c index 53338cbe..2db5c53b 100644 --- a/pipewire/modules/module-client-node/client-node.c +++ b/src/modules/module-client-node/client-node.c @@ -32,12 +32,12 @@ #include "spa/format-builder.h" #include "spa/lib/format.h" -#include "pipewire/client/pipewire.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/client/transport.h" +#include "pipewire/pipewire.h" +#include "pipewire/interfaces.h" +#include "pipewire/transport.h" -#include "pipewire/server/core.h" -#include "pipewire/modules/spa/spa-node.h" +#include "pipewire/core.h" +#include "modules/spa/spa-node.h" #include "client-node.h" /** \cond */ diff --git a/pipewire/modules/module-client-node/client-node.h b/src/modules/module-client-node/client-node.h index b64f2e6a..1dcaec8c 100644 --- a/pipewire/modules/module-client-node/client-node.h +++ b/src/modules/module-client-node/client-node.h @@ -20,8 +20,8 @@ #ifndef __PIPEWIRE_CLIENT_NODE_H__ #define __PIPEWIRE_CLIENT_NODE_H__ -#include <pipewire/server/node.h> -#include <pipewire/extensions/client-node.h> +#include <pipewire/node.h> +#include <extensions/client-node.h> #ifdef __cplusplus extern "C" { diff --git a/pipewire/modules/module-client-node/protocol-native.c b/src/modules/module-client-node/protocol-native.c index 2a6cf35b..d7933f77 100644 --- a/pipewire/modules/module-client-node/protocol-native.c +++ b/src/modules/module-client-node/protocol-native.c @@ -20,14 +20,14 @@ #include <errno.h> #include "spa/pod-iter.h" -#include "pipewire/client/pipewire.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/client/protocol.h" -#include "pipewire/server/client.h" -#include "pipewire/extensions/client-node.h" +#include "pipewire/pipewire.h" +#include "pipewire/interfaces.h" +#include "pipewire/protocol.h" +#include "pipewire/client.h" +#include "extensions/client-node.h" -#include "pipewire/modules/module-protocol-native/connection.h" +#include "modules/module-protocol-native/connection.h" /** \cond */ diff --git a/pipewire/modules/module-flatpak.c b/src/modules/module-flatpak.c index 6cca8e41..86d7f7de 100644 --- a/pipewire/modules/module-flatpak.c +++ b/src/modules/module-flatpak.c @@ -29,11 +29,11 @@ #include <dbus/dbus.h> -#include "pipewire/client/interfaces.h" -#include "pipewire/client/utils.h" +#include "pipewire/interfaces.h" +#include "pipewire/utils.h" -#include "pipewire/server/core.h" -#include "pipewire/server/module.h" +#include "pipewire/core.h" +#include "pipewire/module.h" struct impl { struct pw_core *core; diff --git a/pipewire/modules/module-jack.c b/src/modules/module-jack.c index fd52c55c..49100beb 100644 --- a/pipewire/modules/module-jack.c +++ b/src/modules/module-jack.c @@ -34,25 +34,25 @@ #include "config.h" -#include "pipewire/client/pipewire.h" -#include "pipewire/client/log.h" -#include "pipewire/client/interfaces.h" - -#include "pipewire/server/core.h" -#include "pipewire/server/node.h" -#include "pipewire/server/module.h" -#include "pipewire/server/client.h" -#include "pipewire/server/resource.h" -#include "pipewire/server/link.h" -#include "pipewire/server/node-factory.h" -#include "pipewire/server/data-loop.h" -#include "pipewire/server/main-loop.h" - -#include "pipewire/modules/module-jack/defs.h" -#include "pipewire/modules/module-jack/shm.h" -#include "pipewire/modules/module-jack/shared.h" -#include "pipewire/modules/module-jack/synchro.h" -#include "pipewire/modules/module-jack/server.h" +#include "pipewire/pipewire.h" +#include "pipewire/log.h" +#include "pipewire/interfaces.h" + +#include "pipewire/core.h" +#include "pipewire/node.h" +#include "pipewire/module.h" +#include "pipewire/client.h" +#include "pipewire/resource.h" +#include "pipewire/link.h" +#include "pipewire/node-factory.h" +#include "pipewire/data-loop.h" +#include "pipewire/main-loop.h" + +#include "modules/module-jack/defs.h" +#include "modules/module-jack/shm.h" +#include "modules/module-jack/shared.h" +#include "modules/module-jack/synchro.h" +#include "modules/module-jack/server.h" #ifndef UNIX_PATH_MAX #define UNIX_PATH_MAX 108 diff --git a/pipewire/modules/module-jack/defs.h b/src/modules/module-jack/defs.h index 5275d191..5ecb9724 100644 --- a/pipewire/modules/module-jack/defs.h +++ b/src/modules/module-jack/defs.h @@ -17,7 +17,7 @@ * Boston, MA 02110-1301, USA. */ -#include "pipewire/client/log.h" +#include "pipewire/log.h" #define USE_POSIX_SHM #undef JACK_MONITOR diff --git a/pipewire/modules/module-jack/server.h b/src/modules/module-jack/server.h index c5f6c0c9..c5f6c0c9 100644 --- a/pipewire/modules/module-jack/server.h +++ b/src/modules/module-jack/server.h diff --git a/pipewire/modules/module-jack/shared.h b/src/modules/module-jack/shared.h index 2d4cfaf8..2d4cfaf8 100644 --- a/pipewire/modules/module-jack/shared.h +++ b/src/modules/module-jack/shared.h diff --git a/pipewire/modules/module-jack/shm.c b/src/modules/module-jack/shm.c index c3989bcf..c3989bcf 100644 --- a/pipewire/modules/module-jack/shm.c +++ b/src/modules/module-jack/shm.c diff --git a/pipewire/modules/module-jack/shm.h b/src/modules/module-jack/shm.h index 90336eea..90336eea 100644 --- a/pipewire/modules/module-jack/shm.h +++ b/src/modules/module-jack/shm.h diff --git a/pipewire/modules/module-jack/synchro.h b/src/modules/module-jack/synchro.h index e58a368d..e58a368d 100644 --- a/pipewire/modules/module-jack/synchro.h +++ b/src/modules/module-jack/synchro.h diff --git a/pipewire/modules/module-mixer.c b/src/modules/module-mixer.c index 12b9b43d..6812c2f5 100644 --- a/pipewire/modules/module-mixer.c +++ b/src/modules/module-mixer.c @@ -24,9 +24,9 @@ #include "config.h" -#include "pipewire/server/core.h" -#include "pipewire/server/module.h" -#include "pipewire/modules/spa/spa-node.h" +#include "pipewire/core.h" +#include "pipewire/module.h" +#include "modules/spa/spa-node.h" #define AUDIOMIXER_LIB "audiomixer/libspa-audiomixer" diff --git a/pipewire/modules/module-protocol-dbus.c b/src/modules/module-protocol-dbus.c index 2134aa04..2134aa04 100644 --- a/pipewire/modules/module-protocol-dbus.c +++ b/src/modules/module-protocol-dbus.c diff --git a/pipewire/modules/module-protocol-native.c b/src/modules/module-protocol-native.c index 79710544..6e9b5d20 100644 --- a/pipewire/modules/module-protocol-native.c +++ b/src/modules/module-protocol-native.c @@ -29,20 +29,20 @@ #include "config.h" -#include "pipewire/client/connection.h" -#include "pipewire/client/pipewire.h" -#include "pipewire/client/log.h" -#include "pipewire/client/interfaces.h" - -#include "pipewire/server/core.h" -#include "pipewire/server/node.h" -#include "pipewire/server/module.h" -#include "pipewire/server/client.h" -#include "pipewire/server/resource.h" -#include "pipewire/server/link.h" -#include "pipewire/server/node-factory.h" -#include "pipewire/server/data-loop.h" -#include "pipewire/server/main-loop.h" +#include "pipewire/pipewire.h" +#include "pipewire/log.h" +#include "pipewire/interfaces.h" +#include "pipewire/core.h" +#include "pipewire/node.h" +#include "pipewire/module.h" +#include "pipewire/client.h" +#include "pipewire/resource.h" +#include "pipewire/link.h" +#include "pipewire/node-factory.h" +#include "pipewire/data-loop.h" +#include "pipewire/main-loop.h" + +#include "modules/module-protocol-native/connection.h" #ifndef UNIX_PATH_MAX #define UNIX_PATH_MAX 108 diff --git a/pipewire/modules/module-protocol-native/connection.c b/src/modules/module-protocol-native/connection.c index 6cc5731e..073cc836 100644 --- a/pipewire/modules/module-protocol-native/connection.c +++ b/src/modules/module-protocol-native/connection.c @@ -27,7 +27,8 @@ #include <spa/lib/debug.h> -#include <pipewire/client/pipewire.h> +#include <pipewire/pipewire.h> + #include "connection.h" /** \cond */ diff --git a/pipewire/modules/module-protocol-native/connection.h b/src/modules/module-protocol-native/connection.h index 1601a0b8..7f213449 100644 --- a/pipewire/modules/module-protocol-native/connection.h +++ b/src/modules/module-protocol-native/connection.h @@ -25,7 +25,7 @@ extern "C" { #endif #include <spa/defs.h> -#include <pipewire/client/sig.h> +#include <pipewire/sig.h> /** \class pw_connection * diff --git a/pipewire/modules/module-protocol-native/protocol-native.c b/src/modules/module-protocol-native/protocol-native.c index 2cac84a7..225fcb4d 100644 --- a/pipewire/modules/module-protocol-native/protocol-native.c +++ b/src/modules/module-protocol-native/protocol-native.c @@ -20,11 +20,11 @@ #include <errno.h> #include "spa/pod-iter.h" -#include "pipewire/client/pipewire.h" -#include "pipewire/client/protocol.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/server/resource.h" +#include "pipewire/pipewire.h" +#include "pipewire/protocol.h" +#include "pipewire/interfaces.h" +#include "pipewire/resource.h" #include "connection.h" diff --git a/pipewire/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c index 8a4844ae..208a3b5e 100644 --- a/pipewire/modules/module-suspend-on-idle.c +++ b/src/modules/module-suspend-on-idle.c @@ -23,8 +23,8 @@ #include "config.h" -#include "pipewire/server/core.h" -#include "pipewire/server/module.h" +#include "pipewire/core.h" +#include "pipewire/module.h" struct impl { struct pw_core *core; diff --git a/pipewire/modules/spa/meson.build b/src/modules/spa/meson.build index ee50aecb..af49555f 100644 --- a/pipewire/modules/spa/meson.build +++ b/src/modules/spa/meson.build @@ -10,7 +10,7 @@ pipewire_module_spa_monitor = shared_library('pipewire-module-spa-monitor', link_with : spalib, install : true, install_dir : '@0@/pipewire-0.1'.format(get_option('libdir')), - dependencies : [mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [mathlib, dl_lib, pipewire_dep], ) pipewire_module_spa_node = shared_library('pipewire-module-spa-node', @@ -20,7 +20,7 @@ pipewire_module_spa_node = shared_library('pipewire-module-spa-node', link_with : spalib, install : true, install_dir : '@0@/pipewire-0.1'.format(get_option('libdir')), - dependencies : [mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [mathlib, dl_lib, pipewire_dep], ) pipewire_module_spa_node_factory = shared_library('pipewire-module-spa-node-factory', @@ -30,5 +30,5 @@ pipewire_module_spa_node_factory = shared_library('pipewire-module-spa-node-fact link_with : spalib, install : true, install_dir : '@0@/pipewire-0.1'.format(get_option('libdir')), - dependencies : [mathlib, dl_lib, pipewire_dep, pipewirecore_dep], + dependencies : [mathlib, dl_lib, pipewire_dep], ) diff --git a/pipewire/modules/spa/module-monitor.c b/src/modules/spa/module-monitor.c index 47df5ab9..f3f2b248 100644 --- a/pipewire/modules/spa/module-monitor.c +++ b/src/modules/spa/module-monitor.c @@ -27,9 +27,9 @@ #include <spa/lib/props.h> -#include <pipewire/client/utils.h> -#include <pipewire/server/core.h> -#include <pipewire/server/module.h> +#include <pipewire/utils.h> +#include <pipewire/core.h> +#include <pipewire/module.h> #include "spa-monitor.h" diff --git a/pipewire/modules/spa/module-node-factory.c b/src/modules/spa/module-node-factory.c index 2acdf768..29a50f2b 100644 --- a/pipewire/modules/spa/module-node-factory.c +++ b/src/modules/spa/module-node-factory.c @@ -24,9 +24,10 @@ #include "config.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/server/core.h" -#include "pipewire/server/module.h" +#include "pipewire/interfaces.h" +#include "pipewire/core.h" +#include "pipewire/module.h" + #include "spa-node.h" struct impl { diff --git a/pipewire/modules/spa/module-node.c b/src/modules/spa/module-node.c index 0ef3054c..d44fd1ba 100644 --- a/pipewire/modules/spa/module-node.c +++ b/src/modules/spa/module-node.c @@ -27,9 +27,9 @@ #include <spa/lib/props.h> -#include <pipewire/client/utils.h> -#include <pipewire/server/core.h> -#include <pipewire/server/module.h> +#include <pipewire/utils.h> +#include <pipewire/core.h> +#include <pipewire/module.h> #include "spa-monitor.h" #include "spa-node.h" diff --git a/pipewire/modules/spa/spa-monitor.c b/src/modules/spa/spa-monitor.c index ff1ac1a6..e8850a6c 100644 --- a/pipewire/modules/spa/spa-monitor.c +++ b/src/modules/spa/spa-monitor.c @@ -29,8 +29,9 @@ #include <spa/node.h> #include <spa/monitor.h> #include <spa/pod-iter.h> -#include <pipewire/client/log.h> -#include <pipewire/server/node.h> + +#include <pipewire/log.h> +#include <pipewire/node.h> #include "spa-monitor.h" #include "spa-node.h" diff --git a/pipewire/modules/spa/spa-monitor.h b/src/modules/spa/spa-monitor.h index d5d738ef..846d16fc 100644 --- a/pipewire/modules/spa/spa-monitor.h +++ b/src/modules/spa/spa-monitor.h @@ -20,9 +20,10 @@ #ifndef __PIPEWIRE_SPA_MONITOR_H__ #define __PIPEWIRE_SPA_MONITOR_H__ -#include <pipewire/server/core.h> #include <spa/monitor.h> +#include <pipewire/core.h> + #ifdef __cplusplus extern "C" { #endif diff --git a/pipewire/modules/spa/spa-node.c b/src/modules/spa/spa-node.c index a3aaf5c1..a3aaf5c1 100644 --- a/pipewire/modules/spa/spa-node.c +++ b/src/modules/spa/spa-node.c diff --git a/pipewire/modules/spa/spa-node.h b/src/modules/spa/spa-node.h index e4cf1205..35eba6a2 100644 --- a/pipewire/modules/spa/spa-node.h +++ b/src/modules/spa/spa-node.h @@ -20,8 +20,8 @@ #ifndef __PIPEWIRE_SPA_NODE_H__ #define __PIPEWIRE_SPA_NODE_H__ -#include <pipewire/server/core.h> -#include <pipewire/server/node.h> +#include <pipewire/core.h> +#include <pipewire/node.h> #ifdef __cplusplus extern "C" { diff --git a/pipewire/client/.gitignore b/src/pipewire/.gitignore index 7ed96236..7ed96236 100644 --- a/pipewire/client/.gitignore +++ b/src/pipewire/.gitignore diff --git a/pipewire/client/array.h b/src/pipewire/array.h index 1f761161..1f761161 100644 --- a/pipewire/client/array.h +++ b/src/pipewire/array.h diff --git a/pipewire/server/client.c b/src/pipewire/client.c index 21a20f9b..3a509d3b 100644 --- a/pipewire/server/client.c +++ b/src/pipewire/client.c @@ -19,11 +19,11 @@ #include <string.h> -#include "pipewire/client/pipewire.h" -#include "pipewire/client/interfaces.h" +#include "pipewire/pipewire.h" +#include "pipewire/interfaces.h" -#include "pipewire/server/client.h" -#include "pipewire/server/resource.h" +#include "pipewire/client.h" +#include "pipewire/resource.h" /** \cond */ struct impl { diff --git a/pipewire/server/client.h b/src/pipewire/client.h index 4f190a1b..9de1388d 100644 --- a/pipewire/server/client.h +++ b/src/pipewire/client.h @@ -30,12 +30,11 @@ extern "C" { #include <sys/socket.h> -#include <pipewire/client/introspect.h> -#include <pipewire/client/properties.h> -#include <pipewire/client/sig.h> - -#include <pipewire/server/core.h> -#include <pipewire/server/resource.h> +#include <pipewire/core.h> +#include <pipewire/introspect.h> +#include <pipewire/properties.h> +#include <pipewire/sig.h> +#include <pipewire/resource.h> /** \page page_client Client * diff --git a/pipewire/server/command.c b/src/pipewire/command.c index 3684f9e1..a3b6d835 100644 --- a/pipewire/server/command.c +++ b/src/pipewire/command.c @@ -20,9 +20,9 @@ #include <string.h> -#include <pipewire/client/pipewire.h> -#include <pipewire/client/utils.h> -#include <pipewire/server/module.h> +#include <pipewire/pipewire.h> +#include <pipewire/utils.h> +#include <pipewire/module.h> #include "command.h" diff --git a/pipewire/server/command.h b/src/pipewire/command.h index e4c96649..d64f3c69 100644 --- a/pipewire/server/command.h +++ b/src/pipewire/command.h @@ -25,7 +25,7 @@ extern "C" { #endif -#include <pipewire/server/core.h> +#include <pipewire/core.h> /** \class pw_command * diff --git a/pipewire/server/core.c b/src/pipewire/core.c index 68cf459c..c654fa6f 100644 --- a/pipewire/server/core.c +++ b/src/pipewire/core.c @@ -18,13 +18,14 @@ */ #include <time.h> -#include <pipewire/client/pipewire.h> -#include <pipewire/client/interfaces.h> -#include <pipewire/server/core.h> -#include <pipewire/server/data-loop.h> #include <spa/lib/debug.h> #include <spa/format-utils.h> +#include <pipewire/pipewire.h> +#include <pipewire/interfaces.h> +#include <pipewire/core.h> +#include <pipewire/data-loop.h> + /** \cond */ struct global_impl { struct pw_global this; diff --git a/pipewire/server/core.h b/src/pipewire/core.h index da975809..0cccc764 100644 --- a/pipewire/server/core.h +++ b/src/pipewire/core.h @@ -29,15 +29,15 @@ extern "C" { struct pw_global; -#include <pipewire/client/type.h> -#include <pipewire/client/interfaces.h> - -#include <pipewire/server/main-loop.h> -#include <pipewire/server/data-loop.h> -#include <pipewire/server/resource.h> -#include <pipewire/server/node.h> -#include <pipewire/server/link.h> -#include <pipewire/server/node-factory.h> +#include <pipewire/type.h> +#include <pipewire/interfaces.h> + +#include <pipewire/main-loop.h> +#include <pipewire/data-loop.h> +#include <pipewire/resource.h> +#include <pipewire/node.h> +#include <pipewire/link.h> +#include <pipewire/node-factory.h> /** \page page_server_api Server API * diff --git a/pipewire/server/data-loop.c b/src/pipewire/data-loop.c index 8ce18a4c..83da38a6 100644 --- a/pipewire/server/data-loop.c +++ b/src/pipewire/data-loop.c @@ -21,9 +21,9 @@ #include <errno.h> #include <sys/resource.h> -#include "pipewire/client/log.h" -#include "pipewire/client/rtkit.h" -#include "pipewire/server/data-loop.h" +#include "pipewire/log.h" +#include "pipewire/rtkit.h" +#include "pipewire/data-loop.h" /** \cond */ struct impl { diff --git a/pipewire/server/data-loop.h b/src/pipewire/data-loop.h index 31a276d2..64a4c241 100644 --- a/pipewire/server/data-loop.h +++ b/src/pipewire/data-loop.h @@ -24,7 +24,7 @@ extern "C" { #endif -#include <pipewire/client/loop.h> +#include <pipewire/loop.h> /** \class pw_data_loop * diff --git a/pipewire/client/interfaces.h b/src/pipewire/interfaces.h index 660ae414..76aa767b 100644 --- a/pipewire/client/interfaces.h +++ b/src/pipewire/interfaces.h @@ -30,7 +30,7 @@ extern "C" { #include <spa/param-alloc.h> #include <spa/node.h> -#include <pipewire/client/introspect.h> +#include <pipewire/introspect.h> /** * \page page_pipewire_protocol The PipeWire protocol diff --git a/pipewire/client/introspect.c b/src/pipewire/introspect.c index 27c0e913..02e4b811 100644 --- a/pipewire/client/introspect.c +++ b/src/pipewire/introspect.c @@ -19,10 +19,9 @@ #include <string.h> -#include "pipewire/client/pipewire.h" +#include "pipewire/pipewire.h" -#include "pipewire/server/remote.h" -#include "pipewire/client/subscribe.h" +#include "pipewire/remote.h" const char *pw_node_state_as_string(enum pw_node_state state) { diff --git a/pipewire/client/introspect.h b/src/pipewire/introspect.h index fdeef50c..dd0d772e 100644 --- a/pipewire/client/introspect.h +++ b/src/pipewire/introspect.h @@ -27,7 +27,7 @@ extern "C" { #endif -#include <pipewire/client/properties.h> +#include <pipewire/properties.h> /** \enum pw_node_state The different node states \memberof pw_node */ enum pw_node_state { diff --git a/pipewire/server/link.c b/src/pipewire/link.c index d598376d..8ac6ab2a 100644 --- a/pipewire/server/link.c +++ b/src/pipewire/link.c @@ -26,11 +26,10 @@ #include <spa/lib/format.h> #include <spa/lib/props.h> -#include "pipewire/client/pipewire.h" -#include "pipewire/client/interfaces.h" - -#include "pipewire/server/link.h" -#include "pipewire/server/work-queue.h" +#include "pipewire.h" +#include "interfaces.h" +#include "link.h" +#include "work-queue.h" #define MAX_BUFFERS 16 diff --git a/pipewire/server/link.h b/src/pipewire/link.h index 254f674b..276e5376 100644 --- a/pipewire/server/link.h +++ b/src/pipewire/link.h @@ -26,12 +26,12 @@ extern "C" { #include <spa/ringbuffer.h> -#include <pipewire/client/mem.h> -#include <pipewire/client/introspect.h> +#include <pipewire/mem.h> +#include <pipewire/introspect.h> -#include <pipewire/server/core.h> -#include <pipewire/server/port.h> -#include <pipewire/server/main-loop.h> +#include <pipewire/core.h> +#include <pipewire/port.h> +#include <pipewire/main-loop.h> /** \page page_link Link * diff --git a/pipewire/client/log.c b/src/pipewire/log.c index aef93d09..80835281 100644 --- a/pipewire/client/log.c +++ b/src/pipewire/log.c @@ -17,7 +17,7 @@ * Boston, MA 02110-1301, USA. */ -#include <pipewire/client/log.h> +#include <pipewire/log.h> #define DEFAULT_LOG_LEVEL SPA_LOG_LEVEL_ERROR diff --git a/pipewire/client/log.h b/src/pipewire/log.h index 719dbbe6..719dbbe6 100644 --- a/pipewire/client/log.h +++ b/src/pipewire/log.h diff --git a/pipewire/client/loop.c b/src/pipewire/loop.c index 16d9dd00..4fd3c8b5 100644 --- a/pipewire/client/loop.c +++ b/src/pipewire/loop.c @@ -20,9 +20,9 @@ #include <spa/loop.h> #include <spa/type-map.h> -#include <pipewire/client/pipewire.h> -#include <pipewire/client/loop.h> -#include <pipewire/client/log.h> +#include <pipewire/pipewire.h> +#include <pipewire/loop.h> +#include <pipewire/log.h> #define DATAS_SIZE (4096 * 8) diff --git a/pipewire/client/loop.h b/src/pipewire/loop.h index 84c5bb8e..dceb4cfe 100644 --- a/pipewire/client/loop.h +++ b/src/pipewire/loop.h @@ -26,7 +26,7 @@ extern "C" { #include <spa/loop.h> -#include <pipewire/client/sig.h> +#include <pipewire/sig.h> /** \class pw_loop * diff --git a/pipewire/server/main-loop.c b/src/pipewire/main-loop.c index 74806799..f1aca16c 100644 --- a/pipewire/server/main-loop.c +++ b/src/pipewire/main-loop.c @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include "pipewire/client/log.h" -#include "pipewire/server/main-loop.h" +#include "pipewire/log.h" +#include "pipewire/main-loop.h" /** \cond */ struct impl { diff --git a/pipewire/server/main-loop.h b/src/pipewire/main-loop.h index b800db88..be5e279d 100644 --- a/pipewire/server/main-loop.h +++ b/src/pipewire/main-loop.h @@ -24,7 +24,7 @@ extern "C" { #endif -#include <pipewire/client/loop.h> +#include <pipewire/loop.h> /** \class pw_main_loop * diff --git a/pipewire/client/map.h b/src/pipewire/map.h index 8f9cd98e..0f98c7e6 100644 --- a/pipewire/client/map.h +++ b/src/pipewire/map.h @@ -28,8 +28,8 @@ extern "C" { #include <stdio.h> #include <spa/defs.h> -#include <pipewire/client/array.h> -#include <pipewire/client/log.h> +#include <pipewire/array.h> +#include <pipewire/log.h> /** \class pw_map * diff --git a/pipewire/client/mem.c b/src/pipewire/mem.c index b4bd3d95..10d42d33 100644 --- a/pipewire/client/mem.c +++ b/src/pipewire/mem.c @@ -31,8 +31,8 @@ #include <stdlib.h> #include <sys/syscall.h> -#include <pipewire/client/log.h> -#include <pipewire/client/mem.h> +#include <pipewire/log.h> +#include <pipewire/mem.h> /* * No glibc wrappers exist for memfd_create(2), so provide our own. diff --git a/pipewire/client/mem.h b/src/pipewire/mem.h index 0e5240e2..0e5240e2 100644 --- a/pipewire/client/mem.h +++ b/src/pipewire/mem.h diff --git a/pipewire/client/memfd-wrappers.h b/src/pipewire/memfd-wrappers.h index 05958fe4..05958fe4 100644 --- a/pipewire/client/memfd-wrappers.h +++ b/src/pipewire/memfd-wrappers.h diff --git a/pipewire/client/meson.build b/src/pipewire/meson.build index f455d479..782bc1f8 100644 --- a/pipewire/client/meson.build +++ b/src/pipewire/meson.build @@ -1,15 +1,27 @@ pipewire_headers = [ 'array.h', + 'client.h', + 'command.h', + 'core.h', + 'data-loop.h', 'interfaces.h', 'introspect.h', + 'link.h', 'log.h', 'loop.h', + 'main-loop.h', 'map.h', 'mem.h', + 'module.h', + 'node.h', + 'node-factory.h', 'pipewire.h', + 'port.h', 'properties.h', 'protocol.h', 'proxy.h', + 'remote.h', + 'resource.h', 'rtkit.h', 'sig.h', 'stream.h', @@ -17,26 +29,40 @@ pipewire_headers = [ 'transport.h', 'type.h', 'utils.h', + 'work-queue.h', ] pipewire_sources = [ + 'client.c', + 'command.c', + 'core.c', + 'data-loop.c', 'introspect.c', + 'link.c', 'log.c', 'loop.c', + 'main-loop.c', 'mem.c', + 'module.c', + 'node.c', + 'node-factory.c', 'pipewire.c', + 'port.c', 'properties.c', 'protocol.c', 'proxy.c', + 'remote.c', + 'resource.c', 'stream.c', 'rtkit.c', 'thread-loop.c', 'transport.c', 'type.c', 'utils.c', + 'work-queue.c', ] -install_headers(pipewire_headers, subdir : 'pipewire/client') +install_headers(pipewire_headers, subdir : 'pipewire') libpipewire_c_args = [ '-DHAVE_CONFIG_H', @@ -44,18 +70,17 @@ libpipewire_c_args = [ '-D_POSIX_C_SOURCE', ] - libpipewire = shared_library('pipewire-@0@'.format(apiversion), pipewire_sources, version : libversion, soversion : soversion, c_args : libpipewire_c_args, - include_directories : [configinc, spa_inc], + include_directories : [pipewire_inc, configinc, spa_inc], link_with : spalib, install : true, dependencies : [dbus_dep, dl_lib, mathlib, pthread_lib], ) pipewire_dep = declare_dependency(link_with : libpipewire, - include_directories : [configinc, spa_inc], + include_directories : [pipewire_inc, configinc, spa_inc], dependencies : [pthread_lib,spalib_dep], ) diff --git a/pipewire/server/module.c b/src/pipewire/module.c index 12c7b499..c3d156b6 100644 --- a/pipewire/server/module.c +++ b/src/pipewire/module.c @@ -27,10 +27,10 @@ #include <sys/stat.h> #include <errno.h> -#include "pipewire/client/pipewire.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/client/utils.h" -#include "pipewire/server/module.h" +#include "pipewire/pipewire.h" +#include "pipewire/interfaces.h" +#include "pipewire/utils.h" +#include "pipewire/module.h" /** \cond */ struct impl { @@ -192,20 +192,24 @@ struct pw_module *pw_module_load(struct pw_core *core, return this; not_found: - asprintf(err, "No module \"%s\" was found", name); + if (err) + asprintf(err, "No module \"%s\" was found", name); return NULL; open_failed: - asprintf(err, "Failed to open module: \"%s\" %s", filename, dlerror()); + if (err) + asprintf(err, "Failed to open module: \"%s\" %s", filename, dlerror()); free(filename); return NULL; no_mem: no_pw_module: - asprintf(err, "\"%s\" is not a pipewire module", name); + if (err) + asprintf(err, "\"%s\" is not a pipewire module", name); dlclose(hnd); free(filename); return NULL; init_failed: - asprintf(err, "\"%s\" failed to initialize", name); + if (err) + asprintf(err, "\"%s\" failed to initialize", name); pw_module_destroy(this); return NULL; } diff --git a/pipewire/server/module.h b/src/pipewire/module.h index 55c36da8..fb390ca9 100644 --- a/pipewire/server/module.h +++ b/src/pipewire/module.h @@ -25,7 +25,7 @@ extern "C" { #endif -#include <pipewire/server/core.h> +#include <pipewire/core.h> #define PIPEWIRE_SYMBOL_MODULE_INIT "pipewire__module_init" diff --git a/pipewire/server/node-factory.c b/src/pipewire/node-factory.c index ae4cbafe..616384af 100644 --- a/pipewire/server/node-factory.c +++ b/src/pipewire/node-factory.c @@ -17,5 +17,5 @@ * Boston, MA 02110-1301, USA. */ -#include "pipewire/client/pipewire.h" -#include "pipewire/server/node-factory.h" +#include "pipewire/pipewire.h" +#include "pipewire/node-factory.h" diff --git a/pipewire/server/node-factory.h b/src/pipewire/node-factory.h index bda87d85..20452b2c 100644 --- a/pipewire/server/node-factory.h +++ b/src/pipewire/node-factory.h @@ -27,8 +27,8 @@ extern "C" { #define PIPEWIRE_TYPE__NodeFactory "PipeWire:Object:NodeFactory" #define PIPEWIRE_TYPE_NODE_FACTORY_BASE PIPEWIRE_TYPE__NodeFactory ":" -#include <pipewire/server/core.h> -#include <pipewire/server/client.h> +#include <pipewire/core.h> +#include <pipewire/resource.h> /** \class pw_node_factory * diff --git a/pipewire/server/node.c b/src/pipewire/node.c index 81514564..0a573a00 100644 --- a/pipewire/server/node.c +++ b/src/pipewire/node.c @@ -21,13 +21,13 @@ #include <stdlib.h> #include <errno.h> -#include "pipewire/client/pipewire.h" -#include "pipewire/client/interfaces.h" +#include "pipewire/pipewire.h" +#include "pipewire/interfaces.h" -#include "pipewire/server/node.h" -#include "pipewire/server/data-loop.h" -#include "pipewire/server/main-loop.h" -#include "pipewire/server/work-queue.h" +#include "pipewire/node.h" +#include "pipewire/data-loop.h" +#include "pipewire/main-loop.h" +#include "pipewire/work-queue.h" /** \cond */ struct impl { diff --git a/pipewire/server/node.h b/src/pipewire/node.h index fe929be6..69eff6f8 100644 --- a/pipewire/server/node.h +++ b/src/pipewire/node.h @@ -30,15 +30,15 @@ extern "C" { #include <spa/clock.h> #include <spa/node.h> -#include <pipewire/client/mem.h> -#include <pipewire/client/introspect.h> -#include <pipewire/client/transport.h> - -#include <pipewire/server/core.h> -#include <pipewire/server/port.h> -#include <pipewire/server/link.h> -#include <pipewire/server/client.h> -#include <pipewire/server/data-loop.h> +#include <pipewire/mem.h> +#include <pipewire/introspect.h> +#include <pipewire/transport.h> + +#include <pipewire/core.h> +#include <pipewire/port.h> +#include <pipewire/link.h> +#include <pipewire/client.h> +#include <pipewire/data-loop.h> struct pw_node; diff --git a/pipewire/client/pipewire.c b/src/pipewire/pipewire.c index cde188a2..5e5ae5f9 100644 --- a/pipewire/client/pipewire.c +++ b/src/pipewire/pipewire.c @@ -29,7 +29,7 @@ #include <errno.h> #include <dlfcn.h> -#include "pipewire/client/pipewire.h" +#include "pipewire/pipewire.h" static char **categories = NULL; @@ -271,7 +271,7 @@ const char *pw_get_host_name(void) /** Get the client name * - * Make a new PipeWire client name that can be used to construct a context. + * Make a new PipeWire client name that can be used to construct a remote. * * \memberof pw_pipewire */ @@ -291,14 +291,14 @@ char *pw_get_client_name(void) } } -/** Fill context properties +/** Fill remote properties * \param properties a \ref pw_properties * - * Fill \a properties with a set of default context properties. + * Fill \a properties with a set of default remote properties. * * \memberof pw_pipewire */ -void pw_fill_context_properties(struct pw_properties *properties) +void pw_fill_remote_properties(struct pw_properties *properties) { if (!pw_properties_get(properties, "application.name")) pw_properties_set(properties, "application.name", pw_get_application_name()); diff --git a/pipewire/client/pipewire.h b/src/pipewire/pipewire.h index cabda2bd..5668d9c5 100644 --- a/pipewire/client/pipewire.h +++ b/src/pipewire/pipewire.h @@ -24,16 +24,14 @@ extern "C" { #endif -#include <pipewire/client/context.h> -#include <pipewire/client/introspect.h> -#include <pipewire/client/log.h> -#include <pipewire/client/loop.h> -#include <pipewire/client/mem.h> -#include <pipewire/client/thread-loop.h> -#include <pipewire/client/properties.h> -#include <pipewire/client/stream.h> -#include <pipewire/client/subscribe.h> -#include <pipewire/client/utils.h> +#include <pipewire/introspect.h> +#include <pipewire/log.h> +#include <pipewire/loop.h> +#include <pipewire/mem.h> +#include <pipewire/thread-loop.h> +#include <pipewire/properties.h> +#include <pipewire/stream.h> +#include <pipewire/utils.h> #include <spa/type-map.h> @@ -111,7 +109,7 @@ char * pw_get_client_name(void); void -pw_fill_context_properties(struct pw_properties *properties); +pw_fill_remote_properties(struct pw_properties *properties); void pw_fill_stream_properties(struct pw_properties *properties); diff --git a/pipewire/server/port.c b/src/pipewire/port.c index f81bb256..537747ad 100644 --- a/pipewire/server/port.c +++ b/src/pipewire/port.c @@ -21,9 +21,8 @@ #include <stdlib.h> #include <errno.h> -#include "pipewire/client/pipewire.h" - -#include "pipewire/server/port.h" +#include "pipewire/pipewire.h" +#include "pipewire/port.h" /** \cond */ struct impl { diff --git a/pipewire/server/port.h b/src/pipewire/port.h index faa37453..b56b27f4 100644 --- a/pipewire/server/port.h +++ b/src/pipewire/port.h @@ -29,11 +29,11 @@ extern "C" { #include <spa/node.h> -#include <pipewire/client/introspect.h> -#include <pipewire/client/mem.h> +#include <pipewire/introspect.h> +#include <pipewire/mem.h> -#include <pipewire/server/core.h> -#include <pipewire/server/link.h> +#include <pipewire/core.h> +#include <pipewire/link.h> enum pw_port_state { PW_PORT_STATE_ERROR = -1, diff --git a/pipewire/client/properties.c b/src/pipewire/properties.c index b4d6896f..374d18e9 100644 --- a/pipewire/client/properties.c +++ b/src/pipewire/properties.c @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include "pipewire/client/pipewire.h" -#include "pipewire/client/properties.h" +#include "pipewire/pipewire.h" +#include "pipewire/properties.h" /** \cond */ struct properties { diff --git a/pipewire/client/properties.h b/src/pipewire/properties.h index 9d79e8a0..9d79e8a0 100644 --- a/pipewire/client/properties.h +++ b/src/pipewire/properties.h diff --git a/pipewire/client/protocol.c b/src/pipewire/protocol.c index 1b2aab60..6fcc77d7 100644 --- a/pipewire/client/protocol.c +++ b/src/pipewire/protocol.c @@ -17,7 +17,7 @@ * Boston, MA 02110-1301, USA. */ -#include <pipewire/client/protocol.h> +#include <pipewire/protocol.h> static struct impl { bool init; diff --git a/pipewire/client/protocol.h b/src/pipewire/protocol.h index c709bfe3..2c79deb1 100644 --- a/pipewire/client/protocol.h +++ b/src/pipewire/protocol.h @@ -27,9 +27,8 @@ extern "C" { #include <spa/defs.h> #include <spa/list.h> -#include <pipewire/client/subscribe.h> -#include <pipewire/client/type.h> -#include <pipewire/client/properties.h> +#include <pipewire/type.h> +#include <pipewire/properties.h> #define PW_TYPE_PROTOCOL__Native PW_TYPE_PROTOCOL_BASE "Native" diff --git a/pipewire/client/proxy.c b/src/pipewire/proxy.c index f4ca87da..6687a879 100644 --- a/pipewire/client/proxy.c +++ b/src/pipewire/proxy.c @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include <pipewire/client/log.h> -#include <pipewire/client/proxy.h> -#include <pipewire/server/core.h> +#include <pipewire/log.h> +#include <pipewire/proxy.h> +#include <pipewire/core.h> /** \cond */ struct proxy { diff --git a/pipewire/client/proxy.h b/src/pipewire/proxy.h index 222ff895..66553576 100644 --- a/pipewire/client/proxy.h +++ b/src/pipewire/proxy.h @@ -24,9 +24,9 @@ extern "C" { #endif -#include <pipewire/client/type.h> -#include <pipewire/client/utils.h> -#include <pipewire/server/remote.h> +#include <pipewire/type.h> +#include <pipewire/utils.h> +#include <pipewire/remote.h> /** \page page_proxy Proxy * diff --git a/pipewire/server/remote.c b/src/pipewire/remote.c index dd5ba88d..c49ec75c 100644 --- a/pipewire/server/remote.c +++ b/src/pipewire/remote.c @@ -23,15 +23,12 @@ #include <sys/un.h> #include <errno.h> -#include "pipewire/client/pipewire.h" - -#include "pipewire/client/introspect.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/client/connection.h" - -#include "pipewire/server/remote.h" -#include "pipewire/server/core.h" -#include "pipewire/server/module.h" +#include "pipewire/pipewire.h" +#include "pipewire/introspect.h" +#include "pipewire/interfaces.h" +#include "pipewire/remote.h" +#include "pipewire/core.h" +#include "pipewire/module.h" #include <spa/lib/debug.h> @@ -168,7 +165,7 @@ struct pw_remote *pw_remote_new(struct pw_core *core, if (properties == NULL) goto no_mem; - pw_fill_context_properties(properties); + pw_fill_remote_properties(properties); this->properties = properties; this->state = PW_REMOTE_STATE_UNCONNECTED; @@ -187,13 +184,20 @@ struct pw_remote *pw_remote_new(struct pw_core *core, pw_module_load(core, "libpipewire-module-protocol-native", NULL, NULL); pw_module_load(core, "libpipewire-module-client-node", NULL, NULL); this->protocol = pw_protocol_get(PW_TYPE_PROTOCOL__Native); + if (this->protocol == NULL || this->protocol->new_connection == NULL) + goto no_protocol; this->conn = this->protocol->new_connection(this->protocol, this, properties); + if (this->conn == NULL) + goto no_connection; spa_list_insert(core->remote_list.prev, &this->link); return this; + no_connection: + no_protocol: + pw_properties_free(properties); no_mem: free(impl); return NULL; diff --git a/pipewire/server/remote.h b/src/pipewire/remote.h index 5b2d9a9e..5a11fc59 100644 --- a/pipewire/server/remote.h +++ b/src/pipewire/remote.h @@ -24,6 +24,16 @@ extern "C" { #endif +struct pw_remote; + +#include <pipewire/map.h> +#include <pipewire/loop.h> +#include <pipewire/properties.h> +#include <pipewire/protocol.h> +#include <pipewire/proxy.h> +#include <pipewire/type.h> +#include <pipewire/core.h> + /** \page page_remote_api Remote API * * \section sec_remote_api_overview Overview @@ -87,16 +97,6 @@ extern "C" { * Use pw_remote_disconnect() to disconnect from the remote. */ -struct pw_remote; - -#include <pipewire/client/map.h> -#include <pipewire/client/loop.h> -#include <pipewire/client/properties.h> -#include <pipewire/client/protocol.h> -#include <pipewire/client/proxy.h> -#include <pipewire/client/type.h> -#include <pipewire/server/core.h> - /** \enum pw_remote_state The state of a \ref pw_remote \memberof pw_remote */ enum pw_remote_state { PW_REMOTE_STATE_ERROR = -1, /**< remote is in error */ diff --git a/pipewire/server/resource.c b/src/pipewire/resource.c index 9c2ac6d5..f808b6cb 100644 --- a/pipewire/server/resource.c +++ b/src/pipewire/resource.c @@ -19,9 +19,9 @@ #include <string.h> -#include "pipewire/client/interfaces.h" -#include "pipewire/client/protocol.h" -#include "pipewire/server/resource.h" +#include "pipewire/interfaces.h" +#include "pipewire/protocol.h" +#include "pipewire/resource.h" /** \cond */ struct impl { diff --git a/pipewire/server/resource.h b/src/pipewire/resource.h index d5b9a288..38cf6ea5 100644 --- a/pipewire/server/resource.h +++ b/src/pipewire/resource.h @@ -29,9 +29,9 @@ extern "C" { #include <spa/list.h> -#include <pipewire/client/sig.h> -#include <pipewire/client/utils.h> -#include <pipewire/server/core.h> +#include <pipewire/sig.h> +#include <pipewire/utils.h> +#include <pipewire/core.h> /** \page page_resource Resource * diff --git a/pipewire/client/rtkit.c b/src/pipewire/rtkit.c index 66b05d2d..98fa9225 100644 --- a/pipewire/client/rtkit.c +++ b/src/pipewire/rtkit.c @@ -47,7 +47,7 @@ #include <dbus/dbus.h> -#include <pipewire/client/log.h> +#include <pipewire/log.h> #include "rtkit.h" diff --git a/pipewire/client/rtkit.h b/src/pipewire/rtkit.h index a40e2d12..a40e2d12 100644 --- a/pipewire/client/rtkit.h +++ b/src/pipewire/rtkit.h diff --git a/pipewire/client/sig.h b/src/pipewire/sig.h index ef850e5a..ef850e5a 100644 --- a/pipewire/client/sig.h +++ b/src/pipewire/sig.h diff --git a/pipewire/client/stream.c b/src/pipewire/stream.c index 421f057a..e7f5dcde 100644 --- a/pipewire/client/stream.c +++ b/src/pipewire/stream.c @@ -26,15 +26,14 @@ #include "spa/lib/debug.h" -#include "pipewire/client/pipewire.h" -#include "pipewire/client/interfaces.h" -#include "pipewire/client/array.h" -#include "pipewire/client/connection.h" -#include "pipewire/client/stream.h" -#include "pipewire/client/transport.h" -#include "pipewire/client/utils.h" -#include "pipewire/client/stream.h" -#include "pipewire/extensions/client-node.h" +#include "pipewire/pipewire.h" +#include "pipewire/interfaces.h" +#include "pipewire/array.h" +#include "pipewire/stream.h" +#include "pipewire/transport.h" +#include "pipewire/utils.h" +#include "pipewire/stream.h" +#include "extensions/client-node.h" /** \cond */ diff --git a/pipewire/client/stream.h b/src/pipewire/stream.h index 25415f91..1463ff71 100644 --- a/pipewire/client/stream.h +++ b/src/pipewire/stream.h @@ -23,7 +23,7 @@ #include <spa/buffer.h> #include <spa/format.h> -#include <pipewire/server/remote.h> +#include <pipewire/remote.h> #ifdef __cplusplus extern "C" { diff --git a/pipewire/client/thread-loop.c b/src/pipewire/thread-loop.c index d2c153a6..d2c153a6 100644 --- a/pipewire/client/thread-loop.c +++ b/src/pipewire/thread-loop.c diff --git a/pipewire/client/thread-loop.h b/src/pipewire/thread-loop.h index cdc5d508..954edcec 100644 --- a/pipewire/client/thread-loop.h +++ b/src/pipewire/thread-loop.h @@ -20,7 +20,7 @@ #ifndef __PIPEWIRE_THREAD_LOOP_H__ #define __PIPEWIRE_THREAD_LOOP_H__ -#include <pipewire/client/loop.h> +#include <pipewire/loop.h> #ifdef __cplusplus extern "C" { diff --git a/pipewire/client/transport.c b/src/pipewire/transport.c index 30deb051..e1054029 100644 --- a/pipewire/client/transport.c +++ b/src/pipewire/transport.c @@ -21,8 +21,8 @@ #include <errno.h> #include <sys/mman.h> -#include <pipewire/client/log.h> -#include <pipewire/client/transport.h> +#include <pipewire/log.h> +#include <pipewire/transport.h> /** \cond */ diff --git a/pipewire/client/transport.h b/src/pipewire/transport.h index 705a73ff..402355c9 100644 --- a/pipewire/client/transport.h +++ b/src/pipewire/transport.h @@ -29,8 +29,8 @@ extern "C" { #include <spa/defs.h> #include <spa/node.h> -#include <pipewire/client/mem.h> -#include <pipewire/client/sig.h> +#include <pipewire/mem.h> +#include <pipewire/sig.h> /** information about the transport region \memberof pw_transport */ struct pw_transport_info { diff --git a/pipewire/client/type.c b/src/pipewire/type.c index 889238dd..2ec057cf 100644 --- a/pipewire/client/type.c +++ b/src/pipewire/type.c @@ -24,10 +24,10 @@ #include "spa/type-map.h" #include "spa/monitor.h" -#include "pipewire/client/pipewire.h" -#include "pipewire/client/type.h" +#include "pipewire/pipewire.h" +#include "pipewire/type.h" -#include "pipewire/server/node-factory.h" +#include "pipewire/node-factory.h" /** Initializes the type system diff --git a/pipewire/client/type.h b/src/pipewire/type.h index eaa96f25..3486343a 100644 --- a/pipewire/client/type.h +++ b/src/pipewire/type.h @@ -30,8 +30,8 @@ extern "C" { #include <spa/monitor.h> #include <spa/param-alloc.h> -#include <pipewire/client/map.h> -#include <pipewire/client/transport.h> +#include <pipewire/map.h> +#include <pipewire/transport.h> #define PIPEWIRE_TYPE__Core "PipeWire:Object:Core" #define PIPEWIRE_TYPE_CORE_BASE PIPEWIRE_TYPE__Core ":" diff --git a/pipewire/client/utils.c b/src/pipewire/utils.c index 05c10b5a..744997d2 100644 --- a/pipewire/client/utils.c +++ b/src/pipewire/utils.c @@ -19,9 +19,9 @@ #include <string.h> -#include <pipewire/client/array.h> -#include <pipewire/client/log.h> -#include <pipewire/client/utils.h> +#include <pipewire/array.h> +#include <pipewire/log.h> +#include <pipewire/utils.h> /** Split a string based on delimiters * \param str a string to split diff --git a/pipewire/client/utils.h b/src/pipewire/utils.h index a23b1882..a23b1882 100644 --- a/pipewire/client/utils.h +++ b/src/pipewire/utils.h diff --git a/pipewire/server/work-queue.c b/src/pipewire/work-queue.c index 1cecfcea..5c309ea8 100644 --- a/pipewire/server/work-queue.c +++ b/src/pipewire/work-queue.c @@ -20,8 +20,8 @@ #include <stdio.h> #include <string.h> -#include "pipewire/client/log.h" -#include "pipewire/server/work-queue.h" +#include "pipewire/log.h" +#include "pipewire/work-queue.h" /** \cond */ struct work_item { diff --git a/pipewire/server/work-queue.h b/src/pipewire/work-queue.h index 35f5a3ac..ccd8a5de 100644 --- a/pipewire/server/work-queue.h +++ b/src/pipewire/work-queue.h @@ -24,7 +24,7 @@ extern "C" { #endif -#include <pipewire/client/loop.h> +#include <pipewire/loop.h> typedef void (*pw_work_func_t) (void *obj, void *data, int res, uint32_t id); diff --git a/pipewire/server/meson.build b/src/server/meson.build index b0418eac..b0418eac 100644 --- a/pipewire/server/meson.build +++ b/src/server/meson.build diff --git a/pipewire/tools/meson.build b/src/tools/meson.build index b6131d72..ca8e467f 100644 --- a/pipewire/tools/meson.build +++ b/src/tools/meson.build @@ -1,5 +1,5 @@ executable('pipewire-monitor', 'pipewire-monitor.c', install: true, - dependencies : [pipewirecore_dep], + dependencies : [pipewire_dep], ) diff --git a/pipewire/tools/pipewire-monitor.c b/src/tools/pipewire-monitor.c index 67354776..3c35be12 100644 --- a/pipewire/tools/pipewire-monitor.c +++ b/src/tools/pipewire-monitor.c @@ -19,10 +19,11 @@ #include <stdio.h> -#include <pipewire/client/pipewire.h> -#include <pipewire/client/sig.h> #include <spa/lib/debug.h> +#include <pipewire/pipewire.h> +#include <pipewire/sig.h> + struct data { bool running; struct pw_loop *loop; @@ -300,12 +301,12 @@ static void on_state_changed(struct pw_listener *listener, struct pw_remote *rem struct data *data = SPA_CONTAINER_OF(listener, struct data, on_state_changed); switch (remote->state) { - case PW_CONTEXT_STATE_ERROR: + case PW_REMOTE_STATE_ERROR: printf("remote error: %s\n", remote->error); data->running = false; break; - case PW_CONTEXT_STATE_CONNECTED: + case PW_REMOTE_STATE_CONNECTED: printf("remote state: \"%s\"\n", pw_remote_state_as_string(remote->state)); data->registry_proxy = pw_proxy_new(data->remote, |