mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Cleanups
Remove unused events, drained and marker can be done with ASYNC_COMPLETED messages Handle result of idle callback to disable the poll item Identify poll items with a unique id. Remove set_state vfunc push_event -> send_command, commands are to do something, events are the result of something. Add poll item in v4l2 as soon as we have the fd but disable the item until streaming starts.
This commit is contained in:
parent
9b2b4b9b5c
commit
1bd751372e
21 changed files with 188 additions and 190 deletions
|
|
@ -983,21 +983,21 @@ spa_proxy_node_port_reuse_buffer (SpaNode *node,
|
|||
}
|
||||
|
||||
static SpaResult
|
||||
spa_proxy_node_port_push_event (SpaNode *node,
|
||||
SpaDirection direction,
|
||||
uint32_t port_id,
|
||||
SpaNodeEvent *event)
|
||||
spa_proxy_node_port_send_command (SpaNode *node,
|
||||
SpaDirection direction,
|
||||
uint32_t port_id,
|
||||
SpaNodeCommand *command)
|
||||
{
|
||||
SpaProxy *this;
|
||||
|
||||
if (node == NULL || event == NULL)
|
||||
if (node == NULL || command == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
||||
this = SPA_CONTAINER_OF (node, SpaProxy, node);
|
||||
|
||||
switch (event->type) {
|
||||
switch (command->type) {
|
||||
default:
|
||||
spa_log_warn (this->log, "unhandled event %d\n", event->type);
|
||||
spa_log_warn (this->log, "unhandled command %d\n", command->type);
|
||||
break;
|
||||
}
|
||||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
|
|
@ -1015,8 +1015,6 @@ handle_node_event (SpaProxy *this,
|
|||
case SPA_NODE_EVENT_TYPE_HAVE_OUTPUT:
|
||||
case SPA_NODE_EVENT_TYPE_NEED_INPUT:
|
||||
case SPA_NODE_EVENT_TYPE_REUSE_BUFFER:
|
||||
case SPA_NODE_EVENT_TYPE_DRAINED:
|
||||
case SPA_NODE_EVENT_TYPE_MARKER:
|
||||
case SPA_NODE_EVENT_TYPE_ERROR:
|
||||
case SPA_NODE_EVENT_TYPE_BUFFERING:
|
||||
case SPA_NODE_EVENT_TYPE_REQUEST_REFRESH:
|
||||
|
|
@ -1237,7 +1235,7 @@ static const SpaNode proxy_node = {
|
|||
spa_proxy_node_port_push_input,
|
||||
spa_proxy_node_port_pull_output,
|
||||
spa_proxy_node_port_reuse_buffer,
|
||||
spa_proxy_node_port_push_event,
|
||||
spa_proxy_node_port_send_command,
|
||||
};
|
||||
|
||||
static SpaResult
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue