mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
remote-node: implement suspend
This commit is contained in:
parent
e8464cf1b3
commit
38bc80a3b8
2 changed files with 10 additions and 5 deletions
|
|
@ -399,12 +399,8 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
spa_vulkan_start(&this->state);
|
||||
break;
|
||||
}
|
||||
case SPA_NODE_COMMAND_Suspend:
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
if (!port->have_format)
|
||||
return -EIO;
|
||||
if (port->n_buffers == 0)
|
||||
return -EIO;
|
||||
|
||||
if (!this->started)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -469,6 +469,15 @@ static int client_node_command(void *object, const struct spa_command *command)
|
|||
pw_proxy_error(proxy, res, "start failed");
|
||||
}
|
||||
break;
|
||||
|
||||
case SPA_NODE_COMMAND_Suspend:
|
||||
pw_log_debug("node %p: suspend", proxy);
|
||||
if ((res = pw_node_set_state(data->node, PW_NODE_STATE_SUSPENDED)) < 0) {
|
||||
pw_log_warn("node %p: suspend failed", proxy);
|
||||
pw_proxy_error(proxy, res, "suspend failed");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
pw_log_warn("unhandled node command %d", SPA_NODE_COMMAND_ID(command));
|
||||
res = -ENOTSUP;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue