mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
node: add option to not register a node
This commit is contained in:
parent
fa07400c2e
commit
efa35c2911
6 changed files with 23 additions and 8 deletions
|
|
@ -75,10 +75,16 @@ 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)
|
||||
|
||||
if (SPA_FLAG_CHECK(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)
|
||||
|
||||
if (!SPA_FLAG_CHECK(impl->flags, PW_SPA_NODE_FLAG_NO_REGISTER))
|
||||
pw_node_register(this, impl->owner, impl->parent, NULL);
|
||||
else
|
||||
pw_node_initialized(this);
|
||||
|
||||
if (SPA_FLAG_CHECK(impl->flags, PW_SPA_NODE_FLAG_ACTIVATE))
|
||||
pw_node_set_active(this, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ enum pw_spa_node_flags {
|
|||
PW_SPA_NODE_FLAG_ASYNC = (1 << 0),
|
||||
PW_SPA_NODE_FLAG_DISABLE = (1 << 1),
|
||||
PW_SPA_NODE_FLAG_ACTIVATE = (1 << 2),
|
||||
PW_SPA_NODE_FLAG_NO_REGISTER = (1 << 3),
|
||||
};
|
||||
|
||||
struct pw_node *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue