mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-20 00:11:31 +00:00
node: dispatch RequestProcess event and command
The event is send to the driver node. The command is sent to node directly.
This commit is contained in:
parent
3471391e0e
commit
b5080a0395
|
@ -511,7 +511,9 @@ static int client_node_command(void *object, const struct spa_command *command)
|
|||
pw_proxy_error(proxy, res, "suspend failed");
|
||||
}
|
||||
break;
|
||||
|
||||
case SPA_NODE_COMMAND_RequestProcess:
|
||||
res = pw_impl_node_send_command(data->node, command);
|
||||
break;
|
||||
default:
|
||||
pw_log_warn("unhandled node command %d", SPA_NODE_COMMAND_ID(command));
|
||||
res = -ENOTSUP;
|
||||
|
|
|
@ -1437,8 +1437,15 @@ static void node_event(void *data, const struct spa_event *event)
|
|||
node_update_state(node, PW_NODE_STATE_ERROR,
|
||||
-EFAULT, strdup("Received error event"));
|
||||
break;
|
||||
case SPA_NODE_EVENT_RequestProcess:
|
||||
pw_log_debug("request process");
|
||||
if (!node->driving) {
|
||||
pw_impl_node_send_command(node->driver_node,
|
||||
&SPA_NODE_COMMAND_INIT(SPA_NODE_COMMAND_RequestProcess));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pw_log_debug("unhandled event");
|
||||
pw_log_debug("unhandled event %d", SPA_NODE_EVENT_ID(event));
|
||||
break;
|
||||
}
|
||||
pw_impl_node_emit_event(node, event);
|
||||
|
|
Loading…
Reference in a new issue