Wim Taymans
c6c9e6a8b3
core: add method to load spa_handle
...
Add a method that loads a spa handle based on the currently configured
libraries in the core. Remove duplicate code.
2019-06-07 10:12:44 +02:00
Wim Taymans
504d78cd18
improve error handling
...
Set errno for functions returning NULL if relevant.
Propagate errno and result codes better.
Handle more error cases.
2019-06-07 10:11:23 +02:00
Wim Taymans
db88e9f954
System: More work on making system functions pluggable
...
Move the epoll functions to the system functions and make the loop
use those. Use simple mask for events instead of enum.
Add the used system api in pw_loop.
Add System API to spa_support and use it where possible.
Pass the system API used in the realtime loops in spa_support as
well and use this in the realtime paths.
Improve bootstrapping, load only the log and cpu interfaces because
those can/need to be shared between instances. Let the core load
the other interfaces.
Add keys to configure the System and Loop implementations used in
pw_loop.
2019-06-06 15:31:53 +02:00
Wim Taymans
49ef8f9b5f
spa: add keys for properties
...
Define and document property keys
2019-06-03 16:48:01 +02:00
Wim Taymans
009a33668b
make property for monitors
2019-05-31 16:47:37 +02:00
Wim Taymans
a672a9ee67
modules: add usage to factories
...
Improve audio-dsp properties
Fix some keys
2019-05-31 16:41:07 +02:00
Wim Taymans
d4def56bcb
spa: don't pass library around
...
Don't pass the library in the methods, we use the factory_name to
find the object. Make it possible to override the default library
with a property.
2019-05-31 16:06:14 +02:00
Wim Taymans
1d1f035e78
monitor: return factory_name in the object_info
...
Pass a factory_name in the object_info of monitor and device.
Restructure the factory name to mean something functionaly. With
the factory to library mapping this then means that the implementation
of certain factories can be configured in the config file.
2019-05-31 15:06:44 +02:00
Wim Taymans
e1cbdaed0b
remote: add option for extra user data for proxy
...
When doing an export, make it possible to add extra data to the
resulting proxy for user data.
2019-05-30 16:11:31 +02:00
Wim Taymans
9785d99821
monitor: Remove monitor event
...
Remove the monitor event and emit events with structures like we do
for the devices.
2019-05-30 12:51:12 +02:00
Wim Taymans
3780bd1b30
spa: use core to load spa_handle
2019-05-29 17:53:25 +02:00
Wim Taymans
165f3e06ad
client-device: add missing file
2019-05-29 17:01:21 +02:00
Wim Taymans
32ee1f045d
client-device: directly map resource to spa_device
...
The resource is an implementation of a spa_device with remote methods
so we directly use this as a device implementation.
2019-05-29 11:24:47 +02:00
Wim Taymans
e9ecc47696
clean up proxy and resource api
...
Remove override for resources, it can't work in general.
Rename method to add_object_listener to add a listener for
events/methods from the remote object.
Rename some methods to _call to call the interface and _notify
to notify the listeners.
Remove unused client event to be notified of resource
implementations.
2019-05-29 10:39:24 +02:00
Wim Taymans
b1ea91fa1d
client-device: fix cleanup
2019-05-28 17:23:52 +02:00
Wim Taymans
67a1d317c4
client-device: add client device
...
Make it possible to implement a device out-of-process
2019-05-28 14:04:58 +02:00
Wim Taymans
857b2a0cfb
spa: add result type
...
We need this to know the type of result, especially when serializing.
2019-05-28 13:59:48 +02:00
Wim Taymans
5299677f88
add const to spa_event and spa_command
2019-05-28 13:51:12 +02:00
Wim Taymans
4661ee882c
spa-monitor: remove device when destroyed
...
Remove the device from our list when it got destroyed.
2019-05-27 16:02:36 +02:00
Wim Taymans
a680f434d2
port: use right properties
...
Use format.dsp as a key to mark the dsp format on a port
Use audio.channel as the key to set the audio channel on a port
2019-05-24 16:14:19 +02:00
Wim Taymans
3ad73f0532
keys: add keys.h with defines and docs
...
Add a keys.h file that lists and documents all keys available to
be used in properties.
2019-05-24 15:47:48 +02:00
Wim Taymans
ff946e3d4b
interface: add an interface struct
...
The interface struct has the type,version and methods of the
interface.
Make spa interfaces extend from spa_interface and make a
separate structure for the methods.
Pass a generic void* as the first argument of methods, like
we don in PipeWire.
Bundle the methods + implementation in a versioned inteface
and use that to invoke methods. This way we can do version
checks on the methods.
Make resource and proxy interfaces that we can can call. We
can then make the core interfaces independent on proxy/resource and
hide them in the lower layers.
Add add_listener method to methods of core interfaces, just
like SPA.
2019-05-23 12:59:24 +02:00
Wim Taymans
fbf6acd271
list: use spa_list_consume some more
...
If we know the item is removed in each iteration, _consume can handle
deletion of any item while being iterated.
2019-05-23 09:56:02 +02:00
Wim Taymans
a564d9f3f1
Move implementation helpers to utils
2019-05-20 10:14:00 +02:00
Wim Taymans
b195a25636
pipewire: only load spa_handle
...
Only provide a method to load a spa_handle, getting the interface
from that is easy and we only use refcounting on the handle.
2019-05-20 09:49:39 +02:00
Wim Taymans
3cb400bb61
audioconvert: don't use range
...
Use the spa_io_position->size to decide how many samples to output
from the resampler.
2019-05-17 10:31:20 +02:00
Wim Taymans
448c1937ad
hook: separate spa_callbacks from the hook
...
Make a spa_callbacks with just the functions and data and use this
in the hook and objects.
2019-05-15 12:17:52 +02:00
Wim Taymans
6ee192dff5
hooks: use hook to implement the callbacks
...
This way we get the version check implemented and save some
code.
2019-05-15 11:19:23 +02:00
Wim Taymans
903cbeb7c1
hook: handle port and factory implementation with hook
...
This way we can also handle the version number.
2019-05-14 18:08:02 +02:00
Wim Taymans
29164a0f54
link: remove error from method
...
We return a reason in errno
2019-05-14 12:59:18 +02:00
Wim Taymans
795b14f48b
protocol-native: also handle 0 recvmsg as EOF
...
When recvmsg returns 0, also handle it like an EOF and close to
connection otherwise we keep spinning forever.
2019-05-13 10:10:41 +02:00
Wim Taymans
a2bf4ce96e
protocol: add security label to a client
...
Don't pass the ucred to the client construct, just set the properties
in the protocol.
Use the client properties to get ucred.
Add the security label to the client properties (from SO_PEERSEC)
2019-05-10 13:28:18 +02:00
Wim Taymans
1a7fcaf9c6
Fix cleanup
2019-05-10 11:15:48 +02:00
Wim Taymans
9b1da77bfc
node: remove obsolete enabled state
...
We will create/destroy nodes instead of enabled/disable
2019-04-24 15:39:29 +02:00
Wim Taymans
3b513fa7ae
floatmix: remove some unused code
2019-04-23 17:37:46 +02:00
Wim Taymans
8dabd52807
audio-dsp: use audioconvert to get a resampler
2019-04-23 17:37:22 +02:00
Wim Taymans
bb3da2fcc1
remote-node: reuse activation logic in pw_node
...
Set the received eventfd as the node eventfd and let existing
logic take care of scheduling the node.
2019-04-17 15:23:11 +02:00
Wim Taymans
092a0c660d
make bitfields unsigned
...
Remove driver property from client-node of client-stream.
2019-04-10 17:52:42 +02:00
Wim Taymans
0db5817ed7
client-stream: Don't allow DYNAMIC_DATA
...
We don't want to use dynamic data for the remote nodes, the buffers
need to keep pointing to the memfd memory.
2019-04-10 16:35:28 +02:00
George Kiagiadakis
40a5063b9f
module-link-factory: fix wrong goto label
...
harmless, but leads to a wrong error message being printed
2019-04-02 23:26:17 +02:00
George Kiagiadakis
7a7a12138f
module-access: don't leak the fd in check_cmdline
2019-04-02 23:26:05 +02:00
Wim Taymans
5c896fedd5
connection: stop refill when 0 bytes read
2019-04-02 23:02:58 +02:00
Wim Taymans
e7ef13e310
audioconvert: add avx optimizations
2019-03-28 16:45:57 +01:00
Wim Taymans
5a2ccee1ff
Add FASTPATH trace log
...
Add a trace_fp that can be optimized away when FASTPATH is defined.
2019-03-21 11:31:53 +01:00
Wim Taymans
036ca89c0e
audioconvert: mark ports and buffers as DYNAMIC
...
Only passthrough buffer data when the buffer and ports are
marked as DYNAMIC.
Use extra buffer for nodes that keep a ref on buffers (resample).
2019-03-21 10:45:24 +01:00
Wim Taymans
c2cb74a146
protocol-native: fix indentation
2019-03-20 15:57:34 +01:00
Wim Taymans
70e62aacd7
protocol-native: pass a message around
...
Pass a message around to make things more extensible later.
Keep fds per message if we ever want to write individual
messages.
Pass number of fds in the message header. We might need this to
close the fds when the proxy is gone.
2019-03-19 16:15:20 +01:00
Wim Taymans
30747942ac
connection: add more test
2019-03-19 11:58:46 +01:00
Wim Taymans
a3e4726ea6
connection: add test and fix a bug
...
Add a unit test for the connection
When we consumed all packets in a buffer, try to get more data instead
of failing right away.
2019-03-19 11:44:23 +01:00
Wim Taymans
ca051282a4
port: add port subscribe_params
2019-03-18 16:34:07 +01:00