mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
rename HAVE/NEED_BUFFER -> HAVE/NEED_DATA
It is more generic and works with control-only ports as well
This commit is contained in:
parent
d648ea4ad3
commit
8b85cc225e
40 changed files with 176 additions and 176 deletions
|
|
@ -374,21 +374,21 @@ static void decode_sbc_data(struct impl *this, uint8_t *src, size_t src_size)
|
|||
}
|
||||
|
||||
/* Process a buffer if there is one ready and IO does not have one */
|
||||
if (!spa_list_is_empty(&port->ready) && io->status != SPA_STATUS_HAVE_BUFFER) {
|
||||
if (!spa_list_is_empty(&port->ready) && io->status != SPA_STATUS_HAVE_DATA) {
|
||||
/* Get the ready buffer and remove it from the ready list */
|
||||
buffer = spa_list_first(&port->ready, struct buffer, link);
|
||||
spa_list_remove(&buffer->link);
|
||||
|
||||
/* Mark the buffer to be processed */
|
||||
io->buffer_id = buffer->id;
|
||||
io->status = SPA_STATUS_HAVE_BUFFER;
|
||||
io->status = SPA_STATUS_HAVE_DATA;
|
||||
|
||||
/* Add the buffer to the free list */
|
||||
spa_list_append(&port->free, &buffer->link);
|
||||
buffer->outstanding = false;
|
||||
|
||||
/* Set the done status as have buffer */
|
||||
io_done_status = SPA_STATUS_HAVE_BUFFER;
|
||||
io_done_status = SPA_STATUS_HAVE_DATA;
|
||||
}
|
||||
|
||||
spa_node_call_ready(&this->callbacks, io_done_status);
|
||||
|
|
@ -983,8 +983,8 @@ static int impl_node_process(void *object)
|
|||
spa_return_val_if_fail(io != NULL, -EIO);
|
||||
|
||||
/* Return if we already have a buffer */
|
||||
if (io->status == SPA_STATUS_HAVE_BUFFER)
|
||||
return SPA_STATUS_HAVE_BUFFER;
|
||||
if (io->status == SPA_STATUS_HAVE_DATA)
|
||||
return SPA_STATUS_HAVE_DATA;
|
||||
|
||||
/* Return if there is not buffers ready to be processed */
|
||||
if (spa_list_is_empty(&port->ready))
|
||||
|
|
@ -996,14 +996,14 @@ static int impl_node_process(void *object)
|
|||
|
||||
/* Set the new buffer in IO */
|
||||
io->buffer_id = buffer->id;
|
||||
io->status = SPA_STATUS_HAVE_BUFFER;
|
||||
io->status = SPA_STATUS_HAVE_DATA;
|
||||
|
||||
/* Add the buffer to the free list */
|
||||
spa_list_append(&port->free, &buffer->link);
|
||||
buffer->outstanding = false;
|
||||
|
||||
/* Notify we have a buffer ready to be processed */
|
||||
return SPA_STATUS_HAVE_BUFFER;
|
||||
return SPA_STATUS_HAVE_DATA;
|
||||
}
|
||||
|
||||
static const struct spa_node_methods impl_node = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue