This allows meson subprojects (or projects using pipewire as a meson
subproject) to be able to use dependency('libpipewire-0.3') and
dependency('libspa-0.2') to find the uninstalled versions of these
libraries directly from the build dir instead of going through pkg-config
If we don't have the capability to ptrace, we are probably running inside a
container, not the debugger. Check this first so we don't disable forking
mode.
Make this conditional on libcap - where libcap is not available always assume
we *do not* have a debugger attached. This is easier than telling everyone who
runs the tests in a confined system to install libcap.
Fixes#1285
This seems to be a leftover from the autotools conversion but it
does not provide huge benefits. Meson's default behavior is to generate a
header like this, the main advantage of a config.h.meson header is to *filter*
things that should show up in the config.h file. That comes at the cost of
having to #mesondefine every single variable we want.
In most cases, it's easier with meson to just use different configuration_data
objects instead - which we do for most of the code.
The new header file is identical to the old one, discounting comments, sort
order and the following #defines that didn't end up in the config.h before:
HAVE_STRNDUPA
HAVE_STDDEF_H
Use this for the version.h file so we enforce that being used everywhere
instead of accidentaly relying on whatever ends up in config.h.
The generated version.h file is identical.
Drop the Apple-specific defines from config.h.meson - this was never true in
the meson build anyway as nothing set the AC_APPLE_UNIVERSAL_BUILD and the
else condition only undef'd WORDS_BIGENDIAN if... it was not defined.
Drop this and replace it with a meson endian check. There is only one source
file that checks for this #define in spa/plugins/alsa/acp/compat.h, let's hope
nothing breaks here.
Heavily inspired by libinput's litest framework (built around check), this is
a from-scratch framework that simplifies adding tests for various parts of
pipewire. See the pwtest.h documentation for details but the basics are:
- PW_TEST() and PWTEST_SUITE() specify the tests to be run
- Test are run in forked processes, any errors/signals are caught and printed
to the log
- Tests have a custom pipewire daemon started on demand to talk to [1]. The
daemon's log is available in the test output.
- Output is YAML to be processed into whatever format needed
[1] There are limits here, since we can't emulate devices yet there is only
so much we can rely on with the daemon.
These headers are designed for including in the project. So the user doesn't
need to install valgrind-devel and we don't have to worry about whether the
headers are available or not.
Mostly uses the existing infrastructure, but the webrtc canceller has a
fixed blocksize, so we:
1. Use the canceller blocksize if configured
2. Accumulate output data in a ringbuffer
3. Push out the data in the required chunk size
Linking with -latomic has been added to pipewire-jack since
b8c58c74d8
However, this is not the right place to add this dependency, atomic_dep
should be added to pipewire_dep to avoid the following build failure:
/home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: src/pipewire/libpipewire-0.3.so.0.326.0.p/filter.c.o: in function `impl_node_process':
filter.c:(.text+0xf28): undefined reference to `__atomic_fetch_add_4'
Indeed, atomic operation such as __atomic_fetch_add is used in libcamera
as well as in ./spa/plugins/libcamera/libcamera_wrapper.cpp,
./spa/include/spa/utils/ringbuffer.h and ./spa/include/spa/graph/graph.h
Fixes:
- http://autobuild.buildroot.org/results/b5305e8e7dd1a5e8bfaba72b06251056ba7d1af1
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Install the config file in $PREFIX/share/pipewire so that a factory
reset can be done by wiping /etc and /home.
Add this new directory to the search path.
System wide config can still be done in /etc, user config in
$HOME/.config/pipewire/ by copying files from $PREFIX/share/pipewire
Fixes#1191
Option 'pipewire-alsa' is a meson feature and defaults to 'auto'. This is
different to 'disabled', so on systems where alsa's deps weren't available
we would still end up trying to build. Switch to checking alsa_dep.found()
instead.
Some PulseAudio clients are known to use localised client and
stream names as values for the respective PulseAudio props, most
notably plain old pavucontrol.
We call setlocale before anything else for ncurses to display
localised text correctly. We also want to link with ncursesw, which
supports multibyte Unicode locales.
This is important for cross-platform build frameworks such as Yocto
where the build configurations must be deterministic. In this case, if
some other build dependency pulled in SDL2, then the meson.build logic
would suddenly enable extra features that would not have been built
otherwise. By allowing for explicitely enabling/disabling SDL2 and sndfile
depending bits, this problem is fixed.