mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
node: add flags to port_use_buffer
Remove the CAN_USE_BUFFERS flag, it is redundant. We can know this because of the IO params and buffer params. Add flags to the port_use_buffer call. We also want this call to replace port_alloc_buffer. Together with a new result event we can ask the node to (a)synchronously fill up the buffer data for us. This is part of a plan to let remote nodes provide buffer data.
This commit is contained in:
parent
b314547702
commit
8590ac158b
33 changed files with 153 additions and 122 deletions
|
|
@ -125,8 +125,8 @@ static void init_port(struct port *p, enum spa_direction direction)
|
|||
}
|
||||
|
||||
static int port_use_buffers(void *data,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t n_buffers)
|
||||
uint32_t flags,
|
||||
struct spa_buffer **buffers, uint32_t n_buffers)
|
||||
{
|
||||
struct port *p = data;
|
||||
struct pw_port *port = p->port;
|
||||
|
|
@ -144,15 +144,13 @@ static int port_use_buffers(void *data,
|
|||
}
|
||||
|
||||
res = spa_node_port_use_buffers(port->mix,
|
||||
pw_direction_reverse(port->direction),
|
||||
0,
|
||||
buffers,
|
||||
n_buffers);
|
||||
pw_direction_reverse(port->direction), 0,
|
||||
flags,
|
||||
buffers, n_buffers);
|
||||
res = spa_node_port_use_buffers(node->node,
|
||||
port->direction,
|
||||
port->port_id,
|
||||
buffers,
|
||||
n_buffers);
|
||||
port->direction, port->port_id,
|
||||
flags,
|
||||
buffers, n_buffers);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue