diff options
author | Wim Taymans <wtaymans@redhat.com> | 2019-07-25 13:19:39 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-07-25 13:19:39 +0200 |
commit | 8590ac158bb4f295f41e2c1acd6950f838e5e1d2 (patch) | |
tree | 939f632910b6ae12659172b60b5267cb8d6c097d /src/examples/export-source.c | |
parent | b314547702953a82ec5cacbd7b716b654a8cd728 (diff) |
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.
Diffstat (limited to 'src/examples/export-source.c')
-rw-r--r-- | src/examples/export-source.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/examples/export-source.c b/src/examples/export-source.c index 5f7dacc7..a69babdf 100644 --- a/src/examples/export-source.c +++ b/src/examples/export-source.c @@ -304,10 +304,12 @@ 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; + for (i = 0; i < n_buffers; i++) { struct buffer *b = &d->buffers[i]; struct spa_data *datas = buffers[i]->datas; @@ -521,7 +523,7 @@ int main(int argc, char *argv[]) SPA_PORT_CHANGE_MASK_PROPS | SPA_PORT_CHANGE_MASK_PARAMS; data.info = SPA_PORT_INFO_INIT(); - data.info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS; + data.info.flags = 0; data.items[0] = SPA_DICT_ITEM_INIT(PW_KEY_FORMAT_DSP, "32 bit float mono audio"); data.dict = SPA_DICT_INIT_ARRAY(data.items); data.info.props = &data.dict; |