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
Don't directly expose the state change methods. Only expose an activate
method for nodes that indicates if the node should be scheduled or not.
Let the link automatically negotiate two active nodes.
Make some defines for properties.
Use link property to make passive links. Passive links don't activate
the nodes.
Make sure the mainloop quits when quit is called before run.
Add an extra input and output node for remote nodes. We link this
node to all remote inputs and outputs to make it easier to use
the scheduler.
Improve scheduler debug
Sometimes we insert NULL into the client object map to mark the object
freed. Now that the map also returns those NULL's, don't try to free
them.
Small cleanups
Make some port methods private.
Replace the v4l2 example with a more generic version that can add
any spa node to a remote graph
Make the dictionary items const
Add some info to nodes and factories. Add the node info to the node
properties. We can then set the media.class directly on the node,
instead of letting the monitor set it.
Debug node info in spa-inspect.
Do async operation on the audiotestsrc and videotestsrc differently.
* Fix use after free in error path
Memory pointed by 'handle' is used in error path but it is freed before jumping to interface_failed. Remove the wrong free. Memory pointed by 'handle' gets freed in the error handling path.
* Free 'bus' when dbus_bus_get_private fails
If dbus_bus_get_private fails memory pointed by 'bus' is never freed. Free it.
* Free 'impl' if dbus_bus_get_private fails
When dbus_bus_get_private fails the memory pointed by 'impl' is not freed. Free it.
* Fix clang warnings about comparing uint32 < 0
clangs complains about an uint32 compared to < 0:
warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
So remove these comparisos and an uint32 never will be less than 0.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
* module-jack.c: Differentiate error msg from protocol-native
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>