After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 541956 - v4l2src only requests interlaced video
v4l2src only requests interlaced video
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.x
Other Linux
: Normal normal
: 0.10.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-07 21:00 UTC by Daniel Drake
Modified: 2008-07-07 21:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
try progressive if interlaced fails with EINVAL (2.75 KB, patch)
2008-07-07 21:03 UTC, Daniel Drake
committed Details | Review

Description Daniel Drake 2008-07-07 21:00:03 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
Comment 1 Daniel Drake 2008-07-07 21:03:07 UTC
Created attachment 114148 [details] [review]
try progressive if interlaced fails with EINVAL
Comment 2 Sebastian Dröge (slomo) 2008-07-07 21:28:46 UTC
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.