Barnabás Pőcze
29a288ebae
pulse-server: pending-sample: remove done flag
...
The `done` member of the `pending_sample` struct is only ever
set, but never read. Remove it.
2022-02-02 15:40:43 +00:00
Barnabás Pőcze
9447dbe4f8
pulse-server: remove unnecessary include
2022-02-02 15:40:43 +00:00
Barnabás Pőcze
5db2c6cc32
pulse-server: simplify a condition
...
`a || (!a && b)` equals `a || b` due to the
short-circuiting nature of `||` and `&&`.
2022-02-02 15:40:43 +00:00
Barnabás Pőcze
6d0075b4e9
pulse-server: client: cancel related work queue jobs
2022-02-02 15:40:43 +00:00
Barnabás Pőcze
78aaa0a3dd
pulse-server: client: move to cleanup list on detach
...
Move a client to the `impl->cleanup_clients` list right
after it has been removed its server's `clients` list.
2022-02-02 15:40:43 +00:00
Barnabás Pőcze
d2edb1ab16
pulse-server: client: do not leave dangling pointers behind
2022-02-02 15:40:43 +00:00
Wim Taymans
432f464297
conf: implement match rules with conf_section_for_each
2022-02-01 16:35:16 +01:00
Wim Taymans
dbab29d9db
pulse-server: improve remap sink/source properties
...
Make the NODE_DESCRIPTION based on target sink or node.name
2022-01-31 12:40:38 +01:00
Wim Taymans
7ec920b0af
pulse-server: improve remap sink/source properties
...
Make the same MEDIA_NAME and NODE_DESCRIPTION for both streams.
Make a better NODE_NAME for the other stream with a prefix.
2022-01-31 12:07:49 +01:00
Wim Taymans
115875dc5b
pulse-server: add more properties
...
Add device.class property
2022-01-29 11:21:31 +01:00
Wim Taymans
78ff44b91d
pulse-server: fill description for remap module
...
See #2076
2022-01-29 11:11:44 +01:00
Wim Taymans
6543899fe6
pulse-server: implement stream_buffer_attr
2022-01-28 17:34:36 +01:00
Wim Taymans
ce03fc7c15
pulse-server: increase maxlength to match tlength
...
When we need to increase tlength because of a quantum change, increase
maxlength as well, but clamp it to MAXLENGTH.
See #2069
2022-01-28 16:23:42 +01:00
Wim Taymans
1ac1f914e3
pulse-server: allows allocate MAXLENGTH for the ringbuffer
...
See #2069
2022-01-28 16:21:03 +01:00
Wim Taymans
5ead4507cc
pulse-server: ensure tlength <= maxlength
...
See #2069
2022-01-28 16:15:26 +01:00
Wim Taymans
ee007eaf6c
modules: improve simple-protocol arguments
...
Use the format parsing code to also parse the channel_map.
Improve serialization of the properties.
See #2068
2022-01-27 16:31:01 +01:00
Wim Taymans
db2719f1f4
pulse-server: always advance the read pointer in underrun
...
We should always advance the read pointer when we are underrun and
not corked. This will request more bytes from the client to make
things advance.
Fixes #2041
2022-01-25 15:21:31 +01:00
Wim Taymans
b9c8f0f6b9
pulse-server: don't complete drain when corked
...
A corked stream should not complete a pending drain operation.
2022-01-25 15:20:27 +01:00
Wim Taymans
1b0252c267
Revert "pulse-server: don't ask data when corked"
...
This reverts commit 3b14afe317 .
Breaks mpv..
2022-01-25 13:23:58 +01:00
Wim Taymans
3b14afe317
pulse-server: don't ask data when corked
...
Don't ask for data when we are corked. Some clients like telegram
don't send data when corked.
See #2041
2022-01-25 13:18:56 +01:00
Wim Taymans
4f57f3cdae
pulse-server: allow per-application latency quirks
...
Make it possible to set latency and buffer parameters in the matching
rules.
Add a rule for speech-dispatcher and force it to some larger latency.
2022-01-22 16:17:09 +01:00
Wim Taymans
7f08cadca4
pulse-server: move quirks to config section
...
Make a pulse.rules section in the config file with match rules. Add
support for setting custom client properties and quirks.
2022-01-22 11:51:11 +01:00
Wim Taymans
000b448ba3
pulse-server: set the node.name on the input/output
...
Not on the global property because module-loopback does not read it
from there anymore in order to have unique names.
2022-01-21 17:55:32 +01:00
Wim Taymans
373432a4e7
pulse-server: implement module-x11-bell
...
Just load the x11-bell module into the pulse server.
See #1668
2022-01-21 17:01:18 +01:00
Barnabás Pőcze
cec9347864
pulse-server: iterate addresses correctly
...
When creating servers, actually iterate the addresses correctly instead
of only using the first address.
Fixes #2047
2022-01-21 10:25:46 +01:00
Wim Taymans
9935f921c5
pulse-server: use TARGET_OBJECT with the target serial
...
Use a new TARGET_OBJECT property to ask to be linked to a target by name
or serial. This should deprecate NODE_TARGET later.
2022-01-19 17:09:55 +01:00
Wim Taymans
dec2b1b9a2
pulse-server: set serial to invalid on parse error
2022-01-19 16:57:17 +01:00
Wim Taymans
1d03923a97
pulse-server: use object serial as index
...
Use the lower 32 bits of the object serial as the index. When there is
an overflow, use an invalid index, which will probably result in a
protocol error.
2022-01-17 12:48:31 +01:00
Wim Taymans
0904a35ba8
pulse-server: make separate index
...
Separate the id (the pipewire object id) from the index (what we send to
the client to identify the objects).
2022-01-17 12:01:13 +01:00
Wim Taymans
955e4287ab
pulse-server: index flags are only used for modules
...
one flag for the internal extension modules, another flag for the
modules we load in pulse server that don't really have a matching
pipewire module.
2022-01-17 10:28:09 +01:00
Wim Taymans
6a2aea8e0a
pulse-server: remove the MONITOR flag
...
PulseAudio has separate namespaces for sources and sinks so we can reuse
the same id for the sink and its monitor.
2022-01-17 10:25:26 +01:00
Wim Taymans
48e83fc780
pulse-server: find_object -> find_object_by_id
2022-01-17 10:04:28 +01:00
Wim Taymans
3b85369ff6
pulse-server: use key instead of id for the data key
2022-01-17 10:03:02 +01:00
Wim Taymans
b2d221a66c
pulse-server: rename obj_id -> id
...
Simply use id for the object id.
2022-01-17 09:50:41 +01:00
Wim Taymans
5a315d5351
pulse-server: rename some id -> index
...
It's port_index and profile_index.
2022-01-17 09:49:39 +01:00
Wim Taymans
7c6649b5e5
pulse-server: use quantum_limit
...
Don't use max_quantum as the upper quantum limit, this is now scaled
with the rate. Use quantum_limit instead. We don't really care about the
max_quantum anymore so get rid of the field.
2022-01-14 16:45:41 +01:00
Wim Taymans
6394537dbd
pulse-server: remove unused field
...
And it's not quite useful to debug the value either.
2022-01-14 10:41:11 +01:00
Wim Taymans
661ff95748
pulser-server: use max_client settings instead of constant
2022-01-13 19:53:06 +01:00
Barnabás Pőcze
3d081215f2
pulse-server: improve message queue pruning
...
Firstly, separate the message dropping logic into
its own `drop_from_out_queue()` function.
Secondly, do not check earlier messages if the NEW
event for a particular object has been reached while
processing a REMOVE event for that object.
Thirdly, if - while processing a REMOVE event -
the corresponding NEW event is found and dropped,
drop the REMOVE event as well.
See #1840
2022-01-13 18:14:42 +00:00
Pauli Virtanen
11e57de7b0
pulse-server: index mask is now 24 bits
...
Update INDEX_MASK to match the new id allocation scheme.
2022-01-13 19:08:45 +02:00
Wim Taymans
3a49168f26
pulse-server: use the upper 8 bits of the id to mark things
...
The upper 8 bits of the object id is always 0 so we can use it to mark
our internal objects.
2022-01-13 14:54:16 +01:00
Wim Taymans
776b52749f
Use configured quantum_limit instead of hardcoded value
...
Parse the quantum_limit parameters and use this to scale the buffers so
that they can contain the maximum allowed samples instead of the
hardcoded 8192 value.
See #1931
2022-01-12 17:50:12 +01:00
Wim Taymans
676bed734c
context: scale max_quantum and add quantum_limit
...
Also scale the max_quantum with the selected rate. Add a new
quantum_limit property that is the upper limit of the quantum regardless
of the sample rate, this is usually the allocated buffer size.
See #1931
2022-01-12 17:44:45 +01:00
Wim Taymans
982758ffed
pulse-server: calculate missing bytes differently
...
Based on patch from Barnabás Pőcze <pobrn@protonmail.com>
Instead of trying to keep track of the missing bytes ourselves, use the
simple tlength - avail - requested formula to request more bytes from
the client.
Fixes #1981
2022-01-10 15:08:52 +01:00
Wim Taymans
163c365340
pulse-server: implement control arg for module-ladspa
...
See #1987
2022-01-07 16:40:36 +01:00
Wim Taymans
222ef88704
pulse-server: request more data when seeking backwards
...
Immediately ask for more data when we seek backwards so that we don't
underrun in the next process cycle.
See #1981
2022-01-07 10:59:41 +01:00
Wim Taymans
ab425d44b8
pulse-server: after uncork, ask for missing data
...
When we uncork, ask for any missing data immediately so that we don't
underrun in the next process cycle.
See #1981
2022-01-07 10:41:10 +01:00
Pauli Virtanen
9eddd0474f
pulse-server: show monitor sources with device.class=monitor
...
Pulseaudio shows monitors with device.class=monitor, so we follow.
2022-01-06 20:32:53 +00:00
Wim Taymans
22625fb658
pulse-server: support server config
...
Extend the server.address property so that you can also specify
an object per server. Add support for configuring some aspects of the
server such as max-clients and backlog.
Most importantly, the pipewire client.access can be configured per
server.
See #1960
2022-01-04 14:30:33 +01:00
Wim Taymans
611591d0fc
json: add spa_json_parse_stringn()
...
It also checks the destination size.
2022-01-04 12:37:00 +01:00