mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
impl-node: start always need activate_node
This commit is contained in:
parent
e0974122ce
commit
e77a0e8dc4
1 changed files with 20 additions and 20 deletions
|
|
@ -208,11 +208,30 @@ static int pause_node(struct pw_impl_node *this)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void node_activate(struct pw_impl_node *this)
|
||||||
|
{
|
||||||
|
struct pw_impl_port *port;
|
||||||
|
|
||||||
|
pw_log_debug("%p: activate", this);
|
||||||
|
spa_list_for_each(port, &this->input_ports, link) {
|
||||||
|
struct pw_impl_link *link;
|
||||||
|
spa_list_for_each(link, &port->links, input_link)
|
||||||
|
pw_impl_link_activate(link);
|
||||||
|
}
|
||||||
|
spa_list_for_each(port, &this->output_ports, link) {
|
||||||
|
struct pw_impl_link *link;
|
||||||
|
spa_list_for_each(link, &port->links, output_link)
|
||||||
|
pw_impl_link_activate(link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int start_node(struct pw_impl_node *this)
|
static int start_node(struct pw_impl_node *this)
|
||||||
{
|
{
|
||||||
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
|
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
|
node_activate(this);
|
||||||
|
|
||||||
if (impl->pending_state >= PW_NODE_STATE_RUNNING)
|
if (impl->pending_state >= PW_NODE_STATE_RUNNING)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
@ -2041,23 +2060,6 @@ static void on_state_complete(void *obj, void *data, int res, uint32_t seq)
|
||||||
node_update_state(node, state, res, error);
|
node_update_state(node, state, res, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void node_activate(struct pw_impl_node *this)
|
|
||||||
{
|
|
||||||
struct pw_impl_port *port;
|
|
||||||
|
|
||||||
pw_log_debug("%p: activate", this);
|
|
||||||
spa_list_for_each(port, &this->input_ports, link) {
|
|
||||||
struct pw_impl_link *link;
|
|
||||||
spa_list_for_each(link, &port->links, input_link)
|
|
||||||
pw_impl_link_activate(link);
|
|
||||||
}
|
|
||||||
spa_list_for_each(port, &this->output_ports, link) {
|
|
||||||
struct pw_impl_link *link;
|
|
||||||
spa_list_for_each(link, &port->links, output_link)
|
|
||||||
pw_impl_link_activate(link);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Set the node state
|
/** Set the node state
|
||||||
* \param node a \ref pw_impl_node
|
* \param node a \ref pw_impl_node
|
||||||
* \param state a \ref pw_node_state
|
* \param state a \ref pw_node_state
|
||||||
|
|
@ -2096,10 +2098,8 @@ int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PW_NODE_STATE_RUNNING:
|
case PW_NODE_STATE_RUNNING:
|
||||||
if (node->active) {
|
if (node->active)
|
||||||
node_activate(node);
|
|
||||||
res = start_node(node);
|
res = start_node(node);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PW_NODE_STATE_ERROR:
|
case PW_NODE_STATE_ERROR:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue