mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
node: set port state when suspending
This commit is contained in:
parent
40675fec9f
commit
65d17ab6fe
2 changed files with 3 additions and 0 deletions
|
|
@ -249,6 +249,7 @@ on_global_added(struct pw_listener *listener, struct pw_core *core, struct pw_gl
|
|||
spa_list_insert(impl->node_list.prev, &ninfo->link);
|
||||
spa_list_init(&ninfo->port_unlinked.link);
|
||||
spa_list_init(&ninfo->link_state_changed.link);
|
||||
spa_list_init(&ninfo->link_destroy.link);
|
||||
|
||||
pw_signal_add(&node->port_added, &ninfo->port_added, on_port_added);
|
||||
pw_signal_add(&node->port_removed, &ninfo->port_removed, on_port_removed);
|
||||
|
|
|
|||
|
|
@ -200,11 +200,13 @@ static int suspend_node(struct pw_node *this)
|
|||
spa_list_for_each(p, &this->input_ports, link) {
|
||||
if ((res = pw_port_set_format(p, 0, NULL)) < 0)
|
||||
pw_log_warn("error unset format input: %d", res);
|
||||
p->state = PW_PORT_STATE_CONFIGURE;
|
||||
}
|
||||
|
||||
spa_list_for_each(p, &this->output_ports, link) {
|
||||
if ((res = pw_port_set_format(p, 0, NULL)) < 0)
|
||||
pw_log_warn("error unset format output: %d", res);
|
||||
p->state = PW_PORT_STATE_CONFIGURE;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue