Commit graph

14712 commits

Author SHA1 Message Date
Wim Taymans
d206b06c70 sendspin: cleanup receive sync and logging
don't check the same thing twice.

Make sure values are set before we log them.
2026-03-01 12:49:24 +01:00
Wim Taymans
06f336a581 json-builder: handle allocation failures in vasprintf 2026-03-01 12:40:34 +01:00
thewrz
8ceb671cc8 module-vban: derive write position from frame counter
Instead of writing packets sequentially and losing sync on any
frame gap, compute the write position from the VBAN header's
n_frames field. Out-of-order packets land at the correct
ringbuffer offset, matching how module-rtp handles this.

Only advance the writeindex when a packet extends the frontier
so that late arrivals fill gaps without moving the pointer
backwards.

Fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/5145
2026-02-27 22:48:12 -08:00
Wim Taymans
354ec08b9b doc: add sendspin modules to doc 2026-02-27 20:43:56 +01:00
Wim Taymans
b05fcdbfbd modules: fix compilation without avahi 2026-02-27 20:36:37 +01:00
Wim Taymans
8eed27820c meson: try to fix the doc build 2026-02-27 18:23:45 +01:00
Frédéric Danis
ee18160c4e bluez5: bap: Fix typos 2026-02-27 17:19:01 +00:00
Wim Taymans
9ad5ca2e5a websocket: fix some overflows
Fix some integer and buffer overflows as suggested by Sami Farin.
2026-02-27 17:58:51 +01:00
Wim Taymans
dee2d5ee06 zeroconf: sanitize the properties
Use some constants for the zeroconf properties. Make the right ones are
used in all places.
2026-02-27 17:31:42 +01:00
Wim Taymans
3a1b790588 modules: port snapcast to zeroconf helper 2026-02-27 17:31:38 +01:00
Wim Taymans
a065cff8c1 zeroconf: pass user data as const 2026-02-27 16:06:33 +01:00
Wim Taymans
db713c8264 modules: port rtp-session to new zeroconf helper 2026-02-27 13:50:49 +01:00
Wim Taymans
a1db2b8d35 pulse-server: port zeroconf publish to helper 2026-02-27 12:22:52 +01:00
Wim Taymans
c09bcfdc97 zeroconf: support proto, ifindex and subtypes
Also improve debug a little.
2026-02-27 12:22:24 +01:00
Wim Taymans
cd77dd0e62 zeroconf: add some more error checking
Also publish domain and host when we can and fix a memleak.
2026-02-26 23:19:53 +01:00
Wim Taymans
79d8e7f61d modules: port zeroconf-discover to new helper 2026-02-26 23:19:49 +01:00
Wim Taymans
b67937f247 module-raop: port to new zeroconf helper 2026-02-26 18:16:08 +01:00
Wim Taymans
fa04146cfb modules: move zeroconf code to zeroconf-utils 2026-02-26 17:09:45 +01:00
Wim Taymans
4a399172b6 sendspin: implement receiver zeroconf connect
Let a receiver connect to the zeroconf server. Add option to connect to
multiple serves with rules.

Fix some leaks.

Fixes #5095
2026-02-26 16:48:06 +01:00
Wim Taymans
d6654e84a7 sendspin: add sendspin sender and receiver
The sender makes an input stream for each connected client. This makes
it easier to do the per client conversion using the adapter and send
different channels to clients.

The receiver uses linear regression to map ringbuffer indexes to server
timestamps and server timestamps to client timestamps. It can then
schedule playback against its own clock.
2026-02-26 12:17:17 +01:00
Wim Taymans
6daa8ccc0d json-builder: zero the struct 2026-02-26 12:08:26 +01:00
Wim Taymans
be3c63d55e module-raop: move base64 to separate file 2026-02-26 12:00:31 +01:00
Wim Taymans
03662b3dfe json-builder: avoid indent on the first item
Avoids putting a \n or (now also) space as the first item.
2026-02-26 11:17:17 +01:00
Wim Taymans
bdbb5f6d27 json-builder: add raw mode that leaves keys/strings like they are 2026-02-26 11:09:13 +01:00
Wim Taymans
7dd924797b audioconver: reformat the graph description for properties 2026-02-26 10:59:57 +01:00
Wim Taymans
ed361a856f tools: port various tools to the new json-builder
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.
2026-02-26 10:51:17 +01:00
Wim Taymans
6753c51ab8 spa: add a new json-builder helper
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.
2026-02-26 10:48:53 +01:00
Wim Taymans
692590b30a json: a container start also ends a bare string
This stops the parser from seeing foo{bar as a single string.

This also makes a valid test work, add another small test.
2026-02-26 10:42:14 +01:00
Barnabás Pőcze
848ac24490 spa: libcamera: source: fix stop sequence
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")
2026-02-24 18:29:51 +01:00
Wim Taymans
6961bfeaa1 examples: adapt samplerate in audio-dsp-src
Follow the graph rate to generate the sine wav instead of using a
hardcoded value.

See #5135
2026-02-24 15:12:43 +01:00
Wim Taymans
5a285602e2 scheduler: sync-groups don't define the node runnable state
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.
2026-02-23 11:32:40 +01:00
Anders Jonsson
426a5be235 po: Update Swedish translation 2026-02-22 21:50:02 +01:00
Ripley Tom
ff04b47942 meson.build: Add -Werror=discarded-qualifiers 2026-02-22 15:59:56 +00:00
Ripley Tom
c847b81629 spa/plugins/alsa/acp/compat.h: Fix missed -Wdiscarded-qualifiers warning 2026-02-22 15:59:56 +00:00
Ripley Tom
367ce4626c
src/modules/module-rtp-source.c: Fix alignment requirement for 32 bit build 2026-02-21 20:55:17 +01:00
Wim Taymans
846096d435 scheduler: prepare link before usage
A link might become unprepared because a node suspended. When we want
to make the nodes runnable, make sure the link is prepared again.
2026-02-21 17:25:54 +01:00
Wim Taymans
476220c18b scheduler: don't take active state into account for grouping
The grouping of the node does not depend on the active state.
2026-02-21 16:33:21 +01:00
Wim Taymans
973f48dde7 scheduler: make always_process nodes runnable
Don't just set the flag but call make_runnable for always_process node
so that the peers also get activated.
2026-02-21 16:32:30 +01:00
Wim Taymans
9e82e49446 scheduler: rework the runnable state calculation
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.
2026-02-21 16:19:34 +01:00
Wim Taymans
ce18660127 tests: fix test 2026-02-20 10:35:31 +01:00
Wim Taymans
8f3d8d77ab impl-link: prepare a link right after creating it
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.
2026-02-20 10:35:31 +01:00
Arun Raghavan
5bd93b97ad Revert "spa: json: Add a helper method to shrink an object string"
Drop this until we have better API for building/visiting JSON.

This reverts commit c244fbf945.
2026-02-19 20:02:51 +00:00
Barnabás Pőcze
e46bfe67b6 treewide: fix some -Wdiscarded-qualifiers
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.
2026-02-19 21:00:10 +01:00
Barnabás Pőcze
d7c3e8c2bc pipewire: module-roc-{sink,source}: fix log format string issues
Passing an unknown string as the format string is unsafe, so don't do it.

Fixes: b9922d8ed5 ("module-roc: forward roc-toolkit logs to pipewire logs")
2026-02-19 19:37:15 +00:00
Barnabás Pőcze
d8b06f94ee pipewire: module-roc-{sink,source}: remove logging related unused code
!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.
2026-02-19 19:37:15 +00:00
Arun Raghavan
d4329600d1 audioconvert: Report loaded filter graphs in props
Makes it easier to know what filters have been loaded.
2026-02-19 19:29:40 +00:00
Arun Raghavan
c244fbf945 spa: json: Add a helper method to shrink an object string 2026-02-19 19:29:40 +00:00
Arun Raghavan
f5107f3e83 ci: Fix doccheck error message 2026-02-19 11:04:23 -08:00
Arun Raghavan
569c2dce55 doc: Add module scheduler subpage 2026-02-19 11:04:23 -08:00
Arun Raghavan
987579b7b7 tests: Update context events test
New field and version, update the test.
2026-02-19 10:45:45 -08:00