Currently the v4l2 and libcamera plugins map `SPA_PROP_exposure` in incompatible
ways. So change the v4l2 mapping to `V4L2_CID_EXPOSURE_ABSOLUTE` because at least
that is in units of time (a step closer to addressing #4697), and because that
is more relevant for UVC cameras.
Also change the pipewire-v4l2 translation layer.
Initialization of PipeWire could happen too early and deadlock in some
cases. Instead, initialize pipewire right before we're going to actually
use it for the first time.
Fixes#4859
Make the state_changed event and _get_state() function set errno with
the current error value if the state is in error, so that application
can use this to give more detailed error reporting.
Use this in alsa, v4l2 and pulse to give some other error codes than
EIO.
Fixes#4574
This commit moves the check that determines whether the mode
argument of `open*()` exists into a separate function.
With that, the check is fixed because previously it failed to
account for the fact that `O_TMPFILE` is not a power of two.
Furthermore, add `assert()`s in the fortified variants that
ensure that no mode is required by the specified flags.
The v4l2 build unsets _FILE_OFFSET_BITS, which is not allowed when setting
_TIME_BITS=64. Having verified that nothing in this module is sensitive to
64-bit time_t (none of the functions it intercepts handle time), we also
unset _TIME_BITS to allow this to build as before.
Signed-off-by: Steve Langasek <steve.langasek@canonical.com>
Reviewed-by: Dylan Aïssi <dylan.aissi@collabora.com>
Change the shellcheck job so that we configure the build and check the
preprocessed versions of the scripts, not the bare ones, which might not
be syntactically valid yet.
Add sequence number to frames.
Fix mmap tracking.
Improve debug.
Set right flags on dupped fds.
Handle blocking dqbuf.
Set timestamp and field on buffers.
Dequeue buffers in streamoff.
Only store the eventfd when valid or else we will try to close an
invalid fd.
Keep the errno value around, just in case it gets overwritten by
the free_file call.