monitor: set node enabled state

Let the monitor update the node enabled states when creating
and on change events.
This commit is contained in:
Wim Taymans 2018-01-30 15:08:44 +01:00
parent bd1fea49c2
commit ad1e5fdc10
3 changed files with 43 additions and 10 deletions

View file

@ -75,6 +75,8 @@ static void pw_spa_node_destroy(void *data)
static void complete_init(struct impl *impl)
{
struct pw_node *this = impl->this;
if (impl->flags & PW_SPA_NODE_FLAG_DISABLE)
pw_node_set_enabled(this, false);
pw_node_register(this, impl->owner, impl->parent, NULL);
if (impl->flags & PW_SPA_NODE_FLAG_ACTIVATE)
pw_node_set_active(this, true);