Commit graph

863 commits

Author SHA1 Message Date
Wim Taymans
53d3d5cb0c improve debug 2019-07-17 15:29:18 +02:00
Wim Taymans
cf6fcb65c9 adapter: decide monitor ports in the session-manager 2019-07-16 18:53:04 +02:00
Wim Taymans
11830871df client-node: improve cleanup 2019-07-16 18:52:40 +02:00
Wim Taymans
30e5ad2b6a protocol: improve debug 2019-07-16 18:51:14 +02:00
Wim Taymans
71938e6c77 make client non-busy when sending sync or ping
We need a reply so mark the client non-busy so that we can receive
it.
2019-07-16 18:49:41 +02:00
Wim Taymans
24d4eb585f adapter: improve port names 2019-07-16 11:16:10 +02:00
Wim Taymans
0cdc3dce0b stream: remove client-stream
Use an adapter instead of the client-stream. This means we run
the audioconverters and resamplers in the client instead of the
pipewire daemon. It also allows us to implement the audio mixing
correctly in the capture client.

The only pending piece is that we now wake up the client with the
period of the server. Maybe we can later optimize that and
accumulate/split buffers before waking the client.

This probably needs fixing with video..
2019-07-15 17:23:20 +02:00
Wim Taymans
01d9f4eb3a module-adapter: make it possible to pass the slave node pointer 2019-07-15 17:16:08 +02:00
Wim Taymans
0a6ee19018 remote-node: fix mmap offset
Use the right offset in the mapped memory
Clear the DYNAMIC data flag because we really can only work with
the shared memory.
2019-07-15 17:14:34 +02:00
Wim Taymans
9b7d5c81e0 module-adapter: only set MEDIA_CLASS when NULL 2019-07-15 17:12:51 +02:00
Wim Taymans
1a6fe0e023 module-adapter: handle errors with NULL resource 2019-07-15 17:12:08 +02:00
Wim Taymans
453e75a23e improve some debug 2019-07-15 17:09:44 +02:00
Wim Taymans
fec2915b75 adapter: allow factory.mode to be set with property 2019-07-12 15:11:03 +02:00
Wim Taymans
4aa1ef9bf1 audio-dsp: Allow merger.monitor to be set with property
Only set the factory.mode when not already set.
2019-07-12 15:08:52 +02:00
Julian Bouzas
ea6ff81d4f audio-dsp: allow mode to be set with a property 2019-07-12 15:00:13 +02:00
Wim Taymans
6fc02ca5e0 move some debug to trace 2019-07-12 10:26:44 +02:00
Wim Taymans
57d471b6f4 remote-node: implement set_param and port_set_io
Implement set_param, just call the node implementation
Always call port_set_io on the mixer port.
2019-07-12 09:58:56 +02:00
Wim Taymans
5385bb5674 adapter: make the factory work without a resource
Free the slave when the adapter is destroyed.
2019-07-12 09:58:11 +02:00
Wim Taymans
01e56c45ac node-factory: destroy node when resource is destroyed 2019-07-12 09:54:32 +02:00
Wim Taymans
0e765de519 props: remove pointers in property values in protocol
Mark pointers in property values with pointer: and remove them
when sending the properties over the wire to avoid errors.
2019-07-11 12:52:55 +02:00
Wim Taymans
1c0bf4266c adapter: fix alias 2019-07-10 19:45:22 +02:00
Wim Taymans
a07fb58a21 adapter: set driver property
Pass the node.driver property from the slave to the adapter.
Set the media-class on the adapter.
2019-07-10 19:18:53 +02:00
Wim Taymans
9364f64b10 adapter: move to SPA plugin
Move the adapter code to a SPA plugin and make the adapter module
use the plugin instead.
2019-07-10 18:04:59 +02:00
Wim Taymans
c7d7058896 Improve rate matching and clock slaving
Use a new rate_match io area to exhange rate matching info between
sink/source and resampler.
Compensate for the rate match delay when scheduling timeouts.
Let the resampler notify the source of how many samples it needs to
produce the desired quantum. Make sure we keep an extra buffer in
the device to be able to make this possible.
Let the adapter directly call the slave node process function.
2019-07-09 17:44:07 +02:00
Wim Taymans
0154e6eaac small cleanups
resample: remove unused index variable
2019-07-08 18:23:22 +02:00
Wim Taymans
98d10bbd1f adapter: use slave as filter for adapter
This makes the converter choose the final param and not the
slave, which makes more sense.
2019-07-03 11:06:12 +02:00
Wim Taymans
cb6b8e0d17 adapter: setup control and notify 2019-07-03 11:00:55 +02:00
Wim Taymans
aba81455ff adapter: add adapter node
An adapter is like an audio-dsp node and client-stream combined.
It allows tighter control with the device (for rate control and
variable buffer sizes), software volume.

The idea is to also implement the client-stream with this
eventually.
2019-07-02 17:34:26 +02:00
Wim Taymans
0726a608df Improve debug and small cleanups 2019-07-02 17:11:45 +02:00
Wim Taymans
170c3e4d6c small cleanups 2019-07-01 09:31:15 +02:00
Wim Taymans
6720ded529 names: add standard factory name definitions
Define a set of standard factory names and document what they
contain. This makes it possible to change the implementation by
mapping the factory-name to a different shared library.
2019-06-21 13:31:34 +02:00
Wim Taymans
5b7e95c71c system: make system functions return error on error
Return -errno from system functions instead of -1 in errors. This
makes it easier to pass along the result without having to go to
errno etc..
2019-06-20 17:31:29 +02:00
Wim Taymans
a212d2f9ed improve error handling some more 2019-06-20 11:04:34 +02:00
Wim Taymans
00ea15dc1f improve error handling 2019-06-19 16:22:22 +02:00
Wim Taymans
c4f35825fe protocol: improve error handling 2019-06-19 11:06:10 +02:00
Wim Taymans
216b641ebb connection: add do_close flag to connect_fd
Make pw_remote_connect_fd() not automatically close the provided
fd but let the caller take care of that. This allows us to reuse
the fd in pipewiresrc.

Fixes #155
2019-06-19 11:05:58 +02:00
Wim Taymans
b2992a0f8a improve error handling 2019-06-07 17:50:46 +02:00
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