Define WP_USE_LOCAL_LOG_TOPIC_IN_G_LOG in project scope, so that we always
use this feature in our codebase without causing problems for other projects.
Fixes#571
This is needed for wireplumber to start up correctly in the meson
devenv when built as a subproject of pipewire. The reason for this
is that the value set for `PIPEWIRE_CONFIG_DIR` in the wireplumber
meson build file will be overriden when the pipewire meson files
set up another devenv with its own `PIPEWIRE_CONFIG_DIR`.
Try to connect to the default manager remote, before trying the default
remote.
Check libpipewire version is new enough to support setting arrays.
Bump Pipewire version to have pw_check_library_version.
Each component can now list required and optional dependencies,
using the component feature names to match other components.
In addition, each component feature can be declared as required, optional
or disabled, making optional components easier to deal with.
The component flags (ifexists, nofail) have been removed.
Using virtual components, this system also allows easier customization
of which components should be loaded for a specific configuration,
without requiring the user to copy the list of components and edit it.
Also bump the required glib version to 2.68 for g_assert_cmpstrv()
Since the wireplumber configuration has been moved to /usr/share/pipewire, it
does not makes sense to have a different path for the WIREPLUMBER_CONFIG_DIR
environment variable. Therefore, the WIREPLUMBER_CONFIG_DIR environment variable
has been changed to just be an alias of PIPEWIRE_CONFIG_DIR. Finally, Lua
scripts are now installed under /usr/share/wireplumber/scripts instead of
/usr/share/pipewire/scripts as they are a wireplumber feature only.
This adds three meson options to enable or disable building daemon, tools, and modules.
Building the daemon or tools depends on building the modules, and disabling modules without disabling
the other two will result in meson giving an appropriate error.
These new options will let users skip building and installing unneeded items when they are not needed,
e.g. when only using the C API in another application.
Since 2eed279c9d wireplumber requires at least meson 0.59.0,
and the devenv feature is available since 0.58.0, the version check
before adding the devenv is no longer needed. Remove it.
There is no need to have this as an optional module, since libintl
is a hard dependency of both PipeWire and GLib. This way we can keep
things a bit simpler and faster (no string copies and plugin lookups)
Bump meson dependency to 0.59 to benefit of the libintl lookup that
is now built into meson's dependency() function.
meson devenv provides a convenient way of running the application
without installing it by overriding certain environment variables.
meson automatically overrides PATH and LD_LIBRARY_PATH, thus
there is no need to manually set those.
Running `meson devenv -C <builddir>` opens a new shell in the
build directory with the environment variables set up.
./builddir/wp-uninstalled.sh can now be called without a -b argument,
it'll automatically set the full paths. This is useful when building as
a subproject.
meson has a limitation: the configure_file() object is just a file
wrapper object. Wrap this into a custom_target() whose return value has
a full_path() method. This way, pipewire can use
wireplumber_uninstalled.full_path() without having to build the
directory structure itself.
* find out if the node supports iec958 or dsd
* use spa_pod_fixate() to get the default format of the node, like p-m-s does
* use _enum_formats_sync() to utilize the param cache, assuming that the node
always has all features enabled (which is always the case when coming from
an ObjectManager that was defined in Lua)
* simplify the activation / deactivation procedure
* configure nodes with unpositioned channels early, as if they were devices
This copies the logic of media-session's logind module and allows
the bluez monitor to be active in only one user session at a time.
This is especially useful to avoid interference between the gdm
session and the actual user session, which momentarily both have
wireplumber running when logging in/out.
Fixes#54
It's useful downstream to be able to control building
tests, as there's not much use building them if we're
not going to run them.
Signed-off-by: Sam James <sam@gentoo.org>
On Exherbo we allow to install different Lua ABIs in parallel and
users can choose per-package which Lua ABI to use, e.g.
media/wireplumber LUA_ABIS: -* 5.3
However, wireplumber's build system doesn't provide a way of explicitly
requesting a specific version, which makes the build non-deterministic,
since you get a different result if you install today with Lua 5.3
installed and reinstall tomorrow after installing Lua 5.4.
To fix this, I introduced a `system-lua-version` option that allows to
specify an explicit Lua version to check for and build against:
> $ meson .. -Dsystem-lua=true -Dsystem-lua-version=5.4
> The Meson build system
> Version: 0.58.0
> Source dir: /mnt/development/scm/freedesktop/wireplumber
> Build dir: /mnt/development/scm/freedesktop/wireplumber/build/reconfigure
> Build type: native build
> Project name: wireplumber
> Project version: 0.4.1
> [...]
> Run-time dependency lua-5.4 found: YES 5.4.3
> [...]
> Build targets in project: 56
>
> wireplumber 0.4.1
>
> Lua version : 5.4.3 (system)
> systemd conf data : YES
If the specified version isn't found, the build will fail loudly:
> $ meson .. -Dsystem-lua=true -Dsystem-lua-version=5.5
> [...]
> Found CMake: /usr/host/bin/cmake (3.20.5)
> Run-time dependency lua-5.5 found: NO (tried pkgconfig and cmake)
> Run-time dependency lua5.5 found: NO (tried pkgconfig and cmake)
>
> ../meson.build:50:6: ERROR: Problem encountered: Specified Lua version "5.5" not found
For bindir, libdir and datadir, meson enforces that either
- the value is an absolute path that is a subdir of $prefix
- the value is a relative path that is then made a subdir of $prefix
Example meson error message:
ERROR: The value of the 'bindir' option is '/usr/foobar' which must be a subdir of the prefix '/usr/local'.
Note that if you pass a relative path, it is assumed to be a subdir of prefix.
And meson handles absolute paths for those directories correctly (ignoring
$prefix), so we don't need to manually compose those.
Only exception is sysconfdir which may be outside the prefix but there too
meson handles an absolute path correctly.