Remove the frame argument from the builder, we can use the builder
allocated frames.
Add deref function to builder to make it more flexible later.
Add some more recursion depth checks in the parser.
Improve props filter, also filter other types.
Make enum_params and set_param to configure properties, format
and other parameters. This allows us to remove some duplicate
code and make the properties and parameters much more extensible.
Use the object id to mark the id of the parameter.
Remove the spa_format and spa_props.
We can now make the client-node easier by merging the various
format methods into the params.
Make the stream API more powerful now that we can pass params
around.
Fix ringbuffer mixing in audiomixer
Add ringbuffer support in audiotestsrc params
Don't recycle buffers before signaling have_output, the app is supposed
to recycle explicitly or with a process_output call.
Add some trace to graph functions in tests
Add ringbuffer support in export-source
Only send data to a client when it has sent a NEED_INPUT otherwise
recycle the buffers immediately.
Explicitly recycle buffers when the client is not going to do this.
When recycle_buffer() is called while in the new_buffer event handler,
don't send the reuse_buffer event. Instead, mark the buffer for
recycling by putting the buffer ID in the IO area, which is more
light-weight. When need_input reaches the server, it will recycle the
buffer.
Also introduce a helper function for sending the reuse_buffer event.
Change-Id: I900e75694efce2fa7e12840eaf53a7f6b7ae7e8a
Emit the new_buffer event only if the IO area status is HAVE_BUFFER.
In client-reuse mode, also clear the buffer ID - we need an explicit
recycle call before recycling.
Change-Id: I139663068ef12669adc13b7e351666c8469dee72
We can initialize the transport as soon as we get async notify
from the client when setup completes. Node initialization happens
after that and then finaly the node is initialized and we can send
the transport and fds.
Small cleanups
Make port status SPA_RESULT_OK until events changes it and data
processing can start
Only start pulling on ports in the OK state
Change we way we handle client-nodes, handle them async and continue
processing after they signaled completion
Add a new scheduler that decouples push and pull. It pushes to peer
elements when all inputs are provided and pulls from nodes when all
peer outputs are processed.
read() returns ssize_t where a negative number is used for errors.
The value was read into a size_t and then checked for <0.
Change to ssize_t to handle the negative number.
Also use double buffering for the client-node input, we process the
output of the previous cycle.
Only process the reuse_buffer if the client is explicitly going to
send them otherwise, recycle right after sending.
Let the tee and mix pass the io status upstream.
Initialize io area with NEED_BUFFER for inputs.
Implement reuse_buffer for the remote.
When the client is explicitly going to send reuse_buffer messages,
set the consumed buffer to INVALID so it doesn't automatically get
reused.
ASYNC is for when the node emits events to signal input and output it
has nothing to do with reuse_buffer
Remove weird PROCESS_INPUT code.
Add a PW property "pipewire.client.reuse". If set, the client-node
doesn't immediately reuse a buffer after sending
PW_CLIENT_NODE_MESSAGE_PROCESS_INPUT to the client. Instead, it waits
for reuse-buffer from the client. The SPA_GRAPH_NODE_FLAG_ASYNC is
used for this, together with adapted logic in process_input().
In stream.c, if the property is set, the handling of incoming buffers
for PW_DIRECTION_INPUT streams is changed. Each buffer has to be
recycled, so we make sure new_buffer is emitted for each intermediate
buffer, if buffer_id in the IO area has moved past some buffers.
Change-Id: I137a12b702b857cc73369930d7029ecbd69d63ff
For PW_DIRECTION_INPUT streams, set the used flag for buffers before
emitting new_buffer. This makes recycle_buffer() effective.
Change-Id: I869c2bd303e19974de79e8ada334a485c58f6592
Handle reuse-buffer in output-port tee nodes and input-port mix
nodes. In both cases, reuse-buffer is forwarded to the input ports of
the tee/mix node.
Change-Id: Ifbe8bcf07f0adc6400accc64a9bfb63a5c70e215