gstreamer/subprojects/gst-plugins-good/sys
Jakub Vaněk 0b65f667af v4l2src: Interpret V4L2 report of sync loss as video signal loss
Certain V4L2 drivers can report that a video receiver is seeing
some signal, but that it is unable to synchronize to it. IOW: the driver
can sometimes report V4L2_IN_ST_NO_SYNC and not report V4L2_IN_ST_NO_SIGNAL.

In particular, I've seen the tc358743 (HDMI-to-CSI2 converter) driver
sometimes report this when deployed to a fleet of embedded Raspberry Pis.
The relevant kernel code is in [1]. The video output is not practically
usable when V4L2_IN_ST_NO_SYNC is reported (only visually corrupted frames,
sometimes with random "snow", are received). I assume that this happens when
either the HDMI cable is poorly plugged in or damaged or when a CSI2 FFC
cable is used and is damaged.

The change in this commit is useful for detecting this working-but-not-really
condition in application code. Applications already listening for the "Signal lost"
message will gain the ability to handle this condition.

There seem to be more V4L2 error flags like this, see [2]. However, I do not
have practical experience with them and adding only V4L2_IN_ST_NO_SYNC seems
like a safer option.

[1]: https://github.com/raspberrypi/linux/blob/be8498ee21aa/drivers/media/i2c/tc358743.c#L1534
[2]: https://www.kernel.org/doc/html/v6.6/userspace-api/media/v4l/vidioc-enuminput.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7021>
2024-06-12 17:26:48 +00:00
..
directsound meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
oss oss: add a GstDeviceProvider plugin 2023-06-27 09:34:33 +03:00
oss4 gst-plugins-good: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
osxaudio macos: Listen for audio devices being added/removed 2024-06-01 13:21:59 +00:00
osxvideo macos: Set activation policy in osxvideosink and glimagesink 2023-05-12 01:14:44 +02:00
rpicamsrc meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
v4l2 v4l2src: Interpret V4L2 report of sync loss as video signal loss 2024-06-12 17:26:48 +00:00
waveform meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
ximage ximagesrc: fix xnavigation linking issue 2023-11-03 17:36:58 +00:00
meson.build Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00