Commit graph

8846 commits

Author SHA1 Message Date
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
9e3b784b34 bluez5: use reallocarray 2022-04-27 09:27:32 +02:00
Wim Taymans
c0cf2d802b jack: handle allocation errors better 2022-04-27 09:26:40 +02:00
Wim Taymans
92e2b7dd0d json: improve unicode parsing
Make sure don't overread the strings.
Don't use sscanf but use a custom hex read function.

Fixes #2340
2022-04-27 08:37:32 +02:00
Wim Taymans
f641e4ecb3 jack: don't wait for activation update
We could do an invoke, wait, then the process could do a jack_connect()
, do_sync and we deadlock. it's probably better to not wait for
completion.
2022-04-26 20:32:25 +02:00
Wim Taymans
838ab996d0 jack: fix a potential deadlock
When some blocking method is performed on the process thread, like
jack_connect() mark the data thread as blocked while we wait for the
thread loop to process the result.

If we then try to do a blocking _invoke from the thread loop on the
data thread, make sure we don't wait for it to complete or else we
deadlock.
2022-04-26 20:15:58 +02:00
Wim Taymans
5137015c33 json: convert utf16 to utf8
We work with utf8 string so convert the unicode escape sequences to
utf8.

Fixes #2337
2022-04-26 15:38:22 +02:00
Wim Taymans
f2cdb15e0c json: fix \uXXXX parsing
We need exactly 4 hex characters, everything else is refused. We
also copy those characters directly to the output string without
assuming any encoding.

See #2337
2022-04-26 11:01:33 +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
Pauli Virtanen
689e2d0cc9 bluez5: clear codec switch flag on device connnection change
Codec switch flag should be cleared on device connection status change,
to deal with codec_switched() callback not being called if device is
suddenly disconnected.
2022-04-25 21:28:39 +03:00
Wim Taymans
0306855b5b module-roc: update docs 2022-04-25 20:26:07 +02:00
Pauli Virtanen
3be019d7a8 bluez5: stop running codec switch on disconnect
When device is disconnected, running codec switches are not meaningful,
and should be stopped.

The codec switch callback may also trigger A2DP profile switch, which
may reconnect the device. Fix it so this does not happen.

See #2334
2022-04-25 20:15:37 +03: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
Dennis D
08e7ac6239 Update spa/plugins/bluez5/bluez-hardware.conf
Fixes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2291
2022-04-23 19:53:24 +00:00
Wim Taymans
bb8a0b5e06 jack: only call buffer_size callback after change
Don't call the buffersize callback the first time but only when the
size changed since the last process or get_buffer_size() call.

Fixes #2324
2022-04-23 21:37:45 +02: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
e406ff9530 doc: add an older AGL Paper 2022-04-23 10:16:22 +02:00
Wim Taymans
54e96d2d10 doc: Add good bluetooth article 2022-04-23 10:14:00 +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
Wim Taymans
59461113ba context: make dict const
The match rules operate on a const struct spa_dict.
2022-04-22 13:10:08 +02:00
Wim Taymans
fcc6f7fc7c module-filter-chain: some more docs 2022-04-22 11:33:04 +02:00
Wim Taymans
932bbe4de6 module-filter-chain: add support for double params 2022-04-22 11:04:09 +02:00
Wim Taymans
ad178b8b5c module-filter-chain: add docs 2022-04-22 11:03:51 +02:00
Wim Taymans
61d318125e move PIPEWIRE_PROPS to stream and filter
Make all streams and filters handle PIPEWIRE_PROPS.
The order for applying stream/filter properties is:

1) application provided properties.
2) generic config.
3) match rules.
4) environment variables (PIPEWIRE_PROPS, ...) from generic to
   more specific.
5) defaults.
2022-04-22 09:37:21 +02:00
Wim Taymans
5a023c8c84 alsa: fix argument type for Long
Fixes #2271
2022-04-21 22:13:16 +02:00