mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -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
|
|
@ -613,7 +613,7 @@ static int impl_node_process(void *object)
|
|||
input->buffer_id,
|
||||
this->n_buffers);
|
||||
|
||||
if (input->status == SPA_STATUS_HAVE_BUFFER &&
|
||||
if (input->status == SPA_STATUS_HAVE_DATA &&
|
||||
input->buffer_id < this->n_buffers) {
|
||||
struct buffer *b = &this->buffers[input->buffer_id];
|
||||
|
||||
|
|
@ -632,7 +632,7 @@ static int impl_node_process(void *object)
|
|||
|
||||
input->status = SPA_STATUS_OK;
|
||||
}
|
||||
return SPA_STATUS_HAVE_BUFFER;
|
||||
return SPA_STATUS_HAVE_DATA;
|
||||
}
|
||||
|
||||
static const struct spa_node_methods impl_node = {
|
||||
|
|
|
|||
|
|
@ -635,8 +635,8 @@ static int impl_node_process(void *object)
|
|||
io = this->io;
|
||||
spa_return_val_if_fail(io != NULL, -EIO);
|
||||
|
||||
if (io->status == SPA_STATUS_HAVE_BUFFER)
|
||||
return SPA_STATUS_HAVE_BUFFER;
|
||||
if (io->status == SPA_STATUS_HAVE_DATA)
|
||||
return SPA_STATUS_HAVE_DATA;
|
||||
|
||||
if (io->buffer_id < this->n_buffers) {
|
||||
recycle_buffer(this, io->buffer_id);
|
||||
|
|
@ -655,9 +655,9 @@ static int impl_node_process(void *object)
|
|||
spa_log_trace_fp(this->log, NAME " %p: dequeue buffer %d", this, b->id);
|
||||
|
||||
io->buffer_id = b->id;
|
||||
io->status = SPA_STATUS_HAVE_BUFFER;
|
||||
io->status = SPA_STATUS_HAVE_DATA;
|
||||
|
||||
return SPA_STATUS_HAVE_BUFFER;
|
||||
return SPA_STATUS_HAVE_DATA;
|
||||
}
|
||||
|
||||
static const struct spa_node_methods impl_node = {
|
||||
|
|
|
|||
|
|
@ -987,9 +987,9 @@ static int handle_play(struct state *state, uint64_t nsec,
|
|||
|
||||
spa_log_trace_fp(state->log, "alsa-util %p: %d", state, io->status);
|
||||
|
||||
io->status = SPA_STATUS_NEED_BUFFER;
|
||||
io->status = SPA_STATUS_NEED_DATA;
|
||||
|
||||
res = spa_node_call_ready(&state->callbacks, SPA_STATUS_NEED_BUFFER);
|
||||
res = spa_node_call_ready(&state->callbacks, SPA_STATUS_NEED_DATA);
|
||||
}
|
||||
else {
|
||||
res = spa_alsa_write(state, 0);
|
||||
|
|
@ -1018,15 +1018,15 @@ static int handle_capture(struct state *state, uint64_t nsec,
|
|||
|
||||
if (!spa_list_is_empty(&state->ready)) {
|
||||
io = state->io;
|
||||
if (io != NULL && io->status != SPA_STATUS_HAVE_BUFFER) {
|
||||
if (io != NULL && io->status != SPA_STATUS_HAVE_DATA) {
|
||||
struct buffer *b = spa_list_first(&state->ready, struct buffer, link);
|
||||
spa_list_remove(&b->link);
|
||||
|
||||
io->buffer_id = b->id;
|
||||
io->status = SPA_STATUS_HAVE_BUFFER;
|
||||
io->status = SPA_STATUS_HAVE_DATA;
|
||||
}
|
||||
}
|
||||
spa_node_call_ready(&state->callbacks, SPA_STATUS_HAVE_BUFFER);
|
||||
spa_node_call_ready(&state->callbacks, SPA_STATUS_HAVE_DATA);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue