libfreeaptx is a fork of libopenaptx prior to the dubious licensing
situation was introduced to the library.
As it's fully API compatible, let's use that instead for those who
want to use aptX support.
The library source is available at https://github.com/iamthehorker/libfreeaptx
Hard rate changes (the default now) makes the graph suspend so that the
driver reopens the device with the new sample rate if possible. This
causes a glitch.
Soft rate changes works as before and just changes the clock rate of
the position area, which makes everything resample things to the new
rate without a glitch.
Sample rate changes can currently still only be triggered by
configuring the settings metadata clock.force-rate
We don't need to follow nodes that we already visited or that are
inactive so skip them early.
Always try to prepare the link otherwise, not only for passive links
because non-passive links might also be paused because of a suspended
driver.
We only ever want to prepare a link between active nodes so add the
check in the _prepare() functions instead. This also makes it skip
the prepare step for inactive nodes when recalculating the graph.
This adds a new top-level documentation entry for pipewire-media-session
with a list of modules (currently only one). Similar setup to the
pipewire modules, it allows us to document all modules in-place.
This is a good first (top) page to have in the docs, let's move it out
from the pipewire heading.
This doesn't change any of the links and the renaming isn't required
(subpage controls whether it's a top-level item and the meson.build
order decides its spot in he list). Still, better to have the filenames
represent the layout.
Add a DONT_FIXATE flag to spa_pod_props. The flag avoids fixation
of the property by spa_pod_fixate().
When filtering properties, 'and' the flags together in the filtered
property. This mostly preserves the merged property flags. It also
merges the DONT_FIXATE flags so that when both sides can handle
the non-fixated result, it will be returned.
This can be used to let PipeWire filter out the common property
fields and leave the final selection of fields to the producer. This can
only work when the final selected field can be transported in some
other way than the format param, like on the buffer fields or in
metadata. One use case is negotiation of the DMABUF modifiers.
See #1084
Because we only remove the client from the list after doing the lookup,
we will always find the removed node and the unregister event is
never called.
Fix this by marking the object as removing so that the lookup function
can skip the nodes being removed.
Leaving sockets in the home directories is bad form, so let's not do
this.
This effectively requires XDG_RUNTIME_DIR to be set for pipewire to
work - it is set correctly on most setups anyway and on custom setups
this needs to be addressed with a custom environment.
Fixes#1443
The target signal is called when the peer nodes are ready and this
node needs to be scheduled. It is the in-process version of the
signal.
Remove our custom version that, just like the default version, schedules
the node implementation but doesn't do any accounting.
Makes pw-top report driver stats for bluetooth devices.
Fixes#1450
The ringbuffer can't be written to from multiple threads.
When both the main loop and data thread do _invoke, they both write to
the ringbuffer and cause it to be corrupted because the ringbuffer is
not multi-writer safe.
Doing invoke from the thread itself is usually done to flush things out
so we really only need to flush the ringbuffer and call the callback.
See #1451
Make a new PW_KEY_NODE_WANT_DRIVER to assign the node to a running
driver. (does not work yet)
Use a new variable to hold the ALWAYS_PROCESS setting and also
update want_driver.
This makes things it a bit more future proof.
Virtual sinks and sources implemented with streams need to be grouped
with a driver node to be able to schedule. We don't have a way to let it
use a default driver so add it to the pipewire.dummy driver.
This fixes stalled pipe and other streams streams.
Fixes#1407
We always want to clear the provided blocklist from the properties. The
logic tries to only clear when there was a blocklist but it checks this
by comparing the string pointer to the fallback, which gives a compiler
warning.
`getpwuid_r()` puts the strings pointed to from the returned
passwd struct into the specified buffer. Previously, that
buffer technically didn't live long enough to be usable
in the `snprintf()` call - although in practice this didn't
appear to be a problem. A particular version of GCC 11 generates
the same machine code for this function regardless whether
this patch is applied or not. Still, fix this by moving
the buffer to an outer scope.
The getrandom() detection from meson.build fails with the following error
message:
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name 'size_t'
27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:8:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
Fix it by adding stddef.h include to the meson getrandom() detection.
Fixes:
../src/pipewire/impl-core.c:54:9: error: conflicting types for ‘getrandom’
54 | ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) {
| ^~~~~~~~~
In file included from ../src/pipewire/impl-core.c:34:
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:12: note: previous declaration of ‘getrandom’ was here
27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~~~~
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/pipewire/0001-meson-fix-getrandom-detection-for-uclibc.patch]
module-switch-on-connect sets the configured default sink/source
whenever suitable new sink/sources appear.
This should give the same behavior as Pulseaudio's module.
This module exists mainly to provide a workaround e.g. for desktop
environments such as XFCE, whose mixer applications try to manage the
default devices assuming fully PA-like behavior, breaking default
pipewire output switching.
Reorganize the docs a little. First a short intro, then list the use
cases, then the responsabilities of the various components, then
the implementation in various places.
To fix build warning about a variable being unused in LibCamera::stop():
[1/2] Compiling C++ object spa/plugins/libcamera/libspa-libcamera.so.p/libcamera_wrapper.cpp.o
../spa/plugins/libcamera/libcamera_wrapper.cpp: In member function ‘void LibCamera::stop()’:
../spa/plugins/libcamera/libcamera_wrapper.cpp:531:58: warning: unused variable ‘buffer’ [-Wunused-variable]
531 | for (const std::unique_ptr<FrameBuffer> &buffer : this->allocator_->buffers(stream)) {
| ^~~~~~
The SPA plugin is including a <libcamera/buffer.h> header file, but this
got renamed to <libcamera/framebuffer.h> to match the defined class name:
../spa/plugins/libcamera/libcamera_wrapper.cpp:52:10: fatal error: libcamera/buffer.h: No such file or directory
52 | #include <libcamera/buffer.h>
| ^~~~~~~~~~~~~~~~~~~~
Fixes#1435