diff --git a/src/modules/spa/spa-node.c b/src/modules/spa/spa-node.c index 26a80b5ad..c5e40a8e8 100644 --- a/src/modules/spa/spa-node.c +++ b/src/modules/spa/spa-node.c @@ -87,8 +87,6 @@ static void complete_init(struct impl *impl) struct pw_node *this = impl->this; impl->init_pending = SPA_ID_INVALID; - if (SPA_FLAG_CHECK(impl->flags, PW_SPA_NODE_FLAG_DISABLE)) - pw_node_set_enabled(this, false); if (SPA_FLAG_CHECK(impl->flags, PW_SPA_NODE_FLAG_ACTIVATE)) pw_node_set_active(this, true); diff --git a/src/modules/spa/spa-node.h b/src/modules/spa/spa-node.h index caa188132..6f07bb30b 100644 --- a/src/modules/spa/spa-node.h +++ b/src/modules/spa/spa-node.h @@ -35,10 +35,9 @@ extern "C" { #endif enum pw_spa_node_flags { - PW_SPA_NODE_FLAG_DISABLE = (1 << 0), - PW_SPA_NODE_FLAG_ACTIVATE = (1 << 1), - PW_SPA_NODE_FLAG_NO_REGISTER = (1 << 2), - PW_SPA_NODE_FLAG_ASYNC = (1 << 3), + PW_SPA_NODE_FLAG_ACTIVATE = (1 << 0), + PW_SPA_NODE_FLAG_NO_REGISTER = (1 << 1), + PW_SPA_NODE_FLAG_ASYNC = (1 << 2), }; struct pw_node * diff --git a/src/pipewire/core.c b/src/pipewire/core.c index 1133657bc..8a7b93487 100644 --- a/src/pipewire/core.c +++ b/src/pipewire/core.c @@ -731,9 +731,6 @@ struct pw_port *pw_core_find_port(struct pw_core *core, !PW_PERM_IS_R(pw_global_get_permissions(n->global, core->current_client))) continue; - if (!n->enabled) - continue; - pw_log_debug("node id \"%d\"", n->global->id); if (have_id) { diff --git a/src/pipewire/node.c b/src/pipewire/node.c index b05fc3c58..28c8afd1e 100644 --- a/src/pipewire/node.c +++ b/src/pipewire/node.c @@ -776,7 +776,6 @@ struct pw_node *pw_node_new(struct pw_core *core, if (properties == NULL) goto clean_impl; - this->enabled = true; this->properties = properties; size = sizeof(struct pw_node_activation); @@ -1437,7 +1436,7 @@ int pw_node_set_active(struct pw_node *node, bool active) node->active = active; pw_node_emit_active_changed(node, active); - if (active && node->enabled) + if (active) node_activate(node); pw_core_recalc_graph(node->core); @@ -1450,30 +1449,3 @@ bool pw_node_is_active(struct pw_node *node) { return node->active; } - -SPA_EXPORT -int pw_node_set_enabled(struct pw_node *node, bool enabled) -{ - bool old = node->enabled; - - if (old != enabled) { - pw_log_debug("node %p: %s", node, enabled ? "enable" : "disable"); - node->enabled = enabled; - pw_node_emit_enabled_changed(node, enabled); - - if (enabled) { - if (node->active) - node_activate(node); - } - else { - pw_node_set_state(node, PW_NODE_STATE_SUSPENDED); - } - } - return 0; -} - -SPA_EXPORT -bool pw_node_is_enabled(struct pw_node *node) -{ - return node->enabled; -} diff --git a/src/pipewire/node.h b/src/pipewire/node.h index 9188fc173..5c0c71bfe 100644 --- a/src/pipewire/node.h +++ b/src/pipewire/node.h @@ -77,8 +77,6 @@ struct pw_node_events { const struct pw_port_info *info); /** the node active state changed */ void (*active_changed) (void *data, bool active); - /** the node enabled state changed */ - void (*enabled_changed) (void *data, bool enabled); /** a new state is requested on the node */ void (*state_request) (void *data, enum pw_node_state state); @@ -194,12 +192,6 @@ int pw_node_set_active(struct pw_node *node, bool active); /** Check if a node is active */ bool pw_node_is_active(struct pw_node *node); -/** Set a node enabled. The node will be able to be activated */ -int pw_node_set_enabled(struct pw_node *node, bool enabled); - -/** Check if a node is enabled */ -bool pw_node_is_enabled(struct pw_node *node); - #ifdef __cplusplus } #endif diff --git a/src/pipewire/private.h b/src/pipewire/private.h index 82599d3e1..8e992820d 100644 --- a/src/pipewire/private.h +++ b/src/pipewire/private.h @@ -344,7 +344,6 @@ struct pw_node_activation { #define pw_node_emit_info_changed(n,i) pw_node_emit(n, info_changed, 0, i) #define pw_node_emit_port_info_changed(n,p,i) pw_node_emit(n, port_info_changed, 0, p, i) #define pw_node_emit_active_changed(n,a) pw_node_emit(n, active_changed, 0, a) -#define pw_node_emit_enabled_changed(n,e) pw_node_emit(n, enabled_changed, 0, e) #define pw_node_emit_state_request(n,s) pw_node_emit(n, state_request, 0, s) #define pw_node_emit_state_changed(n,o,s,e) pw_node_emit(n, state_changed, 0, o, s, e) #define pw_node_emit_async_complete(n,s,r) pw_node_emit(n, async_complete, 0, s, r) @@ -366,7 +365,6 @@ struct pw_node { struct spa_param_info params[MAX_PARAMS]; unsigned int registered:1; - unsigned int enabled:1; /**< if the node is enabled */ unsigned int active:1; /**< if the node is active */ unsigned int live:1; /**< if the node is live */ unsigned int driver:1; /**< if the node can drive the graph */