summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-09-16 12:55:23 +0200
committerWim Taymans <wtaymans@redhat.com>2019-09-16 12:55:23 +0200
commit8b85cc225e938b1314a800d4c4584d75daec1c9e (patch)
tree4a9b1d3f886ffb05d78f5abcd001d9cf3362c0fb
parentd648ea4ad367964361e45fc1e8532dde1d8c8f59 (diff)
rename HAVE/NEED_BUFFER -> HAVE/NEED_DATA
It is more generic and works with control-only ports as well
m---------pipewire-jack13
-rw-r--r--spa/examples/local-v4l2.c4
-rw-r--r--spa/include/spa/node/io.h4
-rw-r--r--spa/include/spa/node/node.h12
-rw-r--r--spa/plugins/alsa/alsa-sink.c4
-rw-r--r--spa/plugins/alsa/alsa-source.c8
-rw-r--r--spa/plugins/alsa/alsa-utils.c10
-rw-r--r--spa/plugins/audioconvert/audioconvert.c10
-rw-r--r--spa/plugins/audioconvert/channelmix.c12
-rw-r--r--spa/plugins/audioconvert/fmtconvert.c14
-rw-r--r--spa/plugins/audioconvert/merger.c14
-rw-r--r--spa/plugins/audioconvert/resample.c16
-rw-r--r--spa/plugins/audioconvert/splitter.c16
-rw-r--r--spa/plugins/audioconvert/test-source.c6
-rw-r--r--spa/plugins/audiomixer/audiomixer.c10
-rw-r--r--spa/plugins/audiotestsrc/audiotestsrc.c10
-rw-r--r--spa/plugins/bluez5/a2dp-sink.c8
-rw-r--r--spa/plugins/bluez5/a2dp-source.c14
-rw-r--r--spa/plugins/bluez5/sco-sink.c8
-rw-r--r--spa/plugins/bluez5/sco-source.c14
-rw-r--r--spa/plugins/jack/jack-sink.c8
-rw-r--r--spa/plugins/jack/jack-source.c6
-rw-r--r--spa/plugins/test/fakesink.c10
-rw-r--r--spa/plugins/test/fakesrc.c12
-rw-r--r--spa/plugins/v4l2/v4l2-source.c8
-rw-r--r--spa/plugins/v4l2/v4l2-utils.c6
-rw-r--r--spa/plugins/videoconvert/videoadapter.c2
-rw-r--r--spa/plugins/videotestsrc/videotestsrc.c10
-rw-r--r--spa/plugins/volume/volume.c14
-rw-r--r--spa/plugins/vulkan/vulkan-compute-source.c12
-rw-r--r--src/examples/export-sink.c8
-rw-r--r--src/examples/export-source.c4
-rw-r--r--src/examples/local-v4l2.c4
-rw-r--r--src/modules/module-adapter/floatmix.c10
-rw-r--r--src/modules/module-client-node/client-node.c6
-rw-r--r--src/modules/module-client-node/remote-node.c2
-rw-r--r--src/pipewire/link.c2
-rw-r--r--src/pipewire/node.c4
-rw-r--r--src/pipewire/port.c12
-rw-r--r--src/pipewire/stream.c16
40 files changed, 180 insertions, 183 deletions
diff --git a/pipewire-jack b/pipewire-jack
-Subproject 4bd1e9a9ff70bf50611e85d9244e70da04dfd13
+Subproject 1d2db89b9c80153f94ace12572f16678694fafc
diff --git a/spa/examples/local-v4l2.c b/spa/examples/local-v4l2.c
index aefdf31c..fd7cec9c 100644
--- a/spa/examples/local-v4l2.c
+++ b/spa/examples/local-v4l2.c
@@ -155,7 +155,7 @@ static int on_source_ready(void *_data, int status)
struct spa_data *datas;
struct spa_io_buffers *io = &data->source_output[0];
- if (io->status != SPA_STATUS_HAVE_BUFFER ||
+ if (io->status != SPA_STATUS_HAVE_DATA ||
io->buffer_id > MAX_BUFFERS)
return -EINVAL;
@@ -214,7 +214,7 @@ static int on_source_ready(void *_data, int status)
munmap(map, datas[0].maxsize + datas[0].mapoffset);
}
- io->status = SPA_STATUS_NEED_BUFFER;
+ io->status = SPA_STATUS_NEED_DATA;
if ((res = spa_node_process(data->source)) < 0)
printf("got process error %d\n", res);
diff --git a/spa/include/spa/node/io.h b/spa/include/spa/node/io.h
index d4694adf..aee57c79 100644
--- a/spa/include/spa/node/io.h
+++ b/spa/include/spa/node/io.h
@@ -54,8 +54,8 @@ enum spa_io_type {
struct spa_io_buffers {
#define SPA_STATUS_OK 0
-#define SPA_STATUS_NEED_BUFFER (1<<0)
-#define SPA_STATUS_HAVE_BUFFER (1<<1)
+#define SPA_STATUS_NEED_DATA (1<<0)
+#define SPA_STATUS_HAVE_DATA (1<<1)
#define SPA_STATUS_STOPPED (1<<2)
int32_t status; /**< the status code */
uint32_t buffer_id; /**< a buffer id */
diff --git a/spa/include/spa/node/node.h b/spa/include/spa/node/node.h
index f35c27bf..e1c55d68 100644
--- a/spa/include/spa/node/node.h
+++ b/spa/include/spa/node/node.h
@@ -536,7 +536,7 @@ struct spa_node_methods {
* the port.
*
* For output ports, all buffers will be queued in the port. When process
- * returns SPA_STATUS_HAVE_BUFFER, buffers are available in one or more
+ * returns SPA_STATUS_HAVE_DATA, buffers are available in one or more
* of the spa_io_buffers areas.
*
* When a buffer can be reused, port_reuse_buffer() should be called or the
@@ -608,17 +608,17 @@ struct spa_node_methods {
/**
* Process the node
*
- * Output io areas with SPA_STATUS_NEED_BUFFER will recycle the
+ * Output io areas with SPA_STATUS_NEED_DATA will recycle the
* buffers if any.
*
- * Input areas with SPA_STATUS_HAVE_BUFFER are consumed if possible
- * and the status is set to SPA_STATUS_NEED_BUFFER or SPA_STATUS_OK.
+ * Input areas with SPA_STATUS_HAVE_DATA are consumed if possible
+ * and the status is set to SPA_STATUS_NEED_DATA or SPA_STATUS_OK.
*
- * When the node has new output buffers, the SPA_STATUS_HAVE_BUFFER
+ * When the node has new output buffers, the SPA_STATUS_HAVE_DATA
* bit will be set.
*
* When the node can accept new input in the next cycle, the
- * SPA_STATUS_NEED_BUFFER bit will be set.
+ * SPA_STATUS_NEED_DATA bit will be set.
*/
int (*process) (void *object);
};
diff --git a/spa/plugins/alsa/alsa-sink.c b/spa/plugins/alsa/alsa-sink.c
index 417105d2..b34d30aa 100644
--- a/spa/plugins/alsa/alsa-sink.c
+++ b/spa/plugins/alsa/alsa-sink.c
@@ -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 = {
diff --git a/spa/plugins/alsa/alsa-source.c b/spa/plugins/alsa/alsa-source.c
index e1d2a11d..f81b819a 100644
--- a/spa/plugins/alsa/alsa-source.c
+++ b/spa/plugins/alsa/alsa-source.c
@@ -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 = {
diff --git a/spa/plugins/alsa/alsa-utils.c b/spa/plugins/alsa/alsa-utils.c
index a8aff258..01406ca6 100644
--- a/spa/plugins/alsa/alsa-utils.c
+++ b/spa/plugins/alsa/alsa-utils.c
@@ -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;
}
diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c
index 8d85a38a..edae5f82 100644
--- a/spa/plugins/audioconvert/audioconvert.c
+++ b/spa/plugins/audioconvert/audioconvert.c
@@ -138,7 +138,7 @@ static int make_link(struct impl *this,
l->in_port = in_port;
l->in_flags = 0;
l->negotiated = false;
- l->io.status = SPA_STATUS_NEED_BUFFER;
+ l->io.status = SPA_STATUS_NEED_DATA;
l->io.buffer_id = SPA_ID_INVALID;
l->n_buffers = 0;
l->min_buffers = min_buffers;
@@ -1082,15 +1082,15 @@ static int impl_node_process(void *object)
if (r < 0)
return r;
- if (r & SPA_STATUS_HAVE_BUFFER)
+ if (r & SPA_STATUS_HAVE_DATA)
ready++;
if (i == 0)
- res |= r & SPA_STATUS_NEED_BUFFER;
+ res |= r & SPA_STATUS_NEED_DATA;
if (i == this->n_nodes-1)
- res |= r & SPA_STATUS_HAVE_BUFFER;
+ res |= r & SPA_STATUS_HAVE_DATA;
}
- if (res & SPA_STATUS_HAVE_BUFFER)
+ if (res & SPA_STATUS_HAVE_DATA)
break;
if (ready == 0)
break;
diff --git a/spa/plugins/audioconvert/channelmix.c b/spa/plugins/audioconvert/channelmix.c
index 53c09f46..ec0daee0 100644
--- a/spa/plugins/audioconvert/channelmix.c
+++ b/spa/plugins/audioconvert/channelmix.c
@@ -887,11 +887,11 @@ static int impl_node_process(void *object)
if (outport->control)
process_control(this, outport, &outport->control->sequence);
- if (outio->status == SPA_STATUS_HAVE_BUFFER)
+ if (outio->status == SPA_STATUS_HAVE_DATA)
goto done;
- if (inio->status != SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_NEED_BUFFER;
+ if (inio->status != SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_NEED_DATA;
/* recycle */
if (outio->buffer_id < outport->n_buffers) {
@@ -933,13 +933,13 @@ static int impl_node_process(void *object)
n_src_datas, src_datas, n_samples);
}
- outio->status = SPA_STATUS_HAVE_BUFFER;
+ outio->status = SPA_STATUS_HAVE_DATA;
outio->buffer_id = dbuf->id;
- inio->status = SPA_STATUS_NEED_BUFFER;
+ inio->status = SPA_STATUS_NEED_DATA;
done:
- return SPA_STATUS_HAVE_BUFFER | SPA_STATUS_NEED_BUFFER;
+ return SPA_STATUS_HAVE_DATA | SPA_STATUS_NEED_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/spa/plugins/audioconvert/fmtconvert.c b/spa/plugins/audioconvert/fmtconvert.c
index 22b01f8f..d9a40a88 100644
--- a/spa/plugins/audioconvert/fmtconvert.c
+++ b/spa/plugins/audioconvert/fmtconvert.c
@@ -814,15 +814,15 @@ static int impl_node_process(void *object)
inio, inio->status, inio->buffer_id,
outio, outio->status, outio->buffer_id);
- if (outio->status == SPA_STATUS_HAVE_BUFFER)
+ if (outio->status == SPA_STATUS_HAVE_DATA)
return inio->status | outio->status;
if (outio->buffer_id < outport->n_buffers) {
recycle_buffer(this, outport, outio->buffer_id);
outio->buffer_id = SPA_ID_INVALID;
}
- if (inio->status != SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_NEED_BUFFER;
+ if (inio->status != SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_NEED_DATA;
if (inio->buffer_id >= inport->n_buffers)
return inio->status = -EINVAL;
@@ -867,12 +867,12 @@ static int impl_node_process(void *object)
if (!this->is_passthrough)
convert_process(&this->conv, dst_datas, src_datas, n_samples);
- inio->status = SPA_STATUS_NEED_BUFFER;
- res |= SPA_STATUS_NEED_BUFFER;
+ inio->status = SPA_STATUS_NEED_DATA;
+ res |= SPA_STATUS_NEED_DATA;
- outio->status = SPA_STATUS_HAVE_BUFFER;
+ outio->status = SPA_STATUS_HAVE_DATA;
outio->buffer_id = outbuf->id;
- res |= SPA_STATUS_HAVE_BUFFER;
+ res |= SPA_STATUS_HAVE_DATA;
return res;
}
diff --git a/spa/plugins/audioconvert/merger.c b/spa/plugins/audioconvert/merger.c
index 0d83a12f..2aa85ee2 100644
--- a/spa/plugins/audioconvert/merger.c
+++ b/spa/plugins/audioconvert/merger.c
@@ -865,7 +865,7 @@ static inline int get_in_buffer(struct impl *this, struct port *port, struct buf
this, port->id);
return -EIO;
}
- if (io->status != SPA_STATUS_HAVE_BUFFER ||
+ if (io->status != SPA_STATUS_HAVE_DATA ||
io->buffer_id >= port->n_buffers) {
spa_log_trace_fp(this->log, NAME " %p: empty port %d %p %d %d %d",
this, port->id, io, io->status, io->buffer_id,
@@ -874,7 +874,7 @@ static inline int get_in_buffer(struct impl *this, struct port *port, struct buf
}
*buf = &port->buffers[io->buffer_id];
- io->status = SPA_STATUS_NEED_BUFFER;
+ io->status = SPA_STATUS_NEED_DATA;
return 0;
}
@@ -884,8 +884,8 @@ static inline int get_out_buffer(struct impl *this, struct port *port, struct bu
struct spa_io_buffers *io;
if ((io = port->io) == NULL ||
- io->status == SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_HAVE_BUFFER;
+ io->status == SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_HAVE_DATA;
if (io->buffer_id < port->n_buffers)
queue_buffer(this, port, io->buffer_id);
@@ -893,7 +893,7 @@ static inline int get_out_buffer(struct impl *this, struct port *port, struct bu
if ((*buf = dequeue_buffer(this, port)) == NULL)
return -EPIPE;
- io->status = SPA_STATUS_HAVE_BUFFER;
+ io->status = SPA_STATUS_HAVE_DATA;
io->buffer_id = (*buf)->id;
return 0;
@@ -978,7 +978,7 @@ static int impl_node_process(void *object)
spa_log_trace_fp(this->log, NAME " %p: %d %d %d %p", this,
sd->chunk->size, maxsize, n_samples, src_datas[i]);
- SPA_FLAG_SET(res, SPA_STATUS_NEED_BUFFER);
+ SPA_FLAG_SET(res, SPA_STATUS_NEED_DATA);
}
for (i = 0; i < this->monitor_count; i++)
@@ -995,7 +995,7 @@ static int impl_node_process(void *object)
if (!this->is_passthrough)
convert_process(&this->conv, dst_datas, src_datas, n_samples);
- return res | SPA_STATUS_HAVE_BUFFER;
+ return res | SPA_STATUS_HAVE_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/spa/plugins/audioconvert/resample.c b/spa/plugins/audioconvert/resample.c
index 217f2fb6..b7513ff4 100644
--- a/spa/plugins/audioconvert/resample.c
+++ b/spa/plugins/audioconvert/resample.c
@@ -723,11 +723,11 @@ static int impl_node_process(void *object)
spa_log_trace_fp(this->log, NAME " %p: status %d %d %d",
this, inio->status, outio->status, inio->buffer_id);
- if (outio->status == SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_HAVE_BUFFER;
+ if (outio->status == SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_HAVE_DATA;
- if (inio->status != SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_NEED_BUFFER;
+ if (inio->status != SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_NEED_DATA;
/* recycle */
if (outio->buffer_id < outport->n_buffers) {
@@ -794,19 +794,19 @@ static int impl_node_process(void *object)
inport->offset += in_len * sizeof(float);
if (inport->offset >= size || flush_in) {
- inio->status = SPA_STATUS_NEED_BUFFER;
+ inio->status = SPA_STATUS_NEED_DATA;
inport->offset = 0;
- SPA_FLAG_SET(res, SPA_STATUS_NEED_BUFFER);
+ SPA_FLAG_SET(res, SPA_STATUS_NEED_DATA);
spa_log_trace_fp(this->log, NAME " %p: return input buffer", this);
}
outport->offset += out_len * sizeof(float);
if (outport->offset > 0 && (outport->offset >= maxsize || flush_out)) {
- outio->status = SPA_STATUS_HAVE_BUFFER;
+ outio->status = SPA_STATUS_HAVE_DATA;
outio->buffer_id = dbuf->id;
dequeue_buffer(this, dbuf);
outport->offset = 0;
- SPA_FLAG_SET(res, SPA_STATUS_HAVE_BUFFER);
+ SPA_FLAG_SET(res, SPA_STATUS_HAVE_DATA);
spa_log_trace_fp(this->log, NAME " %p: have output buffer", this);
}
diff --git a/spa/plugins/audioconvert/splitter.c b/spa/plugins/audioconvert/splitter.c
index f4c5380a..2c848b88 100644
--- a/spa/plugins/audioconvert/splitter.c
+++ b/spa/plugins/audioconvert/splitter.c
@@ -833,8 +833,8 @@ static int impl_node_process(void *object)
spa_log_trace_fp(this->log, NAME " %p: status %p %d %d", this,
inio, inio->status, inio->buffer_id);
- if (inio->status != SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_NEED_BUFFER;
+ if (inio->status != SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_NEED_DATA;
if (inio->buffer_id >= inport->n_buffers)
return inio->status = -EINVAL;
@@ -865,8 +865,8 @@ static int impl_node_process(void *object)
spa_log_trace_fp(this->log, NAME " %p: %d %p %d %d %d", this, i,
outio, outio->status, outio->buffer_id, outport->stride);
- if (outio->status == SPA_STATUS_HAVE_BUFFER) {
- res |= SPA_STATUS_HAVE_BUFFER;
+ if (outio->status == SPA_STATUS_HAVE_DATA) {
+ res |= SPA_STATUS_HAVE_DATA;
goto empty;
}
@@ -897,9 +897,9 @@ static int impl_node_process(void *object)
dd[j].chunk->size = n_samples * outport->stride;
}
- outio->status = SPA_STATUS_HAVE_BUFFER;
+ outio->status = SPA_STATUS_HAVE_DATA;
outio->buffer_id = dbuf->id;
- res |= SPA_STATUS_HAVE_BUFFER;
+ res |= SPA_STATUS_HAVE_DATA;
}
while (n_dst_datas < this->port_count) {
spa_log_trace_fp(this->log, NAME" %p: %d fill output", this, n_dst_datas);
@@ -913,8 +913,8 @@ static int impl_node_process(void *object)
if (!this->is_passthrough)
convert_process(&this->conv, dst_datas, src_datas, n_samples);
- inio->status = SPA_STATUS_NEED_BUFFER;
- res |= SPA_STATUS_NEED_BUFFER;
+ inio->status = SPA_STATUS_NEED_DATA;
+ res |= SPA_STATUS_NEED_DATA;
return res;
}
diff --git a/spa/plugins/audioconvert/test-source.c b/spa/plugins/audioconvert/test-source.c
index 05e00dd1..745e1fa4 100644
--- a/spa/plugins/audioconvert/test-source.c
+++ b/spa/plugins/audioconvert/test-source.c
@@ -753,7 +753,7 @@ static int impl_node_process(void *object)
spa_log_trace_fp(this->log, NAME " %p: status %d", this, io->status);
- if (io->status == SPA_STATUS_HAVE_BUFFER)
+ if (io->status == SPA_STATUS_HAVE_DATA)
goto done;
/* recycle */
@@ -765,11 +765,11 @@ static int impl_node_process(void *object)
if ((buf = dequeue_buffer(this, port)) == NULL)
return io->status = -EPIPE;
- io->status = SPA_STATUS_HAVE_BUFFER;
+ io->status = SPA_STATUS_HAVE_DATA;
io->buffer_id = buf->id;
done:
- return SPA_STATUS_HAVE_BUFFER;
+ return SPA_STATUS_HAVE_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/spa/plugins/audiomixer/audiomixer.c b/spa/plugins/audiomixer/audiomixer.c
index 27708497..f99ef4b8 100644
--- a/spa/plugins/audiomixer/audiomixer.c
+++ b/spa/plugins/audiomixer/audiomixer.c
@@ -768,9 +768,9 @@ static int mix_output(struct impl *this, size_t n_bytes)
od[0].chunk->stride = 0;
outio->buffer_id = outbuf->id;
- outio->status = SPA_STATUS_HAVE_BUFFER;
+ outio->status = SPA_STATUS_HAVE_DATA;
- return SPA_STATUS_HAVE_BUFFER;
+ return SPA_STATUS_HAVE_DATA;
}
static int impl_node_process(void *object)
@@ -789,7 +789,7 @@ static int impl_node_process(void *object)
spa_log_trace(this->log, NAME " %p: status %d", this, outio->status);
- if (outio->status == SPA_STATUS_HAVE_BUFFER)
+ if (outio->status == SPA_STATUS_HAVE_DATA)
goto done;
/* recycle */
@@ -823,10 +823,10 @@ static int impl_node_process(void *object)
i, inport->queued_bytes, inio->status);
if (inport->queued_bytes == 0) {
- inio->status = SPA_STATUS_NEED_BUFFER;
+ inio->status = SPA_STATUS_NEED_DATA;
}
}
- outio->status = SPA_STATUS_NEED_BUFFER;
+ outio->status = SPA_STATUS_NEED_DATA;
}
done:
return outio->status;
diff --git a/spa/plugins/audiotestsrc/audiotestsrc.c b/spa/plugins/audiotestsrc/audiotestsrc.c
index 2b21a7c7..b1f1ebc3 100644
--- a/spa/plugins/audiotestsrc/audiotestsrc.c
+++ b/spa/plugins/audiotestsrc/audiotestsrc.c
@@ -373,7 +373,7 @@ static int make_buffer(struct impl *this)
set_timer(this, true);
io->buffer_id = b->id;
- io->status = SPA_STATUS_HAVE_BUFFER;
+ io->status = SPA_STATUS_HAVE_DATA;
return io->status;
}
@@ -385,7 +385,7 @@ static void on_output(struct spa_source *source)
res = make_buffer(this);
- if (res == SPA_STATUS_HAVE_BUFFER)
+ if (res == SPA_STATUS_HAVE_DATA)
spa_node_call_ready(&this->callbacks, res);
}
@@ -891,15 +891,15 @@ static int impl_node_process(void *object)
if (port->io_control)
process_control(this, &port->io_control->sequence);
- 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 < port->n_buffers) {
reuse_buffer(this, port, io->buffer_id);
io->buffer_id = SPA_ID_INVALID;
}
- if (!this->props.live && (io->status == SPA_STATUS_NEED_BUFFER))
+ if (!this->props.live && (io->status == SPA_STATUS_NEED_DATA))
return make_buffer(this);
else
return SPA_STATUS_OK;
diff --git a/spa/plugins/bluez5/a2dp-sink.c b/spa/plugins/bluez5/a2dp-sink.c
index 1dd60ef2..ba2092b0 100644
--- a/spa/plugins/bluez5/a2dp-sink.c
+++ b/spa/plugins/bluez5/a2dp-sink.c
@@ -699,9 +699,9 @@ static void a2dp_on_timeout(struct spa_source *source)
if (spa_list_is_empty(&port->ready) || port->need_data) {
spa_log_trace(this->log, NAME " %p: %d", this, io->status);
- io->status = SPA_STATUS_NEED_BUFFER;
+ io->status = SPA_STATUS_NEED_DATA;
- spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_BUFFER);
+ spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_DATA);
}
flush_data(this, now_time);
}
@@ -1304,7 +1304,7 @@ static int impl_node_process(void *object)
if (!spa_list_is_empty(&port->ready))
flush_data(this, now_time);
- if (io->status == SPA_STATUS_HAVE_BUFFER && io->buffer_id < port->n_buffers) {
+ if (io->status == SPA_STATUS_HAVE_DATA && io->buffer_id < port->n_buffers) {
struct buffer *b = &port->buffers[io->buffer_id];
if (!b->outstanding) {
@@ -1326,7 +1326,7 @@ static int impl_node_process(void *object)
io->status = SPA_STATUS_OK;
}
- return SPA_STATUS_HAVE_BUFFER;
+ return SPA_STATUS_HAVE_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/spa/plugins/bluez5/a2dp-source.c b/spa/plugins/bluez5/a2dp-source.c
index 9b3fa2ee..ec064648 100644
--- a/spa/plugins/bluez5/a2dp-source.c
+++ b/spa/plugins/bluez5/a2dp-source.c
@@ -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 = {
diff --git a/spa/plugins/bluez5/sco-sink.c b/spa/plugins/bluez5/sco-sink.c
index 8d97ebca..46e9591d 100644
--- a/spa/plugins/bluez5/sco-sink.c
+++ b/spa/plugins/bluez5/sco-sink.c
@@ -483,8 +483,8 @@ static void sco_on_timeout(struct spa_source *source)
/* Notify we need a new buffer if we have processed all of them */
if (spa_list_is_empty(&port->ready) || port->need_data) {
- io->status = SPA_STATUS_NEED_BUFFER;
- spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_BUFFER);
+ io->status = SPA_STATUS_NEED_DATA;
+ spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_DATA);
}
/* Render the buffers */
@@ -994,7 +994,7 @@ static int impl_node_process(void *object)
if (!spa_list_is_empty(&port->ready))
render_buffers(this, now_time);
- if (io->status == SPA_STATUS_HAVE_BUFFER && io->buffer_id < port->n_buffers) {
+ if (io->status == SPA_STATUS_HAVE_DATA && io->buffer_id < port->n_buffers) {
struct buffer *b = &port->buffers[io->buffer_id];
if (!b->outstanding) {
@@ -1017,7 +1017,7 @@ static int impl_node_process(void *object)
io->status = SPA_STATUS_OK;
}
- return SPA_STATUS_HAVE_BUFFER;
+ return SPA_STATUS_HAVE_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/spa/plugins/bluez5/sco-source.c b/spa/plugins/bluez5/sco-source.c
index 245aacd8..1eb194cb 100644
--- a/spa/plugins/bluez5/sco-source.c
+++ b/spa/plugins/bluez5/sco-source.c
@@ -379,21 +379,21 @@ static void sco_on_ready_read(struct spa_source *source)
}
/* 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;
}
/* Notify the current status */
@@ -903,8 +903,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))
@@ -916,14 +916,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 = {
diff --git a/spa/plugins/jack/jack-sink.c b/spa/plugins/jack/jack-sink.c
index db9e67b9..2a0d7047 100644
--- a/spa/plugins/jack/jack-sink.c
+++ b/spa/plugins/jack/jack-sink.c
@@ -353,7 +353,7 @@ static void client_process(void *data)
s->bar.beat = jp->bar * jp->beats_per_bar + jp->beat;
}
}
- spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_BUFFER);
+ spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_DATA);
}
static const struct spa_jack_client_events client_events = {
@@ -730,7 +730,7 @@ static int impl_node_process(void *object)
dst = jack_port_get_buffer(port->jack_port, n_frames);
if (io == NULL ||
- io->status != SPA_STATUS_HAVE_BUFFER ||
+ io->status != SPA_STATUS_HAVE_DATA ||
io->buffer_id >= port->n_buffers) {
memset(dst, 0, n_frames * sizeof(float));
continue;
@@ -742,9 +742,9 @@ static int impl_node_process(void *object)
memcpy(dst, src->data, n_frames * port->stride);
- io->status = SPA_STATUS_NEED_BUFFER;
+ io->status = SPA_STATUS_NEED_DATA;
- res |= SPA_STATUS_NEED_BUFFER;
+ res |= SPA_STATUS_NEED_DATA;
}
return res;
}
diff --git a/spa/plugins/jack/jack-source.c b/spa/plugins/jack/jack-source.c
index 0714e395..78d1253c 100644
--- a/spa/plugins/jack/jack-source.c
+++ b/spa/plugins/jack/jack-source.c
@@ -741,7 +741,7 @@ static int impl_node_process(void *object)
const void *src;
uint32_t n_frames = this->client->buffer_size;
- if (io == NULL || io->status == SPA_STATUS_HAVE_BUFFER)
+ if (io == NULL || io->status == SPA_STATUS_HAVE_DATA)
continue;
if (io->buffer_id < port->n_buffers) {
@@ -765,9 +765,9 @@ static int impl_node_process(void *object)
d->chunk->flags = 0;
io->buffer_id = b->id;
- io->status = SPA_STATUS_HAVE_BUFFER;
+ io->status = SPA_STATUS_HAVE_DATA;
- res |= SPA_STATUS_HAVE_BUFFER;
+ res |= SPA_STATUS_HAVE_DATA;
}
return res;
}
diff --git a/spa/plugins/test/fakesink.c b/spa/plugins/test/fakesink.c
index 20c02439..d08c01ca 100644
--- a/spa/plugins/test/fakesink.c
+++ b/spa/plugins/test/fakesink.c
@@ -232,8 +232,8 @@ static int consume_buffer(struct impl *this)
read_timer(this);
if (spa_list_is_empty(&port->ready)) {
- io->status = SPA_STATUS_NEED_BUFFER;
- spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_BUFFER);
+ io->status = SPA_STATUS_NEED_DATA;
+ spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_DATA);
}
if (spa_list_is_empty(&port->ready)) {
spa_log_error(this->log, NAME " %p: no buffers", this);
@@ -264,10 +264,10 @@ static int consume_buffer(struct impl *this)
set_timer(this, true);
io->buffer_id = b->id;
- io->status = SPA_STATUS_NEED_BUFFER;
+ io->status = SPA_STATUS_NEED_DATA;
b->outstanding = true;
- return SPA_STATUS_NEED_BUFFER;
+ return SPA_STATUS_NEED_DATA;
}
static void on_input(struct spa_source *source)
@@ -636,7 +636,7 @@ static int impl_node_process(void *object)
io = port->io;
spa_return_val_if_fail(io != NULL, -EIO);
- if (io->status == SPA_STATUS_HAVE_BUFFER && io->buffer_id < port->n_buffers) {
+ if (io->status == SPA_STATUS_HAVE_DATA && io->buffer_id < port->n_buffers) {
struct buffer *b = &port->buffers[io->buffer_id];
if (!b->outstanding) {
diff --git a/spa/plugins/test/fakesrc.c b/spa/plugins/test/fakesrc.c
index 0b4ae895..df8edc70 100644
--- a/spa/plugins/test/fakesrc.c
+++ b/spa/plugins/test/fakesrc.c
@@ -276,9 +276,9 @@ static int make_buffer(struct impl *this)
set_timer(this, true);
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 void on_output(struct spa_source *source)
@@ -288,7 +288,7 @@ static void on_output(struct spa_source *source)
res = make_buffer(this);
- if (res == SPA_STATUS_HAVE_BUFFER && this->callbacks.funcs)
+ if (res == SPA_STATUS_HAVE_DATA && this->callbacks.funcs)
spa_node_call_ready(&this->callbacks, res);
}
@@ -679,8 +679,8 @@ static int impl_node_process(void *object)
io = port->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 < port->n_buffers) {
reuse_buffer(this, port, io->buffer_id);
@@ -688,7 +688,7 @@ static int impl_node_process(void *object)
}
if (this->callbacks.funcs == NULL &&
- (io->status == SPA_STATUS_NEED_BUFFER))
+ (io->status == SPA_STATUS_NEED_DATA))
return make_buffer(this);
else
return SPA_STATUS_OK;
diff --git a/spa/plugins/v4l2/v4l2-source.c b/spa/plugins/v4l2/v4l2-source.c
index e2a884fd..a957873a 100644
--- a/spa/plugins/v4l2/v4l2-source.c
+++ b/spa/plugins/v4l2/v4l2-source.c
@@ -842,8 +842,8 @@ static int impl_node_process(void *object)
spa_log_trace(this->log, NAME " %p; status %d", this, io->status);
- 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 < port->n_buffers) {
if ((res = spa_v4l2_buffer_recycle(this, io->buffer_id)) < 0)
@@ -861,9 +861,9 @@ static int impl_node_process(void *object)
spa_log_trace(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 = {
diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c
index 41976d94..fbb31280 100644
--- a/spa/plugins/v4l2/v4l2-utils.c
+++ b/spa/plugins/v4l2/v4l2-utils.c
@@ -1214,16 +1214,16 @@ static int mmap_read(struct impl *this)
SPA_FLAG_SET(b->flags, BUFFER_FLAG_OUTSTANDING);
io = port->io;
- if (io != NULL && io->status != SPA_STATUS_HAVE_BUFFER) {
+ if (io != NULL && io->status != SPA_STATUS_HAVE_DATA) {
io->buffer_id = b->id;
- io->status = SPA_STATUS_HAVE_BUFFER;
+ io->status = SPA_STATUS_HAVE_DATA;
}
else {
spa_list_append(&port->queue, &b->link);
}
spa_log_trace(this->log, "v4l2 %p: now queued %d", this, b->id);
- spa_node_call_ready(&this->callbacks, SPA_STATUS_HAVE_BUFFER);
+ spa_node_call_ready(&this->callbacks, SPA_STATUS_HAVE_DATA);
return 0;
}
diff --git a/spa/plugins/videoconvert/videoadapter.c b/spa/plugins/videoconvert/videoadapter.c
index b73c7907..71a25138 100644
--- a/spa/plugins/videoconvert/videoadapter.c
+++ b/spa/plugins/videoconvert/videoadapter.c
@@ -770,7 +770,7 @@ static int impl_node_process(void *object)
status = spa_node_process(this->slave);
if (this->monitor)
- status |= SPA_STATUS_HAVE_BUFFER;
+ status |= SPA_STATUS_HAVE_DATA;
if (this->direction == SPA_DIRECTION_OUTPUT && !this->master) {
if (this->use_converter)
diff --git a/spa/plugins/videotestsrc/videotestsrc.c b/spa/plugins/videotestsrc/videotestsrc.c
index 3c90a509..b384eba0 100644
--- a/spa/plugins/videotestsrc/videotestsrc.c
+++ b/spa/plugins/videotestsrc/videotestsrc.c
@@ -324,7 +324,7 @@ static int make_buffer(struct impl *this)
set_timer(this, true);
io->buffer_id = b->id;
- io->status = SPA_STATUS_HAVE_BUFFER;
+ io->status = SPA_STATUS_HAVE_DATA;
return io->status;
}
@@ -336,7 +336,7 @@ static void on_output(struct spa_source *source)
res = make_buffer(this);
- if (res == SPA_STATUS_HAVE_BUFFER)
+ if (res == SPA_STATUS_HAVE_DATA)
spa_node_call_ready(&this->callbacks, res);
}
@@ -776,15 +776,15 @@ static int impl_node_process(void *object)
io = port->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 < port->n_buffers) {
reuse_buffer(this, port, io->buffer_id);
io->buffer_id = SPA_ID_INVALID;
}
- if (!this->props.live && (io->status == SPA_STATUS_NEED_BUFFER))
+ if (!this->props.live && (io->status == SPA_STATUS_NEED_DATA))
return make_buffer(this);
else
return SPA_STATUS_OK;
diff --git a/spa/plugins/volume/volume.c b/spa/plugins/volume/volume.c
index 3ca4921f..7f583f4a 100644
--- a/spa/plugins/volume/volume.c
+++ b/spa/plugins/volume/volume.c
@@ -680,8 +680,8 @@ static int impl_node_process(void *object)
output = out_port->io;
spa_return_val_if_fail(output != NULL, -EIO);
- if (output->status == SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_HAVE_BUFFER;
+ if (output->status == SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_HAVE_DATA;
/* recycle */
if (output->buffer_id < out_port->n_buffers) {
@@ -693,8 +693,8 @@ static int impl_node_process(void *object)
input = in_port->io;
spa_return_val_if_fail(input != NULL, -EIO);
- if (input->status != SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_NEED_BUFFER;
+ if (input->status != SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_NEED_DATA;
if (input->buffer_id >= in_port->n_buffers) {
input->status = -EINVAL;
@@ -712,11 +712,11 @@ static int impl_node_process(void *object)
do_volume(this, dbuf->outbuf, sbuf->outbuf);
output->buffer_id = dbuf->id;
- output->status = SPA_STATUS_HAVE_BUFFER;
+ output->status = SPA_STATUS_HAVE_DATA;
- input->status = SPA_STATUS_NEED_BUFFER;
+ input->status = SPA_STATUS_NEED_DATA;
- return SPA_STATUS_HAVE_BUFFER;
+ return SPA_STATUS_HAVE_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/spa/plugins/vulkan/vulkan-compute-source.c b/spa/plugins/vulkan/vulkan-compute-source.c
index 65c27cd4..29388dd5 100644
--- a/spa/plugins/vulkan/vulkan-compute-source.c
+++ b/spa/plugins/vulkan/vulkan-compute-source.c
@@ -308,7 +308,7 @@ static int make_buffer(struct impl *this)
SPA_FLAG_SET(b->flags, BUFFER_FLAG_OUT);
spa_list_append(&port->ready, &b->link);
- res = SPA_STATUS_HAVE_BUFFER;
+ res = SPA_STATUS_HAVE_DATA;
}
next:
this->frame_count++;
@@ -343,7 +343,7 @@ static void on_output(struct spa_source *source)
if (io == NULL)
return;
- if (io->status == SPA_STATUS_HAVE_BUFFER)
+ if (io->status == SPA_STATUS_HAVE_DATA)
return;
if (io->buffer_id < port->n_buffers) {
@@ -358,7 +358,7 @@ static void on_output(struct spa_source *source)
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(&this->callbacks, res);
}
@@ -789,15 +789,15 @@ static int impl_node_process(void *object)
io = port->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 < port->n_buffers) {
reuse_buffer(this, port, io->buffer_id);
io->buffer_id = SPA_ID_INVALID;
}
- if (!this->props.live && (io->status == SPA_STATUS_NEED_BUFFER))
+ if (!this->props.live && (io->status == SPA_STATUS_NEED_DATA))
return make_buffer(this);
else
return SPA_STATUS_OK;
diff --git a/src/examples/export-sink.c b/src/examples/export-sink.c
index d4760b76..167d0a8f 100644
--- a/src/examples/export-sink.c
+++ b/src/examples/export-sink.c
@@ -428,11 +428,11 @@ static int impl_node_process(void *object)
struct spa_buffer *buf;
int res;
- if (d->io->status != SPA_STATUS_HAVE_BUFFER)
- return SPA_STATUS_NEED_BUFFER;
+ if (d->io->status != SPA_STATUS_HAVE_DATA)
+ return SPA_STATUS_NEED_DATA;
if (d->io->buffer_id >= d->n_buffers)
- return SPA_STATUS_NEED_BUFFER;
+ return SPA_STATUS_NEED_DATA;
buf = d->buffers[d->io->buffer_id];
@@ -443,7 +443,7 @@ static int impl_node_process(void *object)
update_param(d);
- return d->io->status = SPA_STATUS_NEED_BUFFER;
+ return d->io->status = SPA_STATUS_NEED_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/src/examples/export-source.c b/src/examples/export-source.c
index 6c7269c4..99a1b86f 100644
--- a/src/examples/export-source.c
+++ b/src/examples/export-source.c
@@ -442,11 +442,11 @@ static int impl_node_process(void *object)
od[0].chunk->stride = 0;
io->buffer_id = b->id;
- io->status = SPA_STATUS_HAVE_BUFFER;
+ io->status = SPA_STATUS_HAVE_DATA;
update_volume(d);
- return SPA_STATUS_HAVE_BUFFER;
+ return SPA_STATUS_HAVE_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/src/examples/local-v4l2.c b/src/examples/local-v4l2.c
index 4a8dac5c..3c5d50b5 100644
--- a/src/examples/local-v4l2.c
+++ b/src/examples/local-v4l2.c
@@ -316,9 +316,9 @@ static int impl_node_process(void *object)
handle_events(d);
- d->io->status = SPA_STATUS_NEED_BUFFER;
+ d->io->status = SPA_STATUS_NEED_DATA;
- return SPA_STATUS_NEED_BUFFER;
+ return SPA_STATUS_NEED_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/src/modules/module-adapter/floatmix.c b/src/modules/module-adapter/floatmix.c
index 3f999663..33fb72e1 100644
--- a/src/modules/module-adapter/floatmix.c
+++ b/src/modules/module-adapter/floatmix.c
@@ -707,7 +707,7 @@ static int impl_node_process(void *object)
spa_log_trace_fp(this->log, NAME " %p: status %p %d %d",
this, outio, outio->status, outio->buffer_id);
- if (outio->status == SPA_STATUS_HAVE_BUFFER)
+ if (outio->status == SPA_STATUS_HAVE_DATA)
return outio->status;
/* recycle */
@@ -729,7 +729,7 @@ static int impl_node_process(void *object)
if (!inport->valid ||
(inio = inport->io) == NULL ||
inio->buffer_id >= inport->n_buffers ||
- inio->status != SPA_STATUS_HAVE_BUFFER) {
+ inio->status != SPA_STATUS_HAVE_DATA) {
spa_log_trace_fp(this->log, NAME " %p: skip input %d %d %p %d %d %d", this,
i, inport->valid, inio,
inio ? inio->status : -1,
@@ -746,7 +746,7 @@ static int impl_node_process(void *object)
maxsize = SPA_MIN(inb->buffer->datas[0].chunk->size, maxsize);
buffers[n_buffers++] = inb;
- inio->status = SPA_STATUS_NEED_BUFFER;
+ inio->status = SPA_STATUS_NEED_DATA;
}
outb = dequeue_buffer(this, outport);
@@ -786,9 +786,9 @@ static int impl_node_process(void *object)
}
outio->buffer_id = outb->id;
- outio->status = SPA_STATUS_HAVE_BUFFER;
+ outio->status = SPA_STATUS_HAVE_DATA;
- return SPA_STATUS_HAVE_BUFFER | SPA_STATUS_NEED_BUFFER;
+ return SPA_STATUS_HAVE_DATA | SPA_STATUS_NEED_DATA;
}
static const struct spa_node_methods impl_node = {
diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c
index f8017c04..c475c41b 100644
--- a/src/modules/module-client-node/client-node.c
+++ b/src/modules/module-client-node/client-node.c
@@ -1074,7 +1074,7 @@ static void node_on_data_fd_events(struct spa_source *source)
spa_log_warn(this->log, NAME" %p: read %"PRIu64" failed %m", this, cmd);
spa_log_trace_fp(this->log, NAME" %p: got ready", this);
- spa_node_call_ready(&this->callbacks, SPA_STATUS_HAVE_BUFFER);
+ spa_node_call_ready(&this->callbacks, SPA_STATUS_HAVE_DATA);
}
}
@@ -1325,7 +1325,7 @@ static int port_init_mix(void *data, struct pw_port_mix *mix)
mix->io = SPA_MEMBER(impl->io_areas->map->ptr,
mix->id * sizeof(struct spa_io_buffers), void);
mix->io->buffer_id = SPA_ID_INVALID;
- mix->io->status = SPA_STATUS_NEED_BUFFER;
+ mix->io->status = SPA_STATUS_NEED_DATA;
pw_log_debug(NAME " %p: init mix io %d %p %p", impl, mix->id, mix->io,
impl->io_areas->map->ptr);
@@ -1453,7 +1453,7 @@ impl_mix_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
static int impl_mix_process(void *object)
{
- return SPA_STATUS_HAVE_BUFFER;
+ return SPA_STATUS_HAVE_DATA;
}
static const struct spa_node_methods impl_port_mix = {
diff --git a/src/modules/module-client-node/remote-node.c b/src/modules/module-client-node/remote-node.c
index cbaa6c7e..eb59b982 100644
--- a/src/modules/module-client-node/remote-node.c
+++ b/src/modules/module-client-node/remote-node.c
@@ -1044,7 +1044,7 @@ static int node_ready(void *d, int status)
pw_log_trace("node %p: ready driver:%d exported:%d status:%d", node,
node->driver, node->exported, status);
- if (status == SPA_STATUS_HAVE_BUFFER) {
+ if (status == SPA_STATUS_HAVE_DATA) {
spa_list_for_each(p, &node->rt.output_mix, rt.node_link)
spa_node_process(p->mix);
}
diff --git a/src/pipewire/link.c b/src/pipewire/link.c
index 3291061b..c4aeb79b 100644
--- a/src/pipewire/link.c
+++ b/src/pipewire/link.c
@@ -1325,7 +1325,7 @@ struct pw_link *pw_link_new(struct pw_core *core,
this->info.props = &this->properties->dict;
impl->io.buffer_id = SPA_ID_INVALID;
- impl->io.status = SPA_STATUS_NEED_BUFFER;
+ impl->io.status = SPA_STATUS_NEED_DATA;
pw_port_init_mix(output, &this->rt.out_mix);
pw_port_init_mix(input, &this->rt.in_mix);
diff --git a/src/pipewire/node.c b/src/pipewire/node.c
index 424112af..8b01164e 100644
--- a/src/pipewire/node.c
+++ b/src/pipewire/node.c
@@ -844,7 +844,7 @@ static inline int process_node(void *data)
status = spa_node_process(this->node);
a->state[0].status = status;
- if (status & SPA_STATUS_HAVE_BUFFER) {
+ if (status & SPA_STATUS_HAVE_DATA) {
spa_list_for_each(p, &this->rt.output_mix, rt.node_link)
spa_node_process(p->mix);
}
@@ -1351,7 +1351,7 @@ static int node_ready(void *data, int status)
if (node->driver && !node->master)
return 0;
- if (status & SPA_STATUS_HAVE_BUFFER) {
+ if (status & SPA_STATUS_HAVE_DATA) {
spa_list_for_each(p, &node->rt.output_mix, rt.node_link)
spa_node_process(p->mix);
}
diff --git a/src/pipewire/port.c b/src/pipewire/port.c
index 8485a8e0..01037f91 100644
--- a/src/pipewire/port.c
+++ b/src/pipewire/port.c
@@ -126,9 +126,9 @@ static int tee_process(void *object)
mix->port.port_id, io, mix->io, mix->io->buffer_id);
*mix->io = *io;
}
- io->status = SPA_STATUS_NEED_BUFFER;
+ io->status = SPA_STATUS_NEED_DATA;
- return SPA_STATUS_HAVE_BUFFER | SPA_STATUS_NEED_BUFFER;
+ return SPA_STATUS_HAVE_DATA | SPA_STATUS_NEED_DATA;
}
static int tee_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
@@ -156,16 +156,16 @@ static int schedule_mix_input(void *object)
struct pw_port_mix *mix;
if (PW_PORT_IS_CONTROL(this))
- return SPA_STATUS_HAVE_BUFFER | SPA_STATUS_NEED_BUFFER;
+ return SPA_STATUS_HAVE_DATA | SPA_STATUS_NEED_DATA;
spa_list_for_each(mix, &this->rt.mix_list, rt_link) {
pw_log_trace_fp(NAME" %p: mix input %d %p->%p %d %d", this,
mix->port.port_id, mix->io, io, mix->io->status, mix->io->buffer_id);
*io = *mix->io;
- mix->io->status = SPA_STATUS_NEED_BUFFER;
+ mix->io->status = SPA_STATUS_NEED_DATA;
break;
}
- return SPA_STATUS_HAVE_BUFFER | SPA_STATUS_NEED_BUFFER;
+ return SPA_STATUS_HAVE_DATA | SPA_STATUS_NEED_DATA;
}
static int schedule_mix_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
@@ -427,7 +427,7 @@ struct pw_port *pw_port_new(enum pw_direction direction,
pw_map_init(&this->mix_port_map, 64, 64);
- this->rt.io.status = SPA_STATUS_NEED_BUFFER;
+ this->rt.io.status = SPA_STATUS_NEED_DATA;
if (info)
update_info(this, info);
diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c
index a190a1c4..4f5a959c 100644
--- a/src/pipewire/stream.c
+++ b/src/pipewire/stream.c
@@ -371,7 +371,7 @@ static int impl_send_command(void *object, const struct spa_command *command)
pw_log_debug(NAME" %p: start %d", stream, impl->direction);
if (impl->direction == SPA_DIRECTION_INPUT) {
- impl->io->status = SPA_STATUS_NEED_BUFFER;
+ impl->io->status = SPA_STATUS_NEED_DATA;
impl->io->buffer_id = SPA_ID_INVALID;
}
else {
@@ -752,7 +752,7 @@ static int impl_node_process_input(void *object)
pw_log_trace(NAME" %p: process in status:%d id:%d ticks:%"PRIu64" delay:%"PRIi64" size:%"PRIi64,
stream, io->status, io->buffer_id, impl->time.ticks, impl->time.delay, size);
- if (io->status != SPA_STATUS_HAVE_BUFFER)
+ if (io->status != SPA_STATUS_HAVE_DATA)
goto done;
if ((b = get_buffer(stream, io->buffer_id)) == NULL)
@@ -773,9 +773,9 @@ done:
}
io->buffer_id = b ? b->id : SPA_ID_INVALID;
- io->status = SPA_STATUS_NEED_BUFFER;
+ io->status = SPA_STATUS_NEED_DATA;
- return SPA_STATUS_HAVE_BUFFER;
+ return SPA_STATUS_HAVE_DATA;
}
static int impl_node_process_output(void *object)
@@ -792,7 +792,7 @@ again:
io->status, io->buffer_id, impl->time.ticks, impl->time.delay);
res = 0;
- if (io->status != SPA_STATUS_HAVE_BUFFER) {
+ if (io->status != SPA_STATUS_HAVE_DATA) {
/* recycle old buffer */
if ((b = get_buffer(stream, io->buffer_id)) != NULL) {
pw_log_trace(NAME" %p: recycle buffer %d", stream, b->id);
@@ -802,11 +802,11 @@ again:
/* pop new buffer */
if ((b = pop_queue(impl, &impl->queued)) != NULL) {
io->buffer_id = b->id;
- io->status = SPA_STATUS_HAVE_BUFFER;
+ io->status = SPA_STATUS_HAVE_DATA;
pw_log_trace(NAME" %p: pop %d %p", stream, b->id, io);
} else {
io->buffer_id = SPA_ID_INVALID;
- io->status = SPA_STATUS_NEED_BUFFER;
+ io->status = SPA_STATUS_NEED_DATA;
pw_log_trace(NAME" %p: no more buffers %p", stream, io);
if (impl->draining) {
call_drained(impl);
@@ -818,7 +818,7 @@ again:
if (!impl->draining && !SPA_FLAG_CHECK(impl->flags, PW_STREAM_FLAG_DRIVER)) {
call_process(impl);
if (spa_ringbuffer_get_read_index(&impl->queued.ring, &index) >= MIN_QUEUED &&
- io->status == SPA_STATUS_NEED_BUFFER)
+ io->status == SPA_STATUS_NEED_DATA)
goto again;
}
exit: