Commit graph

395 commits

Author SHA1 Message Date
George Kiagiadakis
e48cb30828 Fix compiler warnings that appear with the warning flags enabled
Fixes #20
2020-12-20 22:16:37 +02:00
Julian Bouzas
e0e2e3920e m-endpoint-creation: remove undefined API 2020-11-13 14:20:54 -05:00
Julian Bouzas
f196803f88 m-endpoint-creation: remove unnused variable in Bluez5 endpoint creation 2020-11-13 14:20:54 -05:00
Julian Bouzas
f486cd389d m-device-activation: use profile from default-profile module if loaded 2020-11-13 14:20:54 -05:00
Julian Bouzas
af70cac05f modules: add module to store device profiles each time they change 2020-11-13 14:20:54 -05:00
Julian Bouzas
763f0f1795 m-monitor: add use-acp flag 2020-11-13 14:20:54 -05:00
Julian Bouzas
321545a32c modules: refactor dbus reservation
The Dbus device reservation has been moved into a separate module, and has also
been refactored to allow reserving a device name before an actual device is
created. Devices now are created and destroyed by the monitor depending on
whether PipeWire owns the device or not. This also simplifies a lot the device
activation module to always enable devices when they are created, and never
worry about checking whether a device is acquired by PipeWire or not.
2020-10-22 14:33:59 -04:00
Julian Bouzas
bc17aaa397 plugin: add name property 2020-10-22 08:40:27 -04:00
Julian Bouzas
397a141150 m-endpoint-creation: add bluez5 endpoint creation for bluetooth devices 2020-10-05 11:35:24 -04:00
Julian Bouzas
7d35191091 m-config-endpoint: refactor and rename to endpoint-creation
Allows implementing device specific endpoint creation logic, which is currently
needed for bluetooth endpoints as they need to be created differenly.
2020-10-05 11:35:24 -04:00
Julian Bouzas
6a5a259fc7 modules: add bluez5 endpoint session item 2020-10-05 11:35:24 -04:00
Julian Bouzas
af196f4f5b modules: add fake stream session item 2020-10-05 11:35:24 -04:00
Julian Bouzas
236f6f8fc5 m-si-adapter: use the adapter's name as stream name 2020-10-05 11:35:24 -04:00
Julian Bouzas
b2438f2cef m-si-adapter: set the configured flag when configuration was successful 2020-10-05 11:35:24 -04:00
Julian Bouzas
c603409c60 m-config-policy: set the stream name to the media role propery by default 2020-10-05 11:35:24 -04:00
George Kiagiadakis
df258c3887 module-metadata: s/settings/plugin/ 2020-08-31 16:21:07 +03:00
George Kiagiadakis
3ae506d223 modules: rename metadata module to just 'module-metadata' 2020-07-31 16:34:01 +03:00
raghu447
65b4562fa0 Implement PW_TYPE_INTERFACE_Metadata 2020-07-30 21:30:14 +05:30
Julian Bouzas
0913257d2e m-device-activation: assume last profile as the one with highest priority 2020-07-23 09:12:52 +00:00
Julian Bouzas
6550718823 m-device-activation: fix typo when parsing device profiles 2020-07-23 09:12:52 +00:00
Julian Bouzas
86b80f4603 dbus-device-reservation: show error message when property request fails 2020-07-10 10:36:24 -04:00
Julian Bouzas
b0cab6c4e4 dbus-device-reservation: return if call_finish fails when requesting a property 2020-07-08 13:44:01 -04:00
George Kiagiadakis
e7d6ed4573 si-convert: watch links to the convert node instead of the node's state
there are underlying issues with the state management of the graph,
so it's not a very good idea to rely on it to activate / deactivate
our convert node depending on the links that exist

instead, track the links ourselves and create/destroy the corresponding
links to the target node accordingly; it's a more robust approach

it was also not entirely correct that we would previously configure
the convert node to be a driver (node.driver=true); maybe this caused
the underlying issues in the first place... we don't need it now
anyway, so it's gone
2020-06-29 18:58:34 +03:00
George Kiagiadakis
648b84c1c4 m-node-suspension: suspend only audio & video device nodes
Just like media-session does
JACK nodes should be left untouched
2020-06-29 15:52:09 +03:00
George Kiagiadakis
a3870581fb spa-device / m-monitor: fix pw_proxy leaks reported by pw_core
1. device export proxies must be destroyed manually since they are
   not associated with the WpRegistry
2. the monitors should not disconnect before all WpSpaDevice objects
   are destroyed; remove the manual disconnect call and let GObject
   ref counting do its job (the core will disconnect when its last ref
   count is dropped after the last monitor plugin is destroyed)
2020-06-29 13:05:44 +03:00
George Kiagiadakis
b59ff48156 si-convert: improve node properties for convert nodes
* do not copy the full alsa node properties set
* use a node description that makes the nodes look better in JACK
* use . instead of / as a separator for the node.name, like elsewhere
* add audio.convert spa lib association in the tests that use si-convert;
  previously it used to work because library.name was present in the
  properties copied from the adapter (and it so happens that the adapter
  lives in the audioconvert spa plugin as well ...)
