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
|
|
@ -496,7 +496,7 @@ static int clear_buffers(struct node_data *data, struct mix *mix)
|
|||
int res;
|
||||
|
||||
pw_log_debug("port %p: clear buffers mix:%d", port, mix->mix_id);
|
||||
if ((res = pw_port_use_buffers(port, mix->mix_id, NULL, 0)) < 0) {
|
||||
if ((res = pw_port_use_buffers(port, mix->mix_id, 0, NULL, 0)) < 0) {
|
||||
pw_log_error("port %p: error clear buffers %s", port, spa_strerror(res));
|
||||
return res;
|
||||
}
|
||||
|
|
@ -553,6 +553,7 @@ error_exit:
|
|||
static int
|
||||
client_node_port_use_buffers(void *object,
|
||||
enum spa_direction direction, uint32_t port_id, uint32_t mix_id,
|
||||
uint32_t flags,
|
||||
uint32_t n_buffers, struct pw_client_node_buffer *buffers)
|
||||
{
|
||||
struct pw_proxy *proxy = object;
|
||||
|
|
@ -666,7 +667,7 @@ client_node_port_use_buffers(void *object,
|
|||
bufs[i] = b;
|
||||
}
|
||||
|
||||
if ((res = pw_port_use_buffers(mix->port, mix->mix_id, bufs, n_buffers)) < 0)
|
||||
if ((res = pw_port_use_buffers(mix->port, mix->mix_id, flags, bufs, n_buffers)) < 0)
|
||||
goto error_exit_cleanup;
|
||||
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue