Commit graph

6 commits

Author SHA1 Message Date
Barnabás Pőcze
7674b15fab pipewire-v4l2: move open*() flag check into function
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.
2024-06-25 19:10:13 +02:00
Barnabás Pőcze
354387ca58 pipewire-v4l2: redirect to correct functions from fortified variants 2024-05-16 01:53:38 +02:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Pauli Virtanen
240d212822 pipewire-v4l2: disable _FORTIFY_SOURCE when defining override functions
_FORTIFY_SOURCE defines always_inline versions of open etc. functions,
which conflict with our exported override versions.  Disable it for the
file that defines the override functions.
2022-07-10 16:05:27 +03:00
Wim Taymans
3ee852b808 pipewire-v4l2: More improvements
Keep separate map for fd to files so we can implement dup.

Filter out duplicates in enumfmt.

tryfmt should return the closest match.

Use pthread_once to init the global state.

Make things mostly work in GStreamer.
2021-10-14 10:16:35 +02:00
Wim Taymans
e68fd36f90 pipewire-v4l2: the start of a v4l2 LD_PRELOAD library 2021-10-14 10:16:35 +02:00