summaryrefslogtreecommitdiff
path: root/src/modules/module-client-node/client-node.c
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-07-25 13:19:39 +0200
committerWim Taymans <wtaymans@redhat.com>2019-07-25 13:19:39 +0200
commit8590ac158bb4f295f41e2c1acd6950f838e5e1d2 (patch)
tree939f632910b6ae12659172b60b5267cb8d6c097d /src/modules/module-client-node/client-node.c
parentb314547702953a82ec5cacbd7b716b654a8cd728 (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/modules/module-client-node/client-node.c')
-rw-r--r--src/modules/module-client-node/client-node.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c
index 2524fd5d..e017b44b 100644
--- a/src/modules/module-client-node/client-node.c
+++ b/src/modules/module-client-node/client-node.c
@@ -187,11 +187,13 @@ struct impl {
pw_client_node_resource(r,port_set_io,0,__VA_ARGS__)
#define pw_client_node_resource_set_activation(r,...) \
pw_client_node_resource(r,set_activation,0,__VA_ARGS__)
+
static int
do_port_use_buffers(struct impl *impl,
enum spa_direction direction,
uint32_t port_id,
uint32_t mix_id,
+ uint32_t flags,
struct spa_buffer **buffers,
uint32_t n_buffers);
@@ -268,7 +270,7 @@ static void mix_clear(struct node *this, struct mix *mix)
if (!mix->valid)
return;
do_port_use_buffers(this->impl, port->direction, port->id,
- mix->id, NULL, 0);
+ mix->id, 0, NULL, 0);
mix->valid = false;
}
@@ -695,6 +697,7 @@ do_port_use_buffers(struct impl *impl,
enum spa_direction direction,
uint32_t port_id,
uint32_t mix_id,
+ uint32_t flags,
struct spa_buffer **buffers,
uint32_t n_buffers)
{
@@ -811,7 +814,7 @@ do_port_use_buffers(struct impl *impl,
}
return pw_client_node_resource_port_use_buffers(this->resource,
- direction, port_id, mix_id,
+ direction, port_id, mix_id, flags,
n_buffers, mb);
}
@@ -819,6 +822,7 @@ static int
impl_node_port_use_buffers(void *object,
enum spa_direction direction,
uint32_t port_id,
+ uint32_t flags,
struct spa_buffer **buffers,
uint32_t n_buffers)
{
@@ -830,7 +834,7 @@ impl_node_port_use_buffers(void *object,
impl = this->impl;
return do_port_use_buffers(impl, direction, port_id,
- SPA_ID_INVALID, buffers, n_buffers);
+ SPA_ID_INVALID, flags, buffers, n_buffers);
}
static int
@@ -1344,13 +1348,14 @@ static int
impl_mix_port_use_buffers(void *object,
enum spa_direction direction,
uint32_t mix_id,
+ uint32_t flags,
struct spa_buffer **buffers,
uint32_t n_buffers)
{
struct port *port = object;
struct impl *impl = port->impl;
- return do_port_use_buffers(impl, direction, port->id, mix_id, buffers, n_buffers);
+ return do_port_use_buffers(impl, direction, port->id, mix_id, flags, buffers, n_buffers);
}
static int