GNOME Bugzilla – Bug 797306
v4l2object: Read driver selected interlace mode
Last modified: 2018-11-03 15:33:37 UTC
This is to fix a bug reported by Tim Harvey on the mailing list. His original message was: I've got a v4l2src capture pipeline using an interlaced video source which used to work on GStreamer 1.8.3 that I've found no longer negotiates on GStreamer 1.14.1: root@bionic-armhf:~# v4l2-ctl -d7 --get-fmt-video Format Video Capture: Width/Height : 720/480 Pixel Format : 'UYVY' (UYVY 4:2:2) Field : Sequential Bottom-Top Bytes per Line : 1440 Size Image : 691200 Colorspace : SMPTE 170M Transfer Function : Rec. 709 YCbCr/HSV Encoding: ITU-R 601 Quantization : Limited Range Flags : root@bionic-armhf:~# gst-launch-1.0 --version gst-launch-1.0 version 1.14.1 GStreamer 1.14.1 https://launchpad.net/distros/ubuntu/+source/gstreamer1.0 root@bionic-armhf:~# gst-launch-1.0 v4l2src device=/dev/video7 ! video/x-raw,format=UYVY ! jpegenc ! rtpjpegpay ! udpsink host=$SERVER port=5000 Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video7' does not support progressive interlacing Additional debug info: gstv4l2object.c(3768): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device wants interleaved interlacing Execution ended after 0:00:00.003064667 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... Any idea what changed here that causes this?
Created attachment 373967 [details] [review] v4l2object: Read driver selected interlace mode If there was no interlace-mode field in the caps. Read back the value selected by the driver. This way, if the driver does not support progressive, then it will automatically negotiate the returned mode unless this mode is not supported by GStreamer. This method was already used for colorimetry. Just like colorimetry, the interlace mode is not longer probed by v4l2src dues to performance issues.
Review of attachment 373967 [details] [review]: I'll add to my comment why I skipped the is_mplane check. The first 4 members of both structs are identical, so we can simplify the code. We use this whenever possible, it's also used in the linux kernel.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/511.