Commit graph

1119 commits

Author SHA1 Message Date
Julian Bouzas
f0960a38b2 policy-item.lua: only handle si-audio-adapter and si-nodes links 2021-04-08 14:07:05 -04:00
Julian Bouzas
c5d28031e5 src: scripts: remove unneeded policy-endpoint.lua 2021-04-08 14:07:05 -04:00
Julian Bouzas
317550a7bd m-lua-scripting: add object manager get_n_objects API 2021-04-08 14:07:05 -04:00
Julian Bouzas
cce02fec68 si-audio-endpoint: deactivate node when disabling active feature 2021-04-08 14:07:05 -04:00
Julian Bouzas
d38092a35c m-si-audio-endpoint: fix port configuration and target linking 2021-04-08 14:07:05 -04:00
Julian Bouzas
471f84c735 m-si-audio-endpoint: make target property optional
Allows using the endpoint even if a target is not set.
2021-04-08 14:07:01 -04:00
Julian Bouzas
bce0b79980 tests: si-standard-link: sync core before finishing
Makes sure core has finished any pending task before finishing the test.
2021-04-08 11:04:21 -04:00
Julian Bouzas
2caac5fa87 si-standard-link: call parent class finalize once finalized 2021-04-07 13:21:40 -04:00
Julian Bouzas
552b04ed7d m-si-standard-link: properly set in item port context when configuring 2021-04-06 14:04:34 -04:00
Julian Bouzas
debef67f3f policy-node.lua: fix param name typo when finding target
Fixes unespected issues when finding first available target
2021-04-06 09:48:01 -04:00
George Kiagiadakis
a1923d8152 policy-node: properly remove links between apps and capture devices
the previous logic was flawed and would only work for links between
app node <-> device sink node
2021-04-06 16:07:14 +03:00
George Kiagiadakis
3485befc81 endpoint: remove useless pw_proxy_destroyed handlers 2021-04-05 16:03:55 +03:00
George Kiagiadakis
d264bc460c registry: fix issues with dangling WpGlobal objects causing assertion failures
The main problem observed is when a link that is owned by a WpLink
is removed from the server because one of the linked nodes is gone.
This would cause the APPEARS_ON_REGISTRY flag to go away but the
WpGlobal would still remain in the globals list...

To fix this, forcibly remove the global from the globals list when
it is removed from the registry, even if it is still owned by some
proxy. The proxy at that point is unable to function anyway, because
we make sure to destroy the pw_proxy by removing FEATURE_BOUND when
the global is removed from the registry.

Additionally, ref global->proxy before removing FEATURE_BOUND to
prevent crashing. If the proxy owns the global and the pw-proxy-destroyed
signal causes whoever owns the proxy to drop his reference, _deactivate()
will crash because no-one will be holding a ref to the proxy.
2021-04-05 16:03:55 +03:00
Julian Bouzas
fb1daa0bf2 modules: use dots instead of dashes for session item properties
Keeps consistency with PipeWire
2021-04-02 11:22:22 -04:00
George Kiagiadakis
cdd6fda56c wpctl: status: print nodes, ports, links grouped more nicely 2021-04-01 19:15:34 +03:00
George Kiagiadakis
5f1f96a5da registry: fix odd assertion failures that occured from time to time
The assumption about the global id in wp_registry_prepare_new_global()
was not valid because this function may also be called from the proxy
bound event and this may be before the registry has signalled the
removal of an old global with the same id, for instance

We should instead check this at the point where we expose the global.
If the assertion doesn't hold at that point, we are going to leak an
old WpGlobal, so we must ensure it.
2021-04-01 12:48:57 +03:00
Julian Bouzas
e86ed8e763 policy-node.lua: support config.move and config.follow 2021-03-31 12:44:49 -04:00
Julian Bouzas
12b59a1506 m-si-audio-adapter: abort activation if node feature ports is no longer enabled 2021-03-31 12:44:49 -04:00
Julian Bouzas
75d53dbef3 m-si-standard-link: make sure in/out items are valid before activating 2021-03-31 10:51:20 -04:00
George Kiagiadakis
e7406ad1d7 wpctl: fix setting default nodes 2021-03-31 17:05:55 +03:00
George Kiagiadakis
9a103c5787 m-default-nodes: restore configured values on the metadata at startup 2021-03-31 15:20:06 +03:00
George Kiagiadakis
0ecefcb55d policy-node: use default-nodes-api plugin 2021-03-31 13:10:13 +03:00
George Kiagiadakis
0bc257b6c3 modules: add new module-default-nodes-api
This is to provide easy access to default nodes from the scripts
2021-03-31 13:10:13 +03:00
George Kiagiadakis
8cf8eb6b76 m-default-nodes: move common code to a new header 2021-03-31 13:10:13 +03:00
George Kiagiadakis
0a53ddd4ad m-default-nodes: add properties to control storage method and interval
Do not use WpState at all when use-persistent-storage=FALSE; keep all
the configured default nodes in memory and forget them upon restart
2021-03-31 13:10:13 +03:00
George Kiagiadakis
a0876bb275 modules: rename default-metadata to default-nodes and enable it always in the config 2021-03-31 13:10:13 +03:00
George Kiagiadakis
c524e1e317 m-default-metadata: remove default endpoints, follow upstream logic
* default endpoints no longer make sense
* follow upstream logic of configured vs effective default nodes
* store node names in json inside the metadata, as upstream does
* add default video source
2021-03-31 13:10:13 +03:00
Julian Bouzas
cb3445c077 policy-node.lua: fix type mismatch when comparing session item Ids 2021-03-30 14:52:42 -04:00
George Kiagiadakis
fd2ddffdd7 lua: s/Feature.Object.ALL/Features.ALL/
It looks nicer to have groups of features in 'Features.'
instead of 'Feature.'
2021-03-29 18:35:35 +03:00
George Kiagiadakis
8052ef2792 bluez config: update based on the latest media-session config 2021-03-29 18:32:59 +03:00
Julian Bouzas
ab5a58715c m-default-metadata: add support for default audio nodes 2021-03-26 16:16:02 -04:00
Julian Bouzas
f86a5efcd5 wpctl: list nodes and allow setting default nodes 2021-03-26 16:16:02 -04:00
Julian Bouzas
b7e347d92c modules: remove endpoint impl on si-node, si-audio-convert and si-audio-adapter 2021-03-26 16:16:02 -04:00
Julian Bouzas
59cb837075 tests: si-standard-link: use new si-audio-endpoint 2021-03-26 16:16:02 -04:00
Julian Bouzas
325522ae51 modules: add si-audio-endpoint session item 2021-03-26 16:16:02 -04:00
Julian Bouzas
e3cc3c330d src: scripts: add policy-node.lua to link port info session items 2021-03-26 16:16:02 -04:00
Julian Bouzas
32fea4057c src: config: rename endpoint-support to session-item-support 2021-03-26 16:16:02 -04:00
Julian Bouzas
04992f0d07 modules: remove si-monitor module
It is not needed as si-standard-link can be configured with port contexts
2021-03-26 16:16:02 -04:00
Julian Bouzas
f6ed14f997 src: scripts: add create-item.lua and remove create-endpoint.lua 2021-03-26 16:16:02 -04:00
Julian Bouzas
0d71565d63 m-si-standard-link: set out-item-id and in-item-id properties 2021-03-26 16:16:02 -04:00
Julian Bouzas
ec30336fcf session-item: add id property
Makes it easier when handling session items in Lua
2021-03-26 16:16:02 -04:00
Julian Bouzas
c0143b5f18 m-si-audio-adapter: ensure ports are available before enabling active 2021-03-26 16:16:02 -04:00
Julian Bouzas
06c12fe7c2 m-lua-scripting: add get_associated_proxy session item Lua API 2021-03-26 16:16:02 -04:00
Julian Bouzas
ebf52adb21 si-interfaces: make WpSiLink work with WpSiPortInfo instead of WpSiEndpoint 2021-03-26 16:16:02 -04:00
Julian Bouzas
64cf2bd644 si-interfaces: rename WpSiEndpointAcquisition to WpSiAcquisition
The get_endpoint_acquisition() vmethod has also been moved to WpSiPortInfo, and
therefore renamed to get_acquisition().
2021-03-26 16:16:02 -04:00
Julian Bouzas
13fc0adb22 m-si-standard-link: use a weak reference for in and out endpoints
Allows checking if the endpoints are still valid before releasing the
acquisition. Sometimes the endpoints are destroyed before the link, and
releasing acquisition is not needed. There is no way to check that with raw
pointers.
2021-03-26 16:15:38 -04:00
Julian Bouzas
0bef8280d7 m-si-standard-link: fix in-endpoint check when configuring 2021-03-26 15:56:07 -04:00
George Kiagiadakis
bed43a481a wplua: sort properties after transfering them from lua 2021-03-26 19:07:56 +02:00
George Kiagiadakis
eeccb24017 properties: add wp_properties_sort()
Depends on pipewire!555 to avoid breaking stuff
2021-03-26 19:06:06 +02:00
George Kiagiadakis
95bb22efe2 monitor-alsa: add api.alsa.card.* properties on nodes
Useful for rule matching on nodes where the rules are also matching
properties of the card.
2021-03-26 17:29:25 +02:00