GNOME Bugzilla – Bug 670197
v4l2src: webcam doesn't work due to fatal error when querying color balance attributes
Last modified: 2012-02-17 03:27:34 UTC
OS: openSUSE 12.1 Webcam: built-in Suyin Corp webcam for HP notebook (usbid 064e:e28a) When I used gstreamer-properties to test the webcam, I got those error messages: gstreamer-properties-Message: Error running pipeline 'Video for Linux 2 (v4l2)': Failed getting controls attributes on device '/dev/video0'. [v4l2_call s.c(267): gst_v4l2_fill_lists (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src1: Failed querying control 9963790 on device '/dev/video0'. (5 - Input/output error)] Some error messages also showed in dmesg: [ 2409.912169] uvcvideo: Failed to query (GET_DEF) UVC control 12 on unit 2: -32 (exp. 4). [ 2409.916282] uvcvideo: Failed to query (GET_DEF) UVC control 12 on unit 2: -32 (exp. 4). [ 2412.842290] uvcvideo: Failed to query (GET_DEF) UVC control 12 on unit 2: -32 (exp. 4). After a further test, It failed in the queries for V4L2_CID_RED_BALANCE(9963790) and V4L2_CID_BLUE_BALANCE(9963791). Since mplayer works fine with the webcam, I tried to ignore the error messages, and it worked. Maybe gst-plugins-good can just show warnings instead of errors to be compatible with more webcams.
Created attachment 207738 [details] [review] Turn the non-fatal errors into warnings This patch treats the error from the query for the control attribute as warning. It works for me, but I am not sure if this would be intrusive or not.
I agree, it doesn't look like this needs to be fatal at all. I'm not sure if it's a good idea to spam the user with borderline nonsensical warning messages either, in this case (GST_ELEMENT_WARNING is something that might be shown to the user) - I think it's best to just log a warning in the debug log and move on. Also added the EIO error code to the error block above, so please re-test to make sure things still work with that change, thanks! commit c1c858f2733aba9fd8f6120656b0db20a66b6c77 Author: Gary Ching-Pang Lin <chingpang@gmail.com> Date: Thu Feb 16 17:14:20 2012 +0800 v4l2src: failure to query some optional controls is not a fatal error Don't post a (fatal) error message on the bus just because we failed to query some control. Fixes issue with built-in Suyin Corp webcam for HP notebook (usbid 064e:e28a) on OpenSuse 12.1, where querying red/blue balance fails. https://bugzilla.gnome.org/show_bug.cgi?id=670197
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=c1c858f2733aba9fd8f6120656b0db20a66b6c77
Confirmed the patch works:-)