spa: add RequestProcess command and event

The event is emitted by a node that is not a driver but wants the graph
to be scheduled. The command is sent to the driver and suggest that the
graph be scheduled.
This commit is contained in:
Wim Taymans 2021-10-19 15:59:21 +02:00
parent 7529e7c47c
commit 3471391e0e
3 changed files with 6 additions and 0 deletions

View file

@ -54,6 +54,8 @@ enum spa_node_command {
* remain opened, like query formats and then
* set a format */
SPA_NODE_COMMAND_ParamEnd, /**< end a transaction */
SPA_NODE_COMMAND_RequestProcess,/**< Sent to a driver when some other node emitted
* the RequestProcess event. */
};
#define SPA_NODE_COMMAND_ID(cmd) SPA_COMMAND_ID(cmd, SPA_TYPE_COMMAND_Node)

View file

@ -41,6 +41,8 @@ enum spa_node_event {
SPA_NODE_EVENT_Error,
SPA_NODE_EVENT_Buffering,
SPA_NODE_EVENT_RequestRefresh,
SPA_NODE_EVENT_RequestProcess, /*< Ask the driver to start processing
* the graph */
};
#define SPA_NODE_EVENT_ID(ev) SPA_EVENT_ID(ev, SPA_TYPE_EVENT_Node)

View file

@ -64,6 +64,7 @@ static const struct spa_type_info spa_type_node_event_id[] = {
{ SPA_NODE_EVENT_Error, SPA_TYPE_Int, SPA_TYPE_INFO_NODE_EVENT_BASE "Error", NULL },
{ SPA_NODE_EVENT_Buffering, SPA_TYPE_Int, SPA_TYPE_INFO_NODE_EVENT_BASE "Buffering", NULL },
{ SPA_NODE_EVENT_RequestRefresh, SPA_TYPE_Int, SPA_TYPE_INFO_NODE_EVENT_BASE "RequestRefresh", NULL },
{ SPA_NODE_EVENT_RequestProcess, SPA_TYPE_Int, SPA_TYPE_INFO_NODE_EVENT_BASE "RequestProcess", NULL },
{ 0, 0, NULL, NULL },
};
@ -86,6 +87,7 @@ static const struct spa_type_info spa_type_node_command_id[] = {
{ SPA_NODE_COMMAND_Marker, SPA_TYPE_Int, SPA_TYPE_INFO_NODE_COMMAND_BASE "Marker", NULL },
{ SPA_NODE_COMMAND_ParamBegin, SPA_TYPE_Int, SPA_TYPE_INFO_NODE_COMMAND_BASE "ParamBegin", NULL },
{ SPA_NODE_COMMAND_ParamEnd, SPA_TYPE_Int, SPA_TYPE_INFO_NODE_COMMAND_BASE "ParamEnd", NULL },
{ SPA_NODE_COMMAND_RequestProcess, SPA_TYPE_Int, SPA_TYPE_INFO_NODE_COMMAND_BASE "RequestProcess", NULL },
{ 0, 0, NULL, NULL },
};