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:
Wim Taymans 2019-07-25 13:19:39 +02:00
parent b314547702
commit 8590ac158b
33 changed files with 153 additions and 122 deletions

View file

@ -104,7 +104,7 @@ static int impl_add_listener(void *object,
info = SPA_PORT_INFO_INIT();
info.change_mask = SPA_PORT_CHANGE_MASK_FLAGS;
info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS;
info.flags = 0;
spa_node_emit_port_info(&d->hooks, SPA_DIRECTION_INPUT, 0, &info);
@ -243,7 +243,7 @@ static int impl_port_set_param(void *object,
}
static int impl_port_use_buffers(void *object, enum spa_direction direction, uint32_t port_id,
struct spa_buffer **buffers, uint32_t n_buffers)
uint32_t flags, struct spa_buffer **buffers, uint32_t n_buffers)
{
struct data *d = object;
uint32_t i;