2020-06-29 13:05:44 +03:00
George Kiagiadakis
3bd1a199ed m-monitor: improve node names for JACK
JACK uses : as a separator to distinguish the port name
from the node name, so it ends up doing wrong separations
if we have : in the node name
2020-06-29 13:05:44 +03:00
George Kiagiadakis
ac295b10e3 m-config-endpoint: deactivate gracefully even if not activated
This may happen if the plugins were loaded but not activated
due to some parse error in wireplumber.conf
2020-06-29 13:05:44 +03:00
George Kiagiadakis
826e5e3c46 si-convert: use the clock rate defined in pipewire.conf 2020-06-29 13:05:44 +03:00
George Kiagiadakis
374977f954 m-monitor: reduce string copies and leaks in module_init 2020-06-19 10:30:12 +03:00
George Kiagiadakis
30affd6b55 m-config-endpoint: also remove monitors when a node disappears
previously, we would only remove the endpoint associated with
the node, but not the monitor endpoint...

to implement that, we now store the node's associated session items
in the node's qdata instead of a local hash table, so that we
can store an arbitrary ammount of session items per node
2020-06-18 19:29:35 +03:00
George Kiagiadakis
879c7d2ab9 si-softdsp-endpoint: use the transition's source_object instead of data in callbacks
there is no need to add self in the transition's data,
it's already in source_object
2020-06-18 19:26:30 +03:00
George Kiagiadakis
fb3d5bea5c si-monitor-endpoint: add "endpoint.monitor" property on monitor endpoints 2020-06-17 14:54:20 +03:00
George Kiagiadakis
a1a718f8a1 config-endpoint: create monitors after exporting
This fixes a failure to activate the monitors if we are using
si-adapter directly instead of si-audio-softdsp-endpoint
2020-06-17 14:47:54 +03:00
George Kiagiadakis
aabf6beda7 si-convert: use passive links
Requires PipeWire < 0.3.3 or > 0.3.6 to actually work
2020-06-17 14:44:29 +03:00
George Kiagiadakis
244fa28d17 si-standard-link: allow linking MONO capture clients
In case we have a multi-channel capture device and a mono client,
treat the MONO port as UNKNOWN and let it link with the first
port available on the device

Easy to test with arecord, which by default captures in MONO
2020-06-17 12:55:12 +03:00
George Kiagiadakis
881b45dc4a policy: accept endpoint IDs in node.target
this allows slightly easier testing while every client uses node.target
but it's easier to find the endpoint id than the node id
through `wpctl status`
2020-06-16 19:10:37 +03:00
George Kiagiadakis
2719169810 policy: respect endpoint.autoconnect and don't link if it's false 2020-06-16 17:39:44 +03:00
George Kiagiadakis
d50e32fc47 si-adapter/simple-node-endpoint: propagate node.autoconnect as endpoint.autoconnect 2020-06-16 17:39:25 +03:00
George Kiagiadakis
d07f3df445 m-config-endpoint: allow specifying preferred-n-channels in endpoint.config 2020-06-16 13:31:05 +03:00
George Kiagiadakis
5f9212c344 si-adapter: use the clock rate defined in pipewire.conf 2020-06-15 19:09:04 +03:00
George Kiagiadakis
7bc8302740 m-monitor: connect the monitor core on activation instead of module load time
We have multiple instances of the monitor plugin, but that's ok.
connect/disonnect will not do anything bad if called multiple times

We need to connect later so that the first connection is the one from main().
Otherwise, if there is a connection error, we will see the warning from the
monitor first.
2020-06-15 18:36:33 +03:00
George Kiagiadakis
926ee5ce9f src, modules: set PW_KEY_APP_NAME on all cores 2020-06-15 17:56:05 +03:00
Julian Bouzas
3b4785f1a0 m-config-static-objects: use a local core for all objects 2020-06-12 15:04:36 -04:00
Julian Bouzas
40eb53a290 m-device-activation: enum profiles before activating bluetooth devices 2020-06-12 15:04:36 -04:00
Julian Bouzas
05aeeed90c m-device-activation: always activate alsa devices if no api alsa card property was set 2020-06-12 15:04:36 -04:00
Julian Bouzas
be3045e1f8 m-device-activation: make sure the device properties are valid before activating them 2020-06-12 15:04:36 -04:00
Julian Bouzas
70f76c7fcb m-monitor: use a shared local core for all local objects 2020-06-12 15:04:29 -04:00
Julian Bouzas
53289b9906 m-monitor: allow the monitor module to create multiple devices 2020-06-11 13:50:02 -04:00
George Kiagiadakis
8a0abd4fb8 spa-device: subclass from GObject 2020-06-11 15:05:20 +03:00