Wim Taymans
d8ad87fd09
context: improve settings and defaults
...
Make structure with defaults that holds the defaults as they are loaded
from the config file or initialized with default values.
Copy this structure to a settings version that is used at runtime.
Add a force-quantum and force-rate field in the settings that can be
used to force a quantum and samplerate if != 0.
2021-06-17 11:11:45 +02:00
Peter Hutterer
1d4b24d02b
pipewire: allow NULL pointers in pw_memmap_free()
...
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
2021-06-02 10:56:46 +00:00
Peter Hutterer
e0471c6757
pipewire: allow NULL pointers in pw_properties_free()
...
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
Patch generated with concinelle with a few manual fixes.
2021-06-02 10:56:46 +00:00
Peter Hutterer
2405f0942b
spa/buffer: rename SPA_MEMBER to SPA_PTROFF
...
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
2021-05-06 09:39:39 +00:00
Wim Taymans
a76032a637
client-node: use the right port for io
...
To set the io on the mixer ports, we need to use the same id that
was used to add the port, not the id we use to identify the mixer
structure.
Fixes #759
2021-04-28 17:04:36 +02:00
Wim Taymans
b3d94bf019
improve debug
2021-04-28 17:04:16 +02:00
Wim Taymans
eaf3b3a3c9
remote-node: remove the mix from the port
...
We add the mix in init and remove it again when clearing.
See #973
2021-03-26 21:14:42 +01:00
George Kiagiadakis
0ce6de8fdf
src: change license (LGPL -> MIT) on left-over LGPL files
...
Discussed with and approved by Wim
2021-02-10 11:52:09 +00:00
Wim Taymans
210950dc0a
context: disable mlock warnings by default
...
Make this a tunable option instead.
2021-02-08 10:59:02 +01:00
Wim Taymans
abfc67a3ca
Revert "remove mlock and use MAP_LOCKED"
...
This reverts commit ab91e94b59 .
When no memory can be locked, the mmap fails with -EAGAIN.
Fixes #592
2021-01-19 14:47:52 +01:00
Wim Taymans
ab91e94b59
remove mlock and use MAP_LOCKED
...
The warnings are confusing and a properly tuned system would have
the limits set correctly.
2021-01-19 11:59:21 +01:00
Wim Taymans
9bf7be7984
client-node: increase some limits
...
See #416
2020-11-25 17:41:05 +01:00
Wim Taymans
f42da492f9
warn about lock just once
2020-11-14 21:21:20 +01:00
Wim Taymans
8ca71060eb
improve some debug
2020-11-03 18:04:42 +01:00
Wim Taymans
0e3198272b
remote-node: only update changed fields
2020-10-09 16:31:17 +02:00
Wim Taymans
85977634c1
client-node: only add props and params when mask is set
2020-10-09 16:30:00 +02:00
Wim Taymans
e9fd38512e
node: improve debug
2020-09-17 10:34:42 +02:00
Wim Taymans
35534baf9d
remote-node: clear up mix structures when port is removed
2020-08-19 11:23:16 +02:00
Wim Taymans
0955ecc4b0
client-node: avoid useless warnings
...
Mostly useless warnings while shutting down.
2020-08-10 18:15:14 +02:00
Wim Taymans
fb76f484a9
remote-node: also send spa_flags
2020-08-10 16:45:44 +02:00
Wim Taymans
5fda46fdb9
remote-node: activate node after init
...
Activate the node after we successfully created a proxy and
initialized it.
2020-08-07 11:52:35 +02:00
Wim Taymans
e5f85d6a4c
remote-node: clean node on error
2020-08-07 11:52:14 +02:00
Wim Taymans
f4e8ebab51
improve debug and error messages
2020-08-07 10:47:18 +02:00
Wim Taymans
8b2617227a
client-node: improve debug
2020-08-06 17:59:58 +02:00
Wim Taymans
91d4806611
permission: add some helpers
...
Add PW_PERM_ALL as a shortcut for all permissions
Add PW_PERMISSION_FORMAT and PW_PERMISSION_ARGS to nicely format
permissions.
2020-07-30 16:26:29 +02:00
Wim Taymans
553337df60
remote-node: handle remove port
2020-07-22 16:20:43 +02:00
Wim Taymans
031a8ea799
client-node: also unref the activation memblock
2020-07-10 16:11:16 +02:00
Wim Taymans
e58fcb95d0
client-node: remove the tag from the right pool
2020-07-10 16:10:45 +02:00
Wim Taymans
5cd495c93c
client-node: free old mapping only after importing the new
...
Keep the old mapping around until we manage to successfully import
the new mapping.
2020-07-10 12:57:55 +02:00
Wim Taymans
0430e7b8dc
client-node: clean up our memory mappings
...
Loop over our memory mappings and clean them up when we are destroyed.
2020-07-10 12:46:48 +02:00
Julian Bouzas
f75dfde89c
remote-node: process the mixer if io status have HAVE_DATA flag
...
Needed for audio sources created locally
2020-07-06 12:08:27 -04:00
Wim Taymans
1e2ad41d94
remote-node: fix user_data
...
Pass the node_data around instead of the proxy. Get the proxy from
the node data.
Allocate user_data before the node_data so that the caller can
use the proxy user_data without overwriting the node_data.
2020-07-03 15:19:40 +02:00
Wim Taymans
dfd3bd84b4
buffers: increase max datas and metadata in buffers
2020-07-01 11:43:18 +02:00
Wim Taymans
4c8f8671d7
client-node: improve error reporting
2020-06-18 15:40:53 +02:00
Wim Taymans
2a11e66417
client-node: clear array fields
2020-06-16 21:22:06 +02:00
Wim Taymans
3859b14adf
client-node: dynamically allocate the mix structs
2020-06-16 18:21:58 +02:00
Wim Taymans
eac046a86b
client-node: place invalid mix at begin instead of end
...
..so that we can resize the array later.
2020-06-16 17:52:39 +02:00
Wim Taymans
fb1ea646f5
client-node: remove unused field, add some debug
2020-06-16 17:41:54 +02:00
Wim Taymans
61c1fe546e
client-node: fix buffer size calculation
...
Calculate the size of the buffer as the difference between the first
byte and the last byte. This takes into account the alignment.
2020-06-15 20:44:08 +02:00
Wim Taymans
180f2b0f20
client-node0: clean up resource
2020-06-08 17:14:36 +02:00
Wim Taymans
d566c8858c
port: don't send reuse_buffer on node again
...
When we get a reuse_buffer on the input mixer we should find the
linked mixer and send the reuse_buffer to that one, not the node
itself.
2020-06-08 14:19:13 +02:00
Wim Taymans
0efadbb297
client-node: free old mem after setting new mem
2020-06-05 13:04:43 +02:00
Wim Taymans
972a790cf2
client-node: send error when node_set_io fails
2020-06-05 13:03:16 +02:00
Wim Taymans
969377b079
client-node: simplify cleanup
...
Remove the extra proxy to the node, it's awkward and not needed.
pw_core_export() returns a handle to the remote object with the
interface of the factory.
If the node is destroyed, make sure the proxy doesn't access
it anymore.
If the handle is removed or destroyed, make sure we remove the
proxy related info around the node. Never destroy the proxy
ourselves, this is something the app needs to do when it is
ready.
2020-06-05 12:43:26 +02:00
Wim Taymans
8292c556e9
client-node: first set param, then clear buffers
...
Because setting the param might still access the buffer to do
cleanup.
2020-06-04 10:15:37 +02:00
Wim Taymans
6d0fd7b58c
remote-node: run _destroy in the _removed handler
2020-06-03 15:42:45 +02:00
Wim Taymans
4405fe4c14
remote-node: handle deleted client-node
2020-06-03 15:28:28 +02:00
Wim Taymans
b4b7ba4cbb
remote-node: suspend node before cleanup
...
When the proxy is destroyed, suspend the node before we start
removing the memory or else the node might still be using it from
the data thread and crash.
2020-06-03 12:04:01 +02:00
Wim Taymans
4060934109
client-node: keep track of the client allocated fd
...
when we get port_buffers with memory from the client, store this
in the buffer data and make sure we close the fd when the buffers
are removed.
2020-06-02 15:19:39 +02:00
Wim Taymans
c04a9b546d
client-node: refuse the wrong amount of client buffers
...
Make sure we get the same amount of buffers from the client as
we asked to allocate.
2020-06-02 15:18:18 +02:00