Simplify node activation

Don't directly expose the state change methods. Only expose an activate
method for nodes that indicates if the node should be scheduled or not.
Let the link automatically negotiate two active nodes.
Make some defines for properties.
Use link property to make passive links. Passive links don't activate
the nodes.
Make sure the mainloop quits when quit is called before run.
This commit is contained in:
Wim Taymans 2017-09-18 20:37:00 +02:00
parent 304a6d1796
commit 93a52f4837
32 changed files with 181 additions and 86 deletions

View file

@ -365,10 +365,10 @@ handle_create_client_node(PipeWireDaemon1 * interface,
pw_log_debug("protocol-dbus %p: create client-node: %s", impl, sender);
props = pw_properties_from_variant(arg_properties);
target_node = pw_properties_get(props, "pipewire.target.node");
target_node = pw_properties_get(props, PW_NODE_PROP_TARGET_NODE);
if (target_node) {
if (strncmp(target_node, "/org/pipewire/node_", strlen("/org/pipewire/node_")) == 0) {
pw_properties_setf(props, "pipewire.target.node", "%s",
pw_properties_setf(props, PW_NODE_PROP_TARGET_NODE, "%s",
target_node + strlen("/org/pipewire/node_"));
}
}