Commit graph

4868 commits

Author SHA1 Message Date
Wim Taymans
8afe5fe0f0 filtet-chain: handle empty nodes
When there are no nodes, we can't make links. This avoids getting into
an infinite loop when trying to find ports.
2022-05-07 15:58:39 +02:00
Wim Taymans
0c8cd4ab52 filter-chain: improve filter.graph parsing
First collect all the graph objects and then parse them in the
right order. Otherwise, we might try to parse links before the nodes if
they are first in the JSON string.

Fixes #1950
2022-05-07 15:53:10 +02:00
Barnabás Pőcze
211abaef5e protocol-native: remove destroyed client from client list
When the client destroys the protocol-native module, the server
and the client are destroyed but the client is still reffed (not freed).
It will be unreffed after its messages are processed, after which point
it will be freed and removed from the server client_list that is already
destroyed.

Fix this by removing the client from the server list when it is
destroyed.

See #565
2022-05-07 14:08:55 +02:00
Wim Taymans
d506781619 pulse-server: do a guess for the latency when starting
Guess the expected latency with the stream info we have and use that as
the node.latency. This way, the graph can attempt to start with some
sort of latency setting.

After we know the exact format, we can calculate the real latency and we
will update the node latency accordingly.
2022-05-06 16:54:22 +02:00
Wim Taymans
3f3e1352ae modules: update docs 2022-05-06 15:46:45 +02:00
Wim Taymans
eaf9a4feb0 pw-loopback: add -n option to set a node.name 2022-05-06 15:39:43 +02:00
Wim Taymans
37ba52005b module: also support global node.name
Support a global node.name and prefix it with input. and output.
if no per-stream node.name is given.
This might be less confusing.
2022-05-06 15:38:43 +02:00
Wim Taymans
19e3e20c47 protocol-native: improve client and resource refcounts
Add a refcount to resource and client so that we can keep them alive
while the native protocol is using them.

One problem might be that the protocol destroys the client or resource
while handling it and that would cause errors.

Fixes #565
2022-05-06 13:25:57 +02:00
Wim Taymans
383df85466 modules: handle factory destroy
Listen for factory destroy and clean up the module.

See #565
2022-05-06 12:11:20 +02:00
Wim Taymans
95f8c569a0 module-metadata: handle factory destroy
Destroy the module when the factory is destroyed.
2022-05-06 11:33:00 +02:00
Wim Taymans
8374c93e40 module-adapter: handle factory destroy
When the factory is destroyed, clean up and destroy the module as well.
2022-05-06 11:29:21 +02:00
Hagen
cb81e49f7d Remove unnecessary } in src/modules/module-raop-discover.c docs 2022-05-06 09:03:04 +00:00
Wim Taymans
15431570f4 module: handle global destroy properly
When the global is destroyed, we remove our listeners and set the global
to NULL.  We then destroy the module but because the global is NULL, we
don't remove ourselves from the list of modules, causing a crash later.

Fix this by always adding ourself to the list of modules and always
removing ourselves on destroy.

See #565
2022-05-06 10:16:37 +02:00
Wim Taymans
73694f72ee filter-chain: improve error reporting 2022-05-05 15:24:51 +02:00
Wim Taymans
6458df3678 filter-chain: fix some typos 2022-05-05 09:05:32 +02:00
Wim Taymans
777a8c687b audio-src: queued only requested frames
Use the new requested buffer field to only queue the amount of samples
required by the resampler for the current quantum. This avoid spikes
when the maxsize block of samples is processed.

Fixes #2353
2022-05-02 16:55:53 +02:00
Wim Taymans
0cab700c06 profiler: place rate suggestion in latency if given 2022-04-28 17:09:52 +02:00
Wim Taymans
da072d6613 settings: also allow 44.1KHz as samplerate
Make the default allowed samplerates be 44.1KHz and 48KHz to see
what happens..
2022-04-28 17:02:27 +02:00
Wim Taymans
c48a4bc166 pw-cat: fix DSF playback again
Make the DSD buffers a little bigger because we scale down the rate.
Read an interleaved number of samples to fill one quantum.
2022-04-28 12:32:08 +02:00
Wim Taymans
dfbb106aa8 pulse-server: use Rate control to change stream rate
Fixes #1159
2022-04-27 15:24:10 +02:00
Wim Taymans
e68364e5b7 stream: update node properties completely
Add some more context to the match rules and return how many properties
changed. If something changed, send all the properties as updates
instead of just the original changed ones.
2022-04-27 11:12:02 +02:00
Wim Taymans
ba7d410c3c handle realloc error better
Make sure we free the old pointer, clear it and set the array size to 0.
Use reallocarray where possible.
2022-04-27 10:09:06 +02:00
Wim Taymans
d9871f36c1 pw-cat: support saving to other file formats
Use the extension to find the file format and save to it instead of
forcing wav.

