GNOME Bugzilla – Bug 541956
v4l2src only requests interlaced video
Last modified: 2008-07-07 21:28:46 UTC
v4l2src only uses V4L2_FIELD_INTERLACED which is a whole-frame capture mode (it requests interlaced video where the two fields have already been merged together). However most webcams only offer progressive video (i.e. V4L2_FIELD_NONE) and will reject any requests for interlaced video. Other drivers will only offer progressive and will silently 'correct' gstreamer's request for interlaced video. I questioned this driver inconsistency here: http://marc.info/?l=linux-video&m=121434022130546&w=2 And Mauro then told me on IRC that both behaviours are correct: it's fine for drivers to reject unsupported fields with -EINVAL, and it's also fine for simple drivers to silently fix up the user's request. So in order to speak to a wider number of cameras, gstreamer should tolerate the fact that drivers may reject a request for interlaced images with -EINVAL and should then retry for progressive (Mauro confirmed this approach is the best we have at the moment). This patch also allows OLPC to drop a patch that we needed to get the XO webcam working: http://dev.laptop.org/attachment/ticket/7294/v4l2-nointerlace.patch http://dev.laptop.org/ticket/7294
Created attachment 114148 [details] [review] try progressive if interlaced fails with EINVAL
2008-07-07 Sebastian Dröge <sebastian.droege@collabora.co.uk> Patch by: Daniel Drake <dsd at gentoo dot org> * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture), (gst_v4l2src_get_nearest_size): Try progressive video if interlaced fails. Fixes bug #541956 and the usage of v4l2src on OLPC.