Commit graph

22 commits

Author SHA1 Message Date
George Kiagiadakis
8735d07c0a combine-stream: add support for "on-demand" streams
Instead of just following static target match rules to create output streams,
this feature allows the user to dynamically create more output streams
with custom targets using metadata.
2023-10-17 19:38:03 +03:00
Wim Taymans
d2b6a76798 modules: the combined streams are always async
We never trigger processing from their callbacks in all cases so they
need one extra buffer.
2023-10-16 10:42:39 +02:00
Wim Taymans
b094057b0b handle NULL latency param
Fixes #3504
2023-09-13 11:13:48 +02:00
Wim Taymans
8dd294bf44 conf: support ! to negate the match
So that you can do "application.name" = "!pw-cat" to match anything
that is not pw-cat and "application.name" = "!~pw-cat$".

Fixes #3460
2023-08-25 11:39:28 +02:00
Wim Taymans
39165a8471 modules: add ASYNC flag
Add ASYNC flags for the streams that don't dequeue/queue in the realtime
process function so that an extra buffer is allocated.
2023-06-27 13:11:13 +02:00
Wim Taymans
ad5ac964af module: disable resample when following graph rate
When we don't set a rate, assume both input and output streams are
following the graph rate and so disable the resampler.

This mostly works around an issue where the input and output could
negotiate to different rates in some cases. With the resampler disabled
this would still result in the same amount of samples going in as
comming out instead of a stuttering mismatch.

See #2969
2023-06-22 11:18:04 +02:00
Wim Taymans
b9789e36cd module-combine: always use last input buffer
To handle the case where buffers are queued up because a trigger didn't
complete.
2023-06-16 11:31:13 +02:00
Pauli Virtanen
2a0f1597ab module-combine-stream: fix race when destroying streams
Use separate flag for indicating if pw_stream_destroy is needed.

Don't set s->stream = NULL to indicate that, it will race with data
loop. Setting to null separately is not needed, removing from the stream
list is enough.
2023-05-06 07:24:31 +00:00
Pauli Virtanen
cc5da73665 module-combine-stream: add option to add delays for latency compensation
Add combine.latency-compensate option, which uses delay buffers to
compensate for different latencies in the target streams.
2023-05-03 11:22:01 +00:00
Pauli Virtanen
7d4491ce6b module-combine-stream: add latencyOffsetNsec prop
Add latencyOffsetNsec prop to the combine node.

This is mainly useful for BAP device sets; the property appears in
Pulseaudio UI only when the node is associated with a device.
2023-05-02 13:43:56 +00:00
Pauli Virtanen
a6481c48aa module-combine-stream: propagate latency
Propagate latency information from the target streams to the combine
stream.
2023-04-30 19:02:52 +00:00
Wim Taymans
d78bea5e32 module-combine-stream: improve docs 2023-03-23 11:47:27 +01:00
Wim Taymans
07e6f44e58 modules: clean up USAGE arguments
use () to mark optional arguments to avoid confusion with arrays.
Add some more optional arguments.
2023-03-22 16:35:55 +01:00
Wim Taymans
1985eb3549 module-combine-stream: make sure str is != NULL 2023-03-16 11:44:28 +01:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Thomas Weißschuh
4f9f32084c module-combine-stream: add missing proxy event version 2023-02-06 06:07:13 +00:00
Wim Taymans
64dca0b36d pipewire: add conf.h to standard includes
Also fix function signature so that it matched the .h file.
2023-01-25 13:23:44 +01:00
Wim Taymans
6d6cd6bbfb module-combine-sink: remove listener before core_disconnect 2023-01-24 15:41:00 +01:00
Wim Taymans
4eac50966a combine-stream: also set DONT_RECONNECT 2023-01-24 13:28:48 +01:00
Wim Taymans
94b4fd80eb module-combine: destroy stream when unconnected 2023-01-23 18:06:07 +01:00
Wim Taymans
2db9035538 module-combine-stream: safely add/remove stream from data thread
Use invoke to sync the data thread with the main thread when adding
and removing streams.
2023-01-23 17:53:22 +01:00
Wim Taymans
29787b51ef modules: add combine-stream module
The module can:

- Make a sink that sends all or some channels to other sinks.
- Make a source that combines multiple sources into one.

The selection of what streams to combine is implemented with rules so
that the selection is very configurable. By default all Audio/Sink or
Audio/Source nodes are selected.
2023-01-23 17:06:56 +01:00