Remove the SPA_AUDIO_MAX_POSITION define and use the
SPA_AUDIO_MAX_CHANNELS again.
Make a compile time define to override the default max channels of 64.
Make sure we compile the SPA library with the default 64 channels. If
you use the SPA library on a spa_audio_info you will get 64 channel
support, like before. If you want more channels, you will need to make
a padded structure or redefine the MAX_CHANNELS before you use the
spa_audio_info structures. You can use the padded structure with the
new functions that take the structure size.
With the extra checks in the parsing code, we avoid making a
valid spa_audio_info with too many channels that don't fit in the
structure. This means that code that receives a spa_audio_info can
assume there is enough padding for all the channels.
Make a new body.h file with some functions to deal with pod and their
body. Make the iter.h functions use mostly this.
Rework the parser so that it only uses body.h functions. With the separation
of pod+body, we can read and verify the pod once and then use the
verified copy to handle the rest of the body safely.
We do this because iter.h only works in pods in memory that doesn't change
because it is vulnerable to modifications of the data after verifying it.
The new parser is not vulnerable to this and will not cause invalid
memory access when used on shared memory. There is however no need for
atomic operations to read the headers, whever is read is either valid
and useable of invalid and rejected.
See #4822
Make a method to find the memory block for the given ptr. We can
use this to find the memfd of the memory if there is any. We can
then remove the Shared metadata on buffers.
We can't use a ringbuffer on the chunk because it implies the
consumer would write to it to update the read position, which we
can't do because the chunk is read-only and might even be shared.
Go back to offset/size pairs, which can sortof do the same thing
if we want later when we keep a non-shared read pointer in the
consumer.
Keep alsa timestamp around and filled state for future.
mmap the input port meta/data/chunk as read-only.
Only do clock update requests when asked.
We can't allocate the shared meta in shared mem because then clients can
damage it for other clients. Place it instead right after the buffer
metadata array. Filter out the shared metadata for a client, we send it
as part of the client_buffer structure.
Remove pointer metadata, it's not so useful.
Document the layout of the allocated buffers and the shared memory.
Work on metadata to define control parameters
ringbuffer: remove size and mask from the ringbuffer, we have that
elsewhere in the user of the ringbuffer.
Remove the buffer data offset and size fields and replace with a
ringbuffer. We then have a ringbuffer in all buffer data, which
simplifies things.
We can now remove the ringbuffer metadata.
Reset the builder when the filter failed.
Make the plugins create their params in a temporary buffer, we
don't want to do in-place filtering because that is not always
possible. Because the filter now resets on error, we can remove
the reset from the plugins.
Add an argument to pass the result param to the caller instead of
having the caller have to pick it up from the builder.
Improve docs for node, clock and monitor
Pass spa_pod everywhere instead of spa_pod_object.
Pass result argument to spa_pod_filter to make things a little
nicer.
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.
Make a default logger and mapper in a .h file to be used by examples
Remove logger and mapper from libs
Make method to set the default mapper for the debug methods
Remove port properties and replace them with port params. Move the
params from the PortInfo to enum_params.
Use the Param ranges to specify possible sizes etc.
Use dynamic types for the data and meta types.
Move the meta into a separate header.
Remove port state, we can keep track of that ourselves.
Add size to MetaDataEnable params
Use absolute indexes that we let wrap around. We can then easily detect
how much we under of overflowed by using serial number arithmetic.
Remove the Areas, we can trivially compute this ourselves, move the
logic in read/write_data.
Unify input and output io areas.
Add support for ranges in the io area.
Automatically recycle buffers in the output areas in process_output
Improve the mixer, add use_buffer support, use a queue of input buffers,
fix mixing, add support for ranges.
Fix mixer and v4l2 tests