See #2328
2022-04-25 20:43:18 +02:00
Wim Taymans
0306855b5b module-roc: update docs 2022-04-25 20:26:07 +02:00
Wim Taymans
4bcc93b68e module-loopback: fix spelling
Thanks to Diego Viola and !1220
2022-04-25 17:03:45 +02:00
Wim Taymans
09ea37cfdf roc: add fec_code option
Add fec_code option.
Fix resample.profile parsing.
2022-04-25 16:20:55 +02:00
Wim Taymans
1e244b4ebd module-roc: try to switch rates
Try to switch the graph to 44100Hz.
2022-04-25 15:34:05 +02:00
Wim Taymans
4885baabb1 protocol-pulse: add roc-sink-input
Add a sink-input roc source, like the pulseaudio one.

Fixes #2331
2022-04-25 15:18:47 +02:00
Wim Taymans
ef2f8f981d roc-source: make the source a stream by default
So that it autoconnects to a sink.
Use requested buffer size as read size.
2022-04-25 15:16:54 +02:00
Wim Taymans
037304ce70 module-roc-source: don't set defaults
Don't set defaults, the real roc-source will handle that. Especially,
don't set the remote port as the latency.

See #2331
2022-04-25 15:14:50 +02:00
Wim Taymans
277447d8f9 module: add debug while dlopen failed 2022-04-25 15:09:37 +02:00
Wim Taymans
1e46d114d0 modules: update docs 2022-04-24 11:29:46 +02:00
Wim Taymans
e78b886785 module: update docs 2022-04-24 11:21:04 +02:00
Wim Taymans
d9fd4dc76a module-rt: fix formating and comment 2022-04-24 10:18:47 +02:00
Wim Taymans
b95c145446 module-rt: fix compilation 2022-04-24 10:14:56 +02:00
Thomas Bernard
5cad844b49 Replace sched_ calls with pthread_ to set realtime priorities 2022-04-24 08:14:01 +00:00
Wim Taymans
c9cf914d85 filter: don't use invalid context
The context is not yet set on the impl.

Fixes #2323
2022-04-23 12:31:13 +02:00
Wim Taymans
49486bceeb filter-chain: add a simple delay
See #2320
2022-04-22 21:40:01 +02:00
Wim Taymans
2dfc41766f filter-chain: fix config parse
We need to advance to the next item.
2022-04-22 21:33:49 +02:00
Wim Taymans
978c50e86c pw-link: make port_id char array larger
The id might not fit.
2022-04-22 21:06:40 +02:00
Antonio Larrosa
6dd3ee4e15 pw-link: Support destroying all links between ports of two nodes
With this commit, something like
`pw-link -d my-device alsa_output.headset` can be used to destroy
all links from output ports of `my-device` to input ports of
`alsa_output.headset`.
2022-04-22 17:29:52 +00:00
Antonio Larrosa
3a18da7cc3 pw-link: Support creating links for all ports from a node to another
This allows to call pw-link with output and input nodes instead of
ports and pw-link will connect all output ports from the first node
to all input ports in the second node by port-id.

Note that the number of ports in each node isn't checked before
starting, so the ports will be connected until there's no matching
port to connect (i.e. if the output node has 2 output ports and
the input node has 5 ports, then only the first two ports will be
connected).
2022-04-22 17:29:52 +00:00
Wim Taymans
368dd51d04 modules: update docs 2022-04-22 17:29:40 +02:00
Wim Taymans
553bb3f5ed modules: update docs 2022-04-22 17:08:45 +02:00
Wim Taymans
8807aa1dcd module: add docs 2022-04-22 16:51:27 +02:00
Wim Taymans
de4b021b34 modules: add docs 2022-04-22 16:44:15 +02:00
Wim Taymans
89010410eb modules: add more docs 2022-04-22 16:08:26 +02:00
Wim Taymans
e3b17581f2 modules: more docs 2022-04-22 15:18:24 +02:00
Wim Taymans
faf674a327 pulse-server: use config.ext for streams
Use the module config.ext to load extra stream properties and rules.
2022-04-22 14:54:27 +02:00
Wim Taymans
2402904e1e conf: support config section extensions
Add support for loading an additional config section when the config.ext
property was set.

This makes it possible to have per module config of stream.properties
and rules sections.

One use case is when there are multiple module-protocol-pulse modules
loaded where each module will use a different set of *.properties
and *.rules from the config. Each module will have a config.ext
property in the args with the suffix of the section that is loaded.
2022-04-22 14:50:39 +02:00