Make a real debug context with a log function and move it to a new file.
This way we don't need to redefine a macro.
Make a new context for debugging to a log file. Make new functions to
debug to a log file.
Move the stringbuffer to string utils.
Integrate file/line/func and topics into the debug log.
We can remove some more things from the pipewire log_object function and
also add support for topics.
Add new spa_debugc_ funnctions that take a context. The user should also
redefine the spa_debugc macro to handle the context.
Use this to let some plugins log the pod and format to the log without
using the global logger.
Also use this to remove our custom pod logger function by reusing the
spa one with a custom context.
This reverts commit 6c963ed933.
This code was meant to set a filter on the format for the follower
but is not implemented yet.
Problem is that the unit tests and wireplumber call this code and would
need to be patched.
Just like the optional build, make all field parsing optional. This
will leave the fields with their default values if they are not parsed
from the param.
We can then remove our custom functions and use the generic ones in
various places.
A flush command is not supposed to stop playback but just clear the
current state. Normally, to avoid complications, an application will
Pause, Flush and optionally Start to do things smoothly without
interfering with the process loop, but things should not crash if that's
not the case.
Fixes#2726
Make the alignment parameter optional when negotiating buffers.
Default to a 16 bytes alignment and adjust for the max cpu
alignment.
Remove the useless align buffer parameter in plugins, we always
set it to 16 anyway.
When we add a new listener to an object, it will emit the full state
of the object. For this it temporarily sets the change_mask to all
changes. Restore the previous state after this or else we might not
emit the right change_mask for the next listener.
Consider the case where one there are two listeners on an object.
The object emits a change and the first listener wants to enumerate the
changed params. For this is adds a new listener and then triggers the
enumeration. If we set the change_mask to 0 after adding the listener,
the second listener would get a 0 change_mask and fail to update
its state.
This replaces the manual check for "true" and some (inconsistent) return value
of atoi. All those instances now require either "true" or "1" to parse as
true, any other value (including NULL) is boolean false.
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
We should not have to initialize the state to NEED_DATA, anything
that is not HAVE_DATA is good. Also we need to set the buffer to
INVALID because else it might be recycled.
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
Add a new PortConfig parameter to configure ports of elements that
are marked with the SPA_NODE_FLAG_*_PORT_CONFIG. This is used to
configure the operation of the audioconver/audioadapter nodes and
how it should convert the internal format. We want to use the
Profile parameter only for cases where there is an enumeration of
values, like with device configuration.
Add unit tests for audioconvert and adapter to check if they handle
PortConfig correctly.
Make the media session use the PortConfig to dynamically configure
the device nodes.
Remove audio-dsp, it is not used anymore and can/should be implemented
with a simple audioconvert spa node now and some PortConfig.
Remove the CAN_USE_BUFFERS flag, it is redundant. We can know this
because of the IO params and buffer params.
Add flags to the port_use_buffer call. We also want this call to
replace port_alloc_buffer. Together with a new result event we can
ask the node to (a)synchronously fill up the buffer data for us. This
is part of a plan to let remote nodes provide buffer data.