mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
use spa_list_append when we can
This commit is contained in:
parent
4aaa2cbc6b
commit
a691d07531
21 changed files with 41 additions and 42 deletions
|
|
@ -541,7 +541,7 @@ static int impl_node_process_input(struct spa_node *node)
|
|||
|
||||
spa_log_trace(this->log, NAME " %p: queue buffer %u", this, input->buffer_id);
|
||||
|
||||
spa_list_insert(this->ready.prev, &b->link);
|
||||
spa_list_append(&this->ready, &b->link);
|
||||
b->outstanding = false;
|
||||
input->buffer_id = SPA_ID_INVALID;
|
||||
input->status = SPA_RESULT_OK;
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ static void recycle_buffer(struct state *this, uint32_t buffer_id)
|
|||
spa_return_if_fail(b->outstanding);
|
||||
|
||||
b->outstanding = false;
|
||||
spa_list_insert(this->free.prev, &b->link);
|
||||
spa_list_append(&this->free, &b->link);
|
||||
}
|
||||
|
||||
static int clear_buffers(struct state *this)
|
||||
|
|
@ -448,7 +448,7 @@ impl_node_port_use_buffers(struct spa_node *node,
|
|||
spa_log_error(this->log, NAME " %p: need mapped memory", this);
|
||||
return SPA_RESULT_ERROR;
|
||||
}
|
||||
spa_list_insert(this->free.prev, &b->link);
|
||||
spa_list_append(&this->free, &b->link);
|
||||
}
|
||||
this->n_buffers = n_buffers;
|
||||
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ impl_node_port_use_buffers(struct spa_node *node,
|
|||
return SPA_RESULT_ERROR;
|
||||
}
|
||||
if (!b->outstanding)
|
||||
spa_list_insert(port->queue.prev, &b->link);
|
||||
spa_list_append(&port->queue, &b->link);
|
||||
}
|
||||
port->n_buffers = n_buffers;
|
||||
|
||||
|
|
@ -582,7 +582,7 @@ static void recycle_buffer(struct impl *this, uint32_t id)
|
|||
return;
|
||||
}
|
||||
|
||||
spa_list_insert(port->queue.prev, &b->link);
|
||||
spa_list_append(&port->queue, &b->link);
|
||||
b->outstanding = false;
|
||||
spa_log_trace(this->log, NAME " %p: recycle buffer %d", this, id);
|
||||
}
|
||||
|
|
@ -735,7 +735,7 @@ static int impl_node_process_input(struct spa_node *node)
|
|||
inio->buffer_id = SPA_ID_INVALID;
|
||||
inio->status = SPA_RESULT_OK;
|
||||
|
||||
spa_list_insert(inport->queue.prev, &b->link);
|
||||
spa_list_append(&inport->queue, &b->link);
|
||||
inport->queued_bytes += b->outbuf->datas[0].chunk->size;
|
||||
|
||||
spa_log_trace(this->log, NAME " %p: queue buffer %d on port %d %zd %zd",
|
||||
|
|
|
|||
|
|
@ -649,7 +649,7 @@ static int impl_node_process_input(struct spa_node *node)
|
|||
|
||||
spa_log_trace(this->log, NAME " %p: queue buffer %u", this, input->buffer_id);
|
||||
|
||||
spa_list_insert(this->ready.prev, &b->link);
|
||||
spa_list_append(&this->ready, &b->link);
|
||||
b->outstanding = false;
|
||||
|
||||
input->buffer_id = SPA_ID_INVALID;
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ impl_node_port_use_buffers(struct spa_node *node,
|
|||
spa_log_error(this->log, NAME " %p: invalid memory on buffer %p", this,
|
||||
buffers[i]);
|
||||
}
|
||||
spa_list_insert(this->empty.prev, &b->link);
|
||||
spa_list_append(&this->empty, &b->link);
|
||||
}
|
||||
this->n_buffers = n_buffers;
|
||||
this->underrun = false;
|
||||
|
|
@ -641,7 +641,7 @@ static inline void reuse_buffer(struct impl *this, uint32_t id)
|
|||
spa_log_trace(this->log, NAME " %p: reuse buffer %d", this, id);
|
||||
|
||||
b->outstanding = false;
|
||||
spa_list_insert(this->empty.prev, &b->link);
|
||||
spa_list_append(&this->empty, &b->link);
|
||||
|
||||
if (this->underrun) {
|
||||
set_timer(this, true);
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ static void recycle_buffer(struct impl *this, uint32_t id)
|
|||
return;
|
||||
}
|
||||
|
||||
spa_list_insert(port->empty.prev, &b->link);
|
||||
spa_list_append(&port->empty, &b->link);
|
||||
b->outstanding = false;
|
||||
spa_log_trace(this->log, NAME " %p: recycle buffer %d", this, id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue