summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2017-10-16 18:13:43 +0200
committerWim Taymans <wtaymans@redhat.com>2017-10-16 18:13:43 +0200
commit957a03e3f811ac0d87430cc4162b6e45f9e189b7 (patch)
tree7f7193ea4b1d7993b9020e2336538bd2877fe0a2
parentc386eda653d1620d304e8b0fda1ab7bcecda46d7 (diff)
export-source: implement reuse_buffer
-rw-r--r--src/examples/export-source.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/examples/export-source.c b/src/examples/export-source.c
index 5eada5ae..925d6e39 100644
--- a/src/examples/export-source.c
+++ b/src/examples/export-source.c
@@ -286,6 +286,13 @@ static inline void reuse_buffer(struct data *d, uint32_t id)
spa_list_append(&d->empty, &d->buffers[id].link);
}
+static int impl_port_reuse_buffer(struct spa_node *node, uint32_t port_id, uint32_t buffer_id)
+{
+ struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
+ reuse_buffer(d, buffer_id);
+ return SPA_RESULT_OK;
+}
+
static int impl_node_process_output(struct spa_node *node)
{
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
@@ -339,6 +346,7 @@ static const struct spa_node impl_node = {
.port_get_info = impl_port_get_info,
.port_enum_params = impl_port_enum_params,
.port_use_buffers = impl_port_use_buffers,
+ .port_reuse_buffer = impl_port_reuse_buffer,
.process_output = impl_node_process_output,
};