spa_pod_builder_add() is a va_args function that is terminated by a NULL
argument. The last argument must be a pointer type, because otherwise
checking for a NULL pointer can fail.
The __attribute__((__sentinel__)) prints a compiler warning, if the last
argument of a call to spa_pod_builder_add() is not a pointer type.
Fix all sentinel warnings by replacing all integer type 0 with pointer
type NULL in calls to spa_pod_builder_add().
Pass the minimum required version to the hook emission and only call
events when the handler is recent enough.
Add some macros to make event emission easier to read.
We need to keep the sources around until all sources are dispatched. If
not: source A and B are active after poll, A is dispatched first and
removes B, when B is then dispatched, the memory is gone. We don't
free the source but simply mark the fd invalid and move it do a
destroy list. After all sources are dispatched we destroy.
This is safe because removing a source is either done from the poll
context (with invoke) or when holding the right locks.
A device that supports continuous/step-wise frame interval will
report the correct frame intervals for index 0 and EINVAL for
every other index.
(https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/vidioc-enum-frameintervals.html)
Previously, the code would exit from the loop after successfully
reading index 0, without marking that the iteration of frame
interval completed. Therefore, the next time the function was
called the same frame intervals would be read, instead of advancing
to the next frame size or format type.
Instead, mark that we need to try and read the next format size.
Fixes#56
Don't use a destroy_list anymore, it's not safe anyway. Instead require
that sources be removed with (a blocking) invoke. Make sure we don't
dispatch sources that were removed from the loop.
Add the right propId to properties so they can get controls.
Keep track of properties and handle the io area for them
Check if properties changed and update the v4l2 controls
When the mixer has no bytes queued, only ask for more bytes when
we were in the OK status otherwise we might override the HAVE_BUFFER
status and discard the queued buffer.
Don't unlink the ports of an inactive link because then it might be
possible that the scheduler can't recycle a buffer, instead use
a port flag to mark the ports disabled and change to scheduler to
skip those ports.
Add an interface that can manager a dbus connection.
Make a dbus interface in the core that can create connections running
in the core main loop. Keep this as support for spa plugins.
Make a new PropInfo parameter that allows us to iterate all
properties. Make some new fields to set labels and names for
properties. We will be able to add more things to describe the
properties this way.
Use the Props param to simply query or set properties.
We can now make int enum properties and describe all possible
values with labels, we don't need to register types anymore.
This then makes it possible to enumerate the v4l2 controls and make
them available as control params.
The control values do not have to contain valid values when they
are set so don't try to parse them. Instead just do a simple sanity
check on the size.
Handle the case where we clear the io area, go back to the default
node properties.
Add control objects for all controllable properties on ports.
Try to link compatible control properties in autolink.
Allocate shared memory for the output property memory and configure
the io area on the ports when the controls are linked.
Send the shared memfd to clients when the io area is configured.
Add port_set_io support in remote.c, mmap the control io area and
set on the port.
Add some param helpers
Add volume control to export-source update the volume before
sending each buffer.