Currently, among others, the `pipewire-pulse` executable is an
exact copy of the `pipewire` executable. Use meson's
`install_symlink()` to avoid the need for compiling the same thing
multiple times. Also use `custom_target()` so that the aliases
are available in an uninstalled environment.
Do the same for `pw-cat`. The benefit is that all aliases
of `pw-cat` are now available in an uninstalled environment.
This commit increasese the minimum meson version to 0.61.1
as that is needed for `install_symlink()`.
The reason for using 0.61.1 instead of 0.61.0 is the following bug:
https://github.com/mesonbuild/meson/issues/9820
Promote the following warnings to errors:
* implicit-function-declaration
* int-conversion
because the code very likely will not work
correctly if any of these two trigger.
SOFA is a file format used for storing and accessing spatial audio data, namely head-related transfer functions. These can be used to create binaural spatial sound using head- or earphones.
This commit introduces libmysofa as an optional dependency for loading SOFA files and creates a spatializer plugin for the filter-chain
ci: install libmysofa-devel for full build
ci: bump FDO_DISTRIBUTION_TAG
FFmpeg integration in pw-cat does not strictly require Compress-Offload;
for example, there could be other nodes in the graph that can handle
compressed audio.
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
* Decouple FFmpeg integration in pw-cat from the ffmpeg option; if
one wants to use Compress-Offload but not the ffmpeg SPA plugin,
it is then possible to just pass -Dpw-cat-ffmpeg=enabled to meson.
Likewise, this also makes it possible to build the ffmpeg plugin
without extending pw-cat.
* tinycompress does not need to be detected in the root meson.build,
since it is only needed by the alsa plugin.
This fixes several integer overflow problems in the POD parser, as well
as fixing a returns-twice warning from GCC and integer truncation
problems in SPA_FLAG_CLEAR and SPA_ROUND_DOWN_N. The integer overflows
can result in a tiny POD being treated as a huge one, causing
out-of-bounds reads.
At the moment, cross compilation may not work in certain cases because
checks are carried out against the build machine instead of the host machine.
Replace uses of `build_machine` with `host_machine` to fix that.
In native compilation, all three "machine objects" available in meson
are the same, so this change should have no effect in that case.
More: https://mesonbuild.com/Cross-compilation.html
Unfortunately, libX11 has global error and I/O error handlers,
which make it inconvenient to use them from library code.
Since libX11 1.7.0, there is a per-display "exit_handler" which
is called from `_XIOError()`, however, the global I/O error
handler is still called before that, and that - by default -
calls `exit(1)` in `_XDefaultIOError()` after printing the error
to stderr.
To avoid exiting, custom handlers will be registered when
libpipewire-module-x11-bell.so is loaded given that at
that moment the default handlers are installed.
When the shared object is unloaded, the handlers will
be reset to the default ones given that the currently
registered handlers are the ones that were registered
when the module was loaded.
The logic only works correctly if there are no concurrent
calls to `XSet{IO}ErrorHandler()` while `{set,restore}_x11_handlers()`
is running. Since module-x11-bell is probably mostly going to
be loaded in `pipewire-pulse`, this seems like a reasonable
assumption to make.