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
Wim Taymans
77cc58ba71
protocol-native: improve bool in set_active
2020-03-02 10:48:31 +01:00
Wim Taymans
41989f4889
client-node: don't overwrite the chunk memory pointer
...
When the client uploads a buffer, copy all data fields except for
the chunk memory that we configured before.
If we overwrite the chunk memory, the users of the buffer would not
be able to find the chunk memory anymore and crash or fail.
2020-02-24 15:08:27 +01:00
Wim Taymans
8ecef35e80
client-node: update n_buffers after we can process them
...
Make sure we don't configure the buffers before we manage to
completely process them or else we are left with an invalid list
of buffers.
See #209
2020-02-24 10:20:33 +01:00
Wim Taymans
d8bac82e72
improve logging
...
Remove some harmless warnings from the log
Remove some excessive info logging
2020-02-21 11:09:34 +01:00
Wim Taymans
463b9e4e29
buffers: handle -ENOENT
...
enum_param should return -ENOENT when the param is not known.
When negotiating buffers handle -ENOENT. This means the port does
not know about the property and we should assume anything is fine
so just use the filter from the first port.
2020-02-18 17:34:41 +01:00
Wim Taymans
1a6848801f
fix compiler warnings
2020-02-11 15:25:53 +01:00
Wim Taymans
9ce2c6157f
client-node: fix v0 data offset
...
Set the right data offset for v0 clients.
2020-02-11 15:15:20 +01:00
Wim Taymans
293932d4ec
v0: improve compatibility
...
Implement RequestClockUpdate event and ClockUpdate message for
old clients.
2020-02-11 11:23:28 +01:00
Wim Taymans
ee67ab9c04
client-node: keep target links in list
...
Don't allocate the links in an array because they might be moved
when the array is resized. Instead just use calloc and add them
to a list.
Make sure we update the list used in the real-time thread from a
safe context.
2020-02-07 16:45:58 +01:00
Wim Taymans
41b47e726e
context: add some more defaults
...
Make a property to allow mlock and use it.
mlock in stream and filter when asked to mmap mem.
2020-02-04 17:09:41 +01:00
Wim Taymans
dcec3f12b5
remote-node: safely activate and deactivate a link
...
Make sure we execute the admin of the target links in the data
thread.
2020-02-04 16:29:48 +01:00
Wim Taymans
7450bfd88b
Improve mlock failure warning message
2020-01-29 11:07:26 +01:00
Wim Taymans
df519ee3b3
avoid including private.h
...
Expose some more methods to make it possible to build without
including the private.h header, especially in modules.
2020-01-02 13:48:50 +01:00
Wim Taymans
f391353c7f
Make interface types a string
...
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
2a4c57798d
client-node0: remap target node property
2019-12-17 17:55:15 +01:00
Wim Taymans
e9b62c0ce6
v0: set media class
...
Set the media class on the client-node after we know the number of
ports.
Add more type mappings
Fix change_mask on core_info
2019-12-17 17:34:10 +01:00
Wim Taymans
d3f4dda51b
client-node: improve debug
2019-12-17 11:35:04 +01:00
Wim Taymans
1317ca140c
pass spa_dict around as config
...
Don't pass pw_properties around when we simply need to pass around
config info, only use pw_properties when used to construct an object
that keeps the properties.
2019-12-13 11:26:05 +01:00
Wim Taymans
930b595724
pw_impl_node_new -> pw_context_create_node
2019-12-11 17:59:00 +01:00
Wim Taymans
743450a19f
pw_client_node_proxy -> pw_client_node
2019-12-11 16:13:46 +01:00
Wim Taymans
beb3c69dfe
pw_node_proxy -> pw_node
2019-12-11 15:26:11 +01:00
Wim Taymans
aa378417c2
interfaces: move proxy API into their own header files
2019-12-11 14:44:59 +01:00
Wim Taymans
898e870997
pw_node -> pw_impl_node
2019-12-11 12:41:45 +01:00
Wim Taymans
f62d1cb357
pw_port -> pw_impl_port
2019-12-11 12:24:03 +01:00
Wim Taymans
95688939bf
pw_client -> pw_impl_client
2019-12-11 11:21:43 +01:00
Wim Taymans
d70a47b7fe
move proxy implementations in their own file
...
Rearrange headers
2019-12-11 10:58:51 +01:00
Wim Taymans
ecc6b27cd7
rename core_proxy -> core
...
Rename core_proxy to core and move the introspect and interface
contents to core.h
In an effort to promote the proxy API.
2019-12-11 07:46:59 +01:00
Wim Taymans
8ea78c2e3f
pw_core -> pw_context
...
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.
The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
2019-12-10 18:19:56 +01:00
Wim Taymans
2c492ff71f
client-node: don't check format
...
Don't check if we got a Format param to be able to set buffers,
let the implementation decide on that.
2019-12-10 12:21:02 +01:00
Wim Taymans
5a2ad084e8
proxy: add pw_proxy_set_bound_id
...
Add method to set bound_id and emit the signal.
Rename resource_bound_id -> resource_set_bound_id and add
resource_get_bound_id.
2019-12-10 12:19:11 +01:00
Wim Taymans
6204c95ee3
remote-node: restore old activation after we unmap the server one
2019-12-06 22:56:35 +01:00
Wim Taymans
8a959ea7a1
core_proxy: prepare to rename pw_remote -> pw_core_proxy
...
The pw_remote object is really a wrapper around the pw_core_proxy.
The events it emits are also available in the core proxy and are
generally awkward to use.
With some clever new pw_core_proxy_* methods and a pw_core_connect
to create the core_proxy, we can convert all code away from pw_remote.
This is a first step in this conversion, using the pw_remote behind
the scenes. It leaks into some places because it really needs to become
its own struct in a next step.
2019-12-06 11:48:40 +01:00
Wim Taymans
7594eabdc8
remote: pass core_proxy to export function
...
We want to remove the need for the pw_remote in most cases.
2019-12-05 11:15:04 +01:00
Wim Taymans
c9a54112e4
client-node: use bound id from the proxy
...
Remove the obsolete node_id from the transport. We get this info
now from the proxy.
2019-11-29 13:34:06 +01:00
Wim Taymans
fcd4ae3334
remote: remove obsolete exported event
...
We can now do the same and more with the bound event on the proxy.
2019-11-29 13:34:06 +01:00
Wim Taymans
e3a1c4151e
emit bound_id event
2019-11-29 13:34:06 +01:00
Wim Taymans
e40fbf8cc4
Add printf checks for proxy_error and resource_error
...
Add an error variant without checks.
2019-11-21 16:09:05 +01:00
Wim Taymans
02d0802004
remote-node: don't enum invalid param ids
2019-11-21 13:05:58 +01:00
Wim Taymans
68e94a2e7e
system: use spa_system functions for fds
2019-11-19 13:41:40 +01:00
Wim Taymans
6397db9d68
protocol: init spa_dict properly
...
Or else the flags might be wrong.
2019-11-04 17:30:33 +01:00
Wim Taymans
8ddf579cc0
protocol: add flags to protocol marshal
...
Allows us to to select marshallers for implementation and binding.
2019-11-03 10:21:57 +01:00
Wim Taymans
9ffec214b8
fix includes
2019-10-25 15:01:02 +02:00
Wim Taymans
38bc80a3b8
remote-node: implement suspend
2019-10-23 17:20:46 +02:00