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 670197 - v4l2src: webcam doesn't work due to fatal error when querying color balance attributes
v4l2src: webcam doesn't work due to fatal error when querying color balance a...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.30
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-16 09:18 UTC by Gary Ching-Pang Lin
Modified: 2012-02-17 03:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Turn the non-fatal errors into warnings (1.07 KB, patch)
2012-02-16 09:24 UTC, Gary Ching-Pang Lin
committed Details | Review

Description Gary Ching-Pang Lin 2012-02-16 09:18:31 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.
Comment 1 Gary Ching-Pang Lin 2012-02-16 09:24:10 UTC
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.
Comment 2 Tim-Philipp Müller 2012-02-16 13:14:06 UTC
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
Comment 4 Gary Ching-Pang Lin 2012-02-17 03:27:34 UTC
Confirmed the patch works:-)