diff --git a/spa/plugins/audiomixer/audiomixer.c b/spa/plugins/audiomixer/audiomixer.c index 90e8c1a0a..f6b81322b 100644 --- a/spa/plugins/audiomixer/audiomixer.c +++ b/spa/plugins/audiomixer/audiomixer.c @@ -246,8 +246,7 @@ static int impl_node_add_port(void *object, enum spa_direction direction, uint32 port->info_all = SPA_PORT_CHANGE_MASK_FLAGS | SPA_PORT_CHANGE_MASK_PARAMS; port->info = SPA_PORT_INFO_INIT(); - port->info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS | - SPA_PORT_FLAG_REMOVABLE | + port->info.flags = SPA_PORT_FLAG_REMOVABLE | SPA_PORT_FLAG_OPTIONAL | SPA_PORT_FLAG_IN_PLACE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); @@ -552,6 +551,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) { @@ -599,18 +599,6 @@ impl_node_port_use_buffers(void *object, return 0; } -static int -impl_node_port_alloc_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_pod **params, - uint32_t n_params, - struct spa_buffer **buffers, - uint32_t *n_buffers) -{ - return -ENOTSUP; -} - static int impl_node_port_set_io(void *object, enum spa_direction direction, uint32_t port_id, @@ -857,7 +845,6 @@ static const struct spa_node_methods impl_node = { .port_enum_params = impl_node_port_enum_params, .port_set_param = impl_node_port_set_param, .port_use_buffers = impl_node_port_use_buffers, - .port_alloc_buffers = impl_node_port_alloc_buffers, .port_set_io = impl_node_port_set_io, .port_reuse_buffer = impl_node_port_reuse_buffer, .process = impl_node_process, @@ -936,8 +923,7 @@ impl_init(const struct spa_handle_factory *factory, port->id = 0; port->info = SPA_PORT_INFO_INIT(); port->info.change_mask |= SPA_PORT_CHANGE_MASK_FLAGS; - port->info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS | - SPA_PORT_FLAG_NO_REF; + port->info.flags = SPA_PORT_FLAG_NO_REF; port->info.change_mask |= SPA_PORT_CHANGE_MASK_PARAMS; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); port->params[1] = SPA_PARAM_INFO(SPA_PARAM_Meta, SPA_PARAM_INFO_READ); diff --git a/spa/plugins/audiotestsrc/audiotestsrc.c b/spa/plugins/audiotestsrc/audiotestsrc.c index acddf3d7b..2b21a7c71 100644 --- a/spa/plugins/audiotestsrc/audiotestsrc.c +++ b/spa/plugins/audiotestsrc/audiotestsrc.c @@ -751,6 +751,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) { @@ -793,30 +794,6 @@ impl_node_port_use_buffers(void *object, return 0; } -static int -impl_node_port_alloc_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_pod **params, - uint32_t n_params, - struct spa_buffer **buffers, - uint32_t *n_buffers) -{ - struct impl *this = object; - struct port *port; - - spa_return_val_if_fail(this != NULL, -EINVAL); - - spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); - - port = &this->port; - - if (!port->have_format) - return -EIO; - - return -ENOTSUP; -} - static int impl_node_port_set_io(void *object, enum spa_direction direction, @@ -941,7 +918,6 @@ static const struct spa_node_methods impl_node = { .port_enum_params = impl_node_port_enum_params, .port_set_param = impl_node_port_set_param, .port_use_buffers = impl_node_port_use_buffers, - .port_alloc_buffers = impl_node_port_alloc_buffers, .port_set_io = impl_node_port_set_io, .port_reuse_buffer = impl_node_port_reuse_buffer, .process = impl_node_process, @@ -1056,7 +1032,7 @@ impl_init(const struct spa_handle_factory *factory, port->info_all = SPA_PORT_CHANGE_MASK_FLAGS | SPA_PORT_CHANGE_MASK_PARAMS; port->info = SPA_PORT_INFO_INIT(); - port->info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS | SPA_PORT_FLAG_NO_REF; + port->info.flags = SPA_PORT_FLAG_NO_REF; if (this->props.live) this->info.flags |= SPA_PORT_FLAG_LIVE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); diff --git a/spa/plugins/ffmpeg/ffmpeg-dec.c b/spa/plugins/ffmpeg/ffmpeg-dec.c index 01c84f1c7..e2d9f7d14 100644 --- a/spa/plugins/ffmpeg/ffmpeg-dec.c +++ b/spa/plugins/ffmpeg/ffmpeg-dec.c @@ -342,6 +342,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) { @@ -354,18 +355,6 @@ impl_node_port_use_buffers(void *object, return -ENOTSUP; } -static int -impl_node_port_alloc_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_pod **params, - uint32_t n_params, - struct spa_buffer **buffers, - uint32_t *n_buffers) -{ - return -ENOTSUP; -} - static int impl_node_port_set_io(void *object, enum spa_direction direction, @@ -440,7 +429,6 @@ static const struct spa_node_methods impl_node = { .port_enum_params = impl_node_port_enum_params, .port_set_param = impl_node_port_set_param, .port_use_buffers = impl_node_port_use_buffers, - .port_alloc_buffers = impl_node_port_alloc_buffers, .port_set_io = impl_node_port_set_io, .port_reuse_buffer = impl_node_port_reuse_buffer, .process = impl_node_process, diff --git a/spa/plugins/ffmpeg/ffmpeg-enc.c b/spa/plugins/ffmpeg/ffmpeg-enc.c index 04f7046d2..b96f8a1ac 100644 --- a/spa/plugins/ffmpeg/ffmpeg-enc.c +++ b/spa/plugins/ffmpeg/ffmpeg-enc.c @@ -322,6 +322,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) { if (object == NULL) @@ -333,18 +334,6 @@ impl_node_port_use_buffers(void *object, return -ENOTSUP; } -static int -impl_node_port_alloc_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_pod **params, - uint32_t n_params, - struct spa_buffer **buffers, - uint32_t *n_buffers) -{ - return -ENOTSUP; -} - static int impl_node_port_set_io(void *object, enum spa_direction direction, @@ -419,7 +408,6 @@ static const struct spa_node_methods impl_node = { .port_enum_params = impl_node_port_enum_params, .port_set_param = impl_node_port_set_param, .port_use_buffers = impl_node_port_use_buffers, - .port_alloc_buffers = impl_node_port_alloc_buffers, .port_set_io = impl_node_port_set_io, .port_reuse_buffer = impl_node_port_reuse_buffer, .process = impl_node_process, diff --git a/spa/plugins/test/fakesink.c b/spa/plugins/test/fakesink.c index 669d33b62..20c024392 100644 --- a/spa/plugins/test/fakesink.c +++ b/spa/plugins/test/fakesink.c @@ -557,6 +557,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) { @@ -595,28 +596,6 @@ impl_node_port_use_buffers(void *object, return 0; } -static int -impl_node_port_alloc_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_pod **params, - uint32_t n_params, - struct spa_buffer **buffers, - uint32_t *n_buffers) -{ - struct impl *this = object; - struct port *port; - - spa_return_val_if_fail(this != NULL, -EINVAL); - spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); - port = &this->port; - - if (!port->have_format) - return -EIO; - - return -ENOTSUP; -} - static int impl_node_port_set_io(void *object, enum spa_direction direction, @@ -694,7 +673,6 @@ static const struct spa_node_methods impl_node = { .port_enum_params = impl_node_port_enum_params, .port_set_param = impl_node_port_set_param, .port_use_buffers = impl_node_port_use_buffers, - .port_alloc_buffers = impl_node_port_alloc_buffers, .port_set_io = impl_node_port_set_io, .port_reuse_buffer = impl_node_port_reuse_buffer, .process = impl_node_process, @@ -800,7 +778,7 @@ impl_init(const struct spa_handle_factory *factory, port->info_all = SPA_PORT_CHANGE_MASK_FLAGS | SPA_PORT_CHANGE_MASK_PARAMS; port->info = SPA_PORT_INFO_INIT(); - port->info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS | SPA_PORT_FLAG_NO_REF; + port->info.flags = SPA_PORT_FLAG_NO_REF; if (this->props.live) port->info.flags |= SPA_PORT_FLAG_LIVE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); diff --git a/spa/plugins/test/fakesrc.c b/spa/plugins/test/fakesrc.c index e0cf865f0..0b4ae8959 100644 --- a/spa/plugins/test/fakesrc.c +++ b/spa/plugins/test/fakesrc.c @@ -572,10 +572,9 @@ impl_node_port_set_param(void *object, static int impl_node_port_use_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_buffer **buffers, - uint32_t n_buffers) + enum spa_direction direction, uint32_t flags, + uint32_t port_id, + struct spa_buffer **buffers, uint32_t n_buffers) { struct impl *this = object; struct port *port; @@ -614,28 +613,6 @@ impl_node_port_use_buffers(void *object, return 0; } -static int -impl_node_port_alloc_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_pod **params, - uint32_t n_params, - struct spa_buffer **buffers, - uint32_t *n_buffers) -{ - struct impl *this = object; - struct port *port; - - spa_return_val_if_fail(this != NULL, -EINVAL); - spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); - port = &this->port; - - if (!port->have_format) - return -EIO; - - return -ENOTSUP; -} - static int impl_node_port_set_io(void *object, enum spa_direction direction, @@ -730,7 +707,6 @@ static const struct spa_node_methods impl_node = { .port_enum_params = impl_node_port_enum_params, .port_set_param = impl_node_port_set_param, .port_use_buffers = impl_node_port_use_buffers, - .port_alloc_buffers = impl_node_port_alloc_buffers, .port_set_io = impl_node_port_set_io, .port_reuse_buffer = impl_node_port_reuse_buffer, .process = impl_node_process, @@ -835,7 +811,7 @@ impl_init(const struct spa_handle_factory *factory, port->info_all = SPA_PORT_CHANGE_MASK_FLAGS | SPA_PORT_CHANGE_MASK_PARAMS; port->info = SPA_PORT_INFO_INIT(); - port->info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS | SPA_PORT_FLAG_NO_REF; + port->info.flags = SPA_PORT_FLAG_NO_REF; if (this->props.live) port->info.flags |= SPA_PORT_FLAG_LIVE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); diff --git a/spa/plugins/videotestsrc/videotestsrc.c b/spa/plugins/videotestsrc/videotestsrc.c index 92caed857..529c1d754 100644 --- a/spa/plugins/videotestsrc/videotestsrc.c +++ b/spa/plugins/videotestsrc/videotestsrc.c @@ -672,6 +672,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) { @@ -712,28 +713,6 @@ impl_node_port_use_buffers(void *object, return 0; } -static int -impl_node_port_alloc_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_pod **params, - uint32_t n_params, - struct spa_buffer **buffers, - uint32_t *n_buffers) -{ - struct impl *this = object; - struct port *port; - - spa_return_val_if_fail(this != NULL, -EINVAL); - spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); - port = &this->port; - - if (!port->have_format) - return -EIO; - - return -ENOTSUP; -} - static int impl_node_port_set_io(void *object, enum spa_direction direction, @@ -824,7 +803,6 @@ static const struct spa_node_methods impl_node = { .port_enum_params = impl_node_port_enum_params, .port_set_param = impl_node_port_set_param, .port_use_buffers = impl_node_port_use_buffers, - .port_alloc_buffers = impl_node_port_alloc_buffers, .port_set_io = impl_node_port_set_io, .port_reuse_buffer = impl_node_port_reuse_buffer, .process = impl_node_process, @@ -931,7 +909,7 @@ impl_init(const struct spa_handle_factory *factory, port->info_all = SPA_PORT_CHANGE_MASK_FLAGS | SPA_PORT_CHANGE_MASK_PARAMS; port->info = SPA_PORT_INFO_INIT(); - port->info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS | SPA_PORT_FLAG_NO_REF; + port->info.flags = SPA_PORT_FLAG_NO_REF; if (this->props.live) this->info.flags |= SPA_PORT_FLAG_LIVE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); diff --git a/spa/plugins/volume/volume.c b/spa/plugins/volume/volume.c index b08ed7c75..3ca4921fe 100644 --- a/spa/plugins/volume/volume.c +++ b/spa/plugins/volume/volume.c @@ -502,6 +502,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) { @@ -547,18 +548,6 @@ impl_node_port_use_buffers(void *object, return 0; } -static int -impl_node_port_alloc_buffers(void *object, - enum spa_direction direction, - uint32_t port_id, - struct spa_pod **params, - uint32_t n_params, - struct spa_buffer **buffers, - uint32_t *n_buffers) -{ - return -ENOTSUP; -} - static int impl_node_port_set_io(void *object, enum spa_direction direction, @@ -743,7 +732,6 @@ static const struct spa_node_methods impl_node = { .port_enum_params = impl_node_port_enum_params, .port_set_param = impl_node_port_set_param, .port_use_buffers = impl_node_port_use_buffers, - .port_alloc_buffers = impl_node_port_alloc_buffers, .port_set_io = impl_node_port_set_io, .port_reuse_buffer = impl_node_port_reuse_buffer, .process = impl_node_process, @@ -826,8 +814,7 @@ impl_init(const struct spa_handle_factory *factory, port->info_all = SPA_PORT_CHANGE_MASK_FLAGS | SPA_NODE_CHANGE_MASK_PARAMS; port->info = SPA_PORT_INFO_INIT(); - port->info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS | - SPA_PORT_FLAG_IN_PLACE; + port->info.flags = SPA_PORT_FLAG_IN_PLACE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); port->params[1] = SPA_PARAM_INFO(SPA_PARAM_Meta, SPA_PARAM_INFO_READ); port->params[2] = SPA_PARAM_INFO(SPA_PARAM_IO, SPA_PARAM_INFO_READ); @@ -843,8 +830,7 @@ impl_init(const struct spa_handle_factory *factory, port->info_all = SPA_PORT_CHANGE_MASK_FLAGS | SPA_NODE_CHANGE_MASK_PARAMS; port->info = SPA_PORT_INFO_INIT(); - port->info.flags = SPA_PORT_FLAG_CAN_USE_BUFFERS | - SPA_PORT_FLAG_NO_REF; + port->info.flags = SPA_PORT_FLAG_NO_REF; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); port->params[1] = SPA_PARAM_INFO(SPA_PARAM_Meta, SPA_PARAM_INFO_READ); port->params[2] = SPA_PARAM_INFO(SPA_PARAM_IO, SPA_PARAM_INFO_READ);