Remove custom json serialization code and use the new json-builder
from various tools.
spa-json-dump now has color and raw mode and can probably be simplified
a bit more.
The properties can now serialize arbitrarily large keys, which makes
a unit test work. It also has a new 'simple' option for SPA output,
which is added and used in pw-config.
It keeps track of the json bits like commas and indentation, supports
colors and recursive reformatting. It also supports a simple mode that
implements the SPA syntax.
Currently it is possible for the request completion handler (`impl::requestComplete`)
to observe `impl::source.fd` while it is being modified in `impl::stop()`.
Fix that by closing the eventfd after the camera has been stopped.
Fixes: 3e28f3e859 ("spa: libcamera: source: rework startup sequence")
The sync-groups are only to group nodes with the same driver but don't
make them runnable.
This avoid making v4l2 runnable (without a link) when running ardour
because ardour uses the transport, which activates the sync group.
Move the runnable state calculation out of the collect_nodes function.
They are really two different steps that doin't overlap much.
The runnable state of a node is very easy to calculate. A node is
runnable if it is linked to another node without a passive port. When we
find two runnable nodes, make them runnable, which makes all nodes
linked to them runnable, stopping at passive ports.
We don't have to check the active state of the nodes or links to group
them together. This ensures we don't swap nodes around too much when the
node or link state changes.
There is no reason to delay preparing the link (by the scheduler) when
both nodes are active, we can do that right from the start.
This makes things a bit more symetrical because deactivating a node does
not unprepare a link.
This however changes things a bit because you can no longer delay link
prepare until you activate the node. I don't know if this is actually in
use and it would probably be to delay format negotiation. The right way
do delay format negotiation is to wait until an EnumFormat is set but
that is something to improve later.
Newer glibc versions have made certain `str*()` functions into macros
that ensure that the const-ness of the argument is propagated to the
return type.
!2699 has been merged a bit prematurely and it contained things that are
not used. So remove the unused member variables, functions, fix module
usage strings, and move some functions from headers.
This function is run for all the nodes with the data loop locked. It can
be used to atomically update multiple node controls.
We can't use the control_changed function because this one runs without
the lock and might do slow things, like what the sofa plugin currently
does.
See #5019
don't read the control ports from the processing thread and check for
updates. Use the control_changed signal to check and update the
parameters of the biquad atimically.
See #5019
We can just concatenate the stream and client dict on the stack, reusing
all the strings without having to do allocations or copies.
Also filter out the object.id and object.serial from the client, we want
to keep the ones from the streams.
Instead of adding the client props to the stream props when we create
it, add them when we enumerate the streams.
This makes it possible to also have the client props in the stream props
for streams that are not created with the pulse API.
Fixes#5090
Roc-toolkit log records are captured via a callback and
written to PipeWire log with corresponding verbosity level.
The log.level config parameter limits record verbosity at
the roc-toolkit level.
Move the card->ignored check to only apply to ACTION_CHANGE, not ACTION_REMOVE. This ensures that ignored cards can still be properly removed when they are unplugged.
Patch by Lairton Lelis da Fonseca Junior (@lairton)
Remove the hard skip for IPv4 link-local addresses and add an interface
binding (matching the existing IPv6 link-local behavior).
The host needs a link-local address on the interface (ip addr add
169.254.x.x/16 dev wlan0 or via NetworkManager +ipv4.addresses).
Fixes#4830
With keepalive enabled, we need to emit state change event on acquire
similarly as we do if refcount was already positive.
Co-authored-by: Martin Geier <martin.geier@streamunlimited.com>
The stream should be streaming before the get_time call is meaningful.
Various places in the code already check this an fall back to a default
value, we just need to return an error here.
When setting up the mix matrix, don't just iterate over the first 64
(CHANNEL_BITS) positions because then we will never be able to configure
more than 64 channels in the matrix.
Instead iterate until we have filled all src and dst entries in the
matrix. For the first 64 positions we might need to check the channel
mask to get the right positions in our source matrix.
Fixes the channel mixer for >64 channels where the positions above 64
where 0 in the matrix and muted.
Fixes#5118