Commit Graph

10 Commits

Author SHA1 Message Date
George Kiagiadakis
5e14c69108 m-default-nodes: lift restrictions on media.class for audio nodes
Previously a default source had to be Audio/Source and a default sink
had to be Audio/Sink. This did not account for:
 - monitor sources (Audio/Sink)
 - duplex nodes (Audio/Duplex)
 - virtual sources (Audio/Source/Virtual)

With this change the restriction is now on the number of input/output
ports, so any Audio/* node with output ports is a valid target to select
as a default source, while any Audio/* node with input ports is a valid
target for a default sink.

Fixes #60
2021-10-05 17:28:42 +03:00
Julian Bouzas
a65f3bb44e m-default-nodes: properly parse args 2021-06-25 08:50:08 -04:00
George Kiagiadakis
87741e39ec s/metadatas/metadata/g
data is already plural
2021-06-18 10:44:24 +03:00
Julian Bouzas
464f1de641 m-default-nodes: free default nodes when disabling plugin 2021-06-07 11:33:21 -04:00
George Kiagiadakis
38f7483793 state: remove support for groups and propagate save errors
There is no real use for groups in our API. Just use the name of
the file as the default group and be done with it...
Storing multiple groups with this API is problematic because it
forces flushing the file to disk multiple times, one for each group,
and it's just more performant if we use a prefix in the keys
to implement some form of logical separation.

This commit also makes the GKeyFile a temporary object. As we
always load the file from the file system in _load()
and we always replace its contents with a new dictionary in _save(),
there is no point in keeping the keyfile's internal data structures
stored in memory.

Save errors are now also propagated to adhere to the programming
practices of GObject
2021-06-04 18:36:19 +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
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