Wim Taymans
09913ca4ab
metadata: free when the global is destroyed
2020-06-02 17:16:09 +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
George Kiagiadakis
6ecbe00774
session-manager: emit cached info with CHANGE_MASK_ALL on new resources
2020-06-01 16:25:40 +00:00
Wim Taymans
6a689b3c7f
client-node: don't ref destroyed resource
...
Ownership of the node_resource is taken by _new() and freed.
Don't try to use it afterwards to send an error when something
goes wrong but use the original resource.
2020-05-20 15:24:25 +02:00
Wim Taymans
963b00b77b
adapter: return an error when we can't find a format
2020-05-20 15:24:25 +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
ce98162ed2
Make sure we don't read too much
2020-05-20 15:24:25 +02:00
Wim Taymans
eb93f259e0
avoid some useless assignments
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
a19bab4b16
avoid following NULL pointers
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
9e6a047788
portal: add portal module again
...
Add this again for now until we can integrate this into the
session manager somehow.
2020-05-18 16:30:09 +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
cfce048528
adapter: pass error to factory
2020-05-08 16:18:10 +02:00
Wim Taymans
2c13b3ecd2
client-node-v0: return -ENOENT when parameter not found
2020-05-07 10:42:19 +02:00
Wim Taymans
9049f1fdbb
spa-node: don't warn on properties
...
When the node does not support enum_params or when the Props param
is not supported, suppress the warning.
2020-05-04 13:02:30 +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
48036f7d13
improve debug
2020-04-21 15:51:55 +02:00
Wim Taymans
0b68d65ebf
metadata: trigger emission of properties
...
When the resource does add_listener, send a message to the proxy
to trigger an emission of properties.
Block the client until all properties have been notified, track
this with a ping event to the implementation.
2020-04-20 11:51:20 +02:00
Wim Taymans
ab3a6d3441
Fix some compiler warnings on arm
2020-04-03 13:18:02 +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
a86f70c13d
protocol-native: avoid destroying NULL source
...
The source might have been destroyed before.
2020-04-02 15:25:13 +02:00
George Kiagiadakis
e918d60959
session-manager: implement factories for session, endpoint-stream & endpoint-link
...
Heavily based on the endpoint factory
2020-03-27 14:56:07 +00:00
George Kiagiadakis
444d180218
session-manager: endpoint: implement caching info & params
...
The info structure needs to be cached because there is no way to
request it from the implementation, unless we hack the add_listener
API to be used for making info requests or add a new method that
will be used just in the implementation (both are bad ideas).
The params are cached because
1) a client doing enum_params + sync will not work correctly, since
the sync call syncs with the server and not the implementation...
we could block the client to solve that, but then there is also #2
2) the implementation is not aware of the clients and therefore
it cannot keep track of who is subscribed and who is not, this
needs to happen in the server. Then if we only keep track of the
subscriptions in the server and keep requesting params from the
impl, there is no way to know if a param event coming from the
impl matches a call to enum_params or to subscribe or if it's
just an update that needs to be forwarded to subscribers.
2020-03-27 14:56:07 +00:00
George Kiagiadakis
df66edd9ab
session-manager: implement 'endpoint' factory
...
This is modeled after the 'metadata' factory and provides
a way to use the pw_endpoint interface directly to implement
an endpoint object in a client.
2020-03-27 14:56:07 +00:00
George Kiagiadakis
0a8ec0380b
session-manager: check error code when registering the marshallers
2020-03-27 14:56:07 +00:00
George Kiagiadakis
e971a79fce
session-manager: implement export functions for session-manager objects
2020-03-27 14:56:07 +00:00
George Kiagiadakis
234c642746
session-manager: move files into client-endpoint / client-session subdirs
...
To clean up space for the new implementation.
The existing code is exclusively for use with the client-endpoint
and client-session factories.
2020-03-27 14:56:07 +00:00
George Kiagiadakis
bc3a92e950
session-manager: add impl marshallers for endpoint, -stream, -link and session
2020-03-27 14:56:07 +00: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
72d70b0f48
Add and fix some more warnings
...
Fixes #216
2020-03-17 11:37:56 +01:00
Rasmus Thomsen
fba9d8931d
module-protocol-native: fix build on s390x
2020-03-09 08:52:16 +00:00
Rasmus Thomsen
cfd829913e
meson: add rpath on the modules_install_dir for all modules
...
Otherwise the dynamic loader won't be able to find libraries in
modules_install_dir we link against
fixes #214
2020-03-09 08:51:49 +00:00
Wim Taymans
c4b2be2aad
use true and false for boolean properties
...
So that it's easier to convert them to booleans in introspection
code later.
2020-03-03 18:17:46 +01:00
Wim Taymans
fd262aa0f2
adapter: add some debug
2020-03-03 13:04:13 +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