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
Wim Taymans
bb1cb530fc
add more debug of fd create and close
2020-06-02 14:06:51 +02:00
Wim Taymans
c2028a1695
Fix some leaks in error cases
2020-05-20 15:24:25 +02:00
Wim Taymans
8669fd03a6
initialize variables better
2020-05-20 15:24:25 +02:00
Wim Taymans
459acda619
client-node: use spa_system functions
2020-05-20 15:24:25 +02:00
Wim Taymans
a898f21c87
improve debug
...
When we fail to read the eventfd, don't try to use the value.
2020-05-20 15:24:25 +02:00
Wim Taymans
fdb3985f1a
client-node: handle NULL port
...
Don't try to remove an already removed port.
2020-05-12 10:12:28 +02:00
Wim Taymans
2c13b3ecd2
client-node-v0: return -ENOENT when parameter not found
2020-05-07 10:42:19 +02:00
Wim Taymans
940ff7f53b
client-node: improve error reporting
...
Separate read failure and missed wakeup in 2 messages.
2020-05-01 11:23:54 +02:00
Wim Taymans
3324a15fe3
protocol: use bool for Bool pod
2020-04-30 17:12:20 +02:00
Wim Taymans
0fd46d057e
remote: free io area after we set the new area
...
First set the new area, then destroy the old one. Otherwise the
data thread might still be using the old area and crash.
2020-04-30 16:13:50 +02:00
Wim Taymans
acd9991bfc
remote-node: remove unused position area
2020-04-30 11:55:46 +02:00
Wim Taymans
856e1fe812
client-node: don't error in cleanup
...
It's possible the cleanup code might try to clean up ports we
already removed, don't show an error on that.
2020-04-28 13:56:23 +02:00
Wim Taymans
aafd1e7298
improve debug
...
Improve log so that debug level 3 gives a reasonably readable overview
of what is going on.
2020-04-22 12:47:18 +02:00
Wim Taymans
ee5c3349a0
client-node: don't try to clear port when destroyed
...
When the client destroyed a port, don't try to clear the
buffers because the client should have done that already.
2020-04-21 15:54:51 +02:00
Wim Taymans
22e590c7cc
stream: somewhat implement drain better
...
Abuse the xrun callback in the adapter to emit the drained signal until
almost all data left the resampler. This needs more work with a proper
signal and a buffer flag to signal the drain.
2020-04-02 17:46:50 +02:00
Wim Taymans
d1091462ab
transport: init io_buffers with SPA_IO_BUFFERS_INIT
2020-04-02 15:36:56 +02:00
Wim Taymans
74ab04af26
client-node: use BUFFER_INIT to reset io_buffers
2020-04-02 15:31:58 +02:00
Wim Taymans
67eb89689d
stream: only warn about mlock when in RT mode
...
Only warn about mlock failure when the stream is configured to
operate in REALTIME mode.
2020-03-20 11:21:44 +01:00
Wim Taymans
0d3aa1fd30
Fix export type prototype
...
Pass the type as provided by the export type. This way we can
look up the owner of the export type later.
2020-03-19 18:12:07 +01:00
Wim Taymans
8a2af908a7
small optimizations
...
Add some SPA_LIKELY
Enable FASTPATH by default
2020-03-18 15:43:29 +01:00
Wim Taymans
c8633767e7
remote-node: map buffer metadata readwrite
...
Map the buffer metadata in read/write mode. Some metadata might
need to be writable even for input buffers (like ref-count metadata)
2020-03-02 16:51:32 +01:00
Wim Taymans
0ed86941ce
client-node: only return -ENOENT for unknown param
...
Always iterate all params because we are only supposed to
return -ENOENT for unknown params and if we start iterating at some
random start position we might be past the paran and report -ENOENT
wrongly.
2020-03-02 12:26:10 +01:00