rearrange code

This commit is contained in:
Ordoñez Müller, Antonio 2026-03-24 12:47:19 +01:00
parent bc87bc8588
commit 830e81f200

View file

@ -334,6 +334,20 @@ static void on_output(void* data, uint64_t expirations)
spa_node_call_ready(&this->callbacks, res);
}
static inline void reuse_buffer(struct impl *this, struct port *port, uint32_t id)
{
struct buffer *b = &port->buffers[id];
spa_return_if_fail(b->outstanding);
spa_log_trace(this->log, "%p: reuse buffer %d", this, id);
b->outstanding = false;
spa_list_append(&port->empty, &b->link);
if (!this->props.live)
set_timer(this, true);
}
static int impl_node_send_command(void *object, const struct spa_command *command)
{
struct impl *this = object;
@ -746,20 +760,6 @@ impl_node_port_set_io(void *object,
return 0;
}
static inline void reuse_buffer(struct impl *this, struct port *port, uint32_t id)
{
struct buffer *b = &port->buffers[id];
spa_return_if_fail(b->outstanding);
spa_log_trace(this->log, "%p: reuse buffer %d", this, id);
b->outstanding = false;
spa_list_append(&port->empty, &b->link);
if (!this->props.live)
set_timer(this, true);
}
static int impl_node_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
{
struct impl *this = object;