mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04: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
|
|
@ -394,11 +394,11 @@ static int negotiate_formats(struct data *data)
|
|||
|
||||
init_buffer(data, data->source_buffers, data->source_buffer, 1, BUFFER_SIZE);
|
||||
if ((res =
|
||||
spa_node_port_use_buffers(data->sink, SPA_DIRECTION_INPUT, 0, data->source_buffers,
|
||||
spa_node_port_use_buffers(data->sink, SPA_DIRECTION_INPUT, 0, 0, data->source_buffers,
|
||||
1)) < 0)
|
||||
return res;
|
||||
if ((res =
|
||||
spa_node_port_use_buffers(data->source, SPA_DIRECTION_OUTPUT, 0, data->source_buffers,
|
||||
spa_node_port_use_buffers(data->source, SPA_DIRECTION_OUTPUT, 0, 0, data->source_buffers,
|
||||
1)) < 0)
|
||||
return res;
|
||||
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ static int negotiate_formats(struct data *data)
|
|||
if ((res = sdl_alloc_buffers(data)) < 0)
|
||||
return res;
|
||||
|
||||
if ((res = spa_node_port_use_buffers(data->source, SPA_DIRECTION_OUTPUT, 0, data->bp,
|
||||
if ((res = spa_node_port_use_buffers(data->source, SPA_DIRECTION_OUTPUT, 0, 0, data->bp,
|
||||
data->n_buffers)) < 0) {
|
||||
printf("can't allocate buffers: %s\n", spa_strerror(res));
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue