Commit graph

6281 commits

Author SHA1 Message Date
Wim Taymans
7a629fa378 impl-link: block some actions when destroyed
When we destroy a port, make sure we don't start to reactivate it
again.
2023-06-21 10:25:30 +02:00
Wim Taymans
1e4adff3fa impl-port: only add and remove the mix info once
Or we might crash.
2023-06-21 10:24:57 +02:00
Wim Taymans
265e6ca352 client-node: rename confusing id to mix_id
There is already an id in the port_mix structure that can be used to
index the mix structures in map if needed, the mix_id is the port_id of
the mixer and should not be confused.
2023-06-21 10:23:07 +02:00
Wim Taymans
44d2ba5276 impl-node: make node not-runnable when destroying
This avoid some links that are activated again when the node is
destroyed.
2023-06-20 20:46:20 +02:00
Wim Taymans
fd358c511d context: a node is runnable only when active
Also check if the node is active to decide if the node is runnable.
2023-06-20 20:45:42 +02:00
Wim Taymans
001f0656d4 remote-node: refactor init/create/ensure mix
Make a create_mix function that also takes the peer_id.
2023-06-20 19:24:38 +02:00
Wim Taymans
6806af954e impl-port: improve debug
Debug the mix port id as well.
2023-06-20 19:00:23 +02:00
Wim Taymans
9fa46af488 filter-chain: add link to biquad help page
Fixes #3257
2023-06-20 09:48:38 +02:00
Dmitry Sharshakov
4659bca609 pipewire-aes67: move the PTP driver to AES67 process 2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
f257c3407d node-driver: allow specifying both PHC and ID 2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
0fc1112c6d module-rtp-sap: get source.ip from network interface if not supplied 2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
6581d4ee2a module-rtp-source: fix crash on stream deletion 2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
991e3928d4 rtp-stream: do not set false ptime values 2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
6d2b43b51c pipewire-aes67: improve default config
Ensure visibility in Dante Controller, improve SAP config

Co-authored-by: Sebastian Jaeckel <wose@zuendmasse.de>
2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
024dc74e53 module-rtp-sap: bind transmission socket
Makes packets fly to correct interface
2023-06-20 06:51:30 +00:00
Wim Taymans
882df500b6 module-ffado: don't read/write twice
The process callbacks are called twice, once on graph start and once
on graph complete, make sure we only read in the right phase.
2023-06-19 16:43:56 +02:00
Wim Taymans
7805a454df module-jack: fix jack scheduling
Our sink and source callbacks are called twice, once when the graph
starts and once when it completes, make sure we don't signal the jack
graph twice or we get corrupted output.

Fixes #3255
2023-06-19 16:37:03 +02:00
Wim Taymans
3dbb865d6d module-node-factory: add option to export object
Add an option to export the node from the factory.

That way you can locally create a node from a factory and then export it
to the server. This is handy to make object in the server from a config
file using the node-factory.

See !1643
2023-06-19 12:41:30 +02:00
Wim Taymans
d321e9b93e core: ensure we don't remove and disconnect twice
Check for multiple recursive disconnect calls by checking the flags
before calling the pw_proxy methods. This ensure that calling disconnect
from one of the proxy removed callbacks does not trigger another
disconnect later on.
2023-06-19 12:31:46 +02:00
Wim Taymans
946457d555 stream: add some docs 2023-06-18 17:13:34 +02:00
Wim Taymans
901388ae00 stream: PIPEWIRE_AUTOCONNECT env overrides config
Always make the env variable override any config setting.

See #3299
2023-06-18 17:09:15 +02:00
Wim Taymans
2919b55f7f impl-link: don't set io in mix
Let the implementation handle this when needed. The main problem is that
we can set this to NULL before calling the port function and that might
crash things.
2023-06-16 20:31:33 +02:00
Wim Taymans
81fd6d5275 properties: improve containter serialize
If we are not recursing, take the complete property value without
attempting to parse it as json, only do this when recursing.

If the property value looks like a container is is exactly of the right
length, print is as a container, otherwise print is as string.

This makes properties like "[192.0.0.1]:45000" be printed as a string
instead of the array [192.0.0.1]. but still makes "[FL FR]" be an
array.

Fixes #3290
2023-06-16 17:36:25 +02:00
Wim Taymans
7c7e814b02 modules: build virtual sink/source 2023-06-16 16:24:49 +02:00
Wim Taymans
989c61e8a1 pulse-server: add virtual-sink and virtual-source
Although those are example elements, they actually work and we can
implement them as well.
2023-06-16 12:18:36 +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
Wim Taymans
cfaf424ed8 module-loopback: always dequeue the last capture buffer
Because the capture triggers the playback stream, the playback stream
might not be actually triggered when the stream is not running.

This can cause a buffer to be queued in the capture side that is never
dequeued from the playback side. If 2 buffers are queued (and 2 buffers
are available on the stream), the capture source has no more buffers and
starts to drop/stutter.

Fix this problem by always dequeueing/queuing all the queued buffers so
that we always use the last one.

See #3276
2023-06-16 11:12:51 +02:00
Wim Taymans
a0a32af386 pulse-server: add 2 quirks to block sink/source updates
See #1517
2023-06-15 11:45:43 +02:00
Wim Taymans
0b2d9ee007 module-session-manager: use dynamic builder
The buffer is very small and we should use a dynamic builder if we don't
know what pod we will expect.
2023-06-15 11:05:17 +02:00
Wim Taymans
bbf8f1a0c8 module-loopback: request renegotiation when suspended
When one side of the loopback suspends, do a EnumFormat params to force
renegotiation on the other side as well.

Suppose this:

1. sink/filter/pw-play plays at 48000Hz
2. pw-play goes away, sink and filter-sink suspend, filter-playback
   idles
3. pw-play starts with 44100Hz
4. sink/filter-sink renegotiate to 44100Hz, filter-playback is still
   at 48000Hz and pitch shifted.

We might want to manually suspend the IDLE nodes instead but for now
this is a good workaround.

Fixes #2969
2023-06-14 17:32:24 +02:00
Wim Taymans
aaa91b2b7e stream: remove READ flag when removing params
Clear the READ flag when the param is removed.
Don't recursively emit param_changed events or we could end up in an
infite loop when we update params from param_changed.
2023-06-14 16:28:39 +02:00
Wim Taymans
0e516dec44 module-loopback: keep separate info for the delay rate/channels 2023-06-14 16:28:39 +02:00
Niklāvs Koļesņikovs
3be07c7de2
src/modules/meson: make Opus custom modes optional for NetJack2
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2023-06-14 13:54:08 +03:00
Wim Taymans
5e0fedf63f impl-node: improve debug
Use current time to do ratelimit.
Improve debug, add name and id when triggering the targets.
Don't increment xrun of driver when a node xruns.
2023-06-14 11:20:34 +02:00
Wim Taymans
b080b31848 impl-port: make the rt.mix_list private
The rt.mix_lst is really something internal to the tee and fallback
mixer in the ports so make it private.

Use the port_set_io call to add the Buffer io area to the mix_list
tee and fallback mixer on the port, like we do for remote-node. We can
then remove the custom code to do this in remote-node and impl-link.

Remove an unused field (clock) in the port struct.

Remove the unused io_set field in impl-link, it is always in sync with
the activated field.
2023-06-13 15:19:46 +02:00
Wim Taymans
9ba3792038 stream: data_loop is NULL when not connected
When there is no node (not connected) the data_loop should remain NULL.
2023-06-13 10:11:24 +02:00
Wim Taymans
784f003068 stream: remove and check callbacks safely
Clear the callbacks from the processing thread to avoid races.
Check the callbacks in the processing thread before calling them,
we just need to check if there are functions, we checked the method when
installing the function.

Fixes #3251
2023-06-13 09:37:28 +02:00
Wim Taymans
8d62bb1e97 module-zeroconf: fix compilation 2023-06-13 08:52:32 +02:00
Christian Glombek
d18db904b9 module-zeroconf: Fix deduplication
Ports recent fixes and improvements regarding the deduplication of sink
creation from module-raop to module-zeroconf.

- 0bb0b524c7
- 14fd7f7bf7
2023-06-13 03:09:54 +02:00
Christian Glombek
389cbe7aef module-raop: Avoid props creation for duplicates 2023-06-12 18:40:04 +02:00
Wim Taymans
da86c2030c module-netjack2: improve OPUS fallback 2023-06-12 18:37:47 +02:00
Wim Taymans
deba261a1b module-netjack2: fix compilation without OPUS 2023-06-12 18:25:53 +02:00
Wim Taymans
fb63bb3c5c module-netjack2: start follower after START message 2023-06-12 17:56:20 +02:00
Wim Taymans
0cfd94eb52 module-netjack2: support int and opus in driver 2023-06-12 17:40:16 +02:00
Wim Taymans
19f3e422e1 module-netjack2: add int support 2023-06-12 17:01:13 +02:00
Wim Taymans
8dfb22d12b module-netjack2: add opus support 2023-06-12 11:44:50 +02:00
Wim Taymans
802b51a0cb module-raop: set min-latency correctly
I think we need to set this to the min-latency, not the latency
we will report in the sync messages.

See #3282
2023-06-11 19:51:54 +02:00
Wim Taymans
8eb6c0ec33 pulse-server: handle special device names in play/record
@DEFAULT_MONITOR@ finds the default sink but returns is_monitor true.

Always lookup the device based on the name and index. This transform
the special device names like @DEFAULT_XXX@ to the default device.

Always use the found device name as the target. Make sure to set the
CAPTURE_SINK property when dealing with a monitor.

Fixes #3284
2023-06-11 18:37:24 +02:00
Barnabás Pőcze
b52be160ab pipewire: thread-loop: print thread id as pointer
On musl, `pthread_t` is a pointer type, so printing it
as a long generates warnings. So cast it to `void *`
and print it with "%p" since it is actually a pointer
even on glibc (nptl) (at least at the time of writing...).
2023-06-10 02:26:40 +02:00
Barnabás Pőcze
dfb3cb20af pipewire: module-raop-sink: check asprintf return value
GCC warns because `asprintf()` has the `warn_unused_result`
attribute, so check the return value to silence the warning.
2023-06-10 02:22:08 +02:00