GNOME Bugzilla – Bug 109330
[0.6.1] v4lsrc doesn't work with philips webcams (based on pwc kernel module)
Last modified: 2004-12-22 21:47:04 UTC
I've tried to receive a video stream from my Philips 740 webcam with the v4lsrc of gstreamer 0.6 (the version in debian unstable). I tried: --------------------- island.wh-wurm.uni-ulm.de$ gst-launch v4lsrc device=/dev/video0 width=320 height=256 ! sdlvideosink INFO ( 7818: 0) Initializing GStreamer Core Library version 0.6.0 INFO ( 7818: 0) CPU features: (0c040882) MMX SSE registry: loaded global_registry in 0.373959 seconds (/var/lib/gstreamer/0.6/registry.xml) GStreamer-INFO: 0 live buffer(s) GStreamer-INFO: 1 live bufferpool(s) GStreamer-INFO: 0 live event(s) RUNNING pipeline Opened device 'Philips 740 webcam' ('/dev/video0') successfully ERROR: /pipeline0/v4lsrc0: Error setting audio mute: (un)setting mute is not supported pipeline doesn't want to play GStreamer-INFO: 0 live buffer(s) GStreamer-INFO: 1 live bufferpool(s) GStreamer-INFO: 0 live event(s) --------------------- gst-inspect v4lsrc claims that the default for "has-audio" is false, so it shouldn't try to set any of the audio properties, because the driver rightfully claims that it doesn't support these options, leading to the failure. when I tried to explicitly set has-audio property to false it didn't work either --------------------- island.wh-wurm.uni-ulm.de$ gst-launch v4lsrc has-audio=false device=/dev/video0 width=320 height=256 ! sdlvideosink INFO ( 7822: 0) Initializing GStreamer Core Library version 0.6.0 INFO ( 7822: 0) CPU features: (0c040882) MMX SSE registry: loaded global_registry in 0.369138 seconds (/var/lib/gstreamer/0.6/registry.xml) ** (process:7822): WARNING **: gstv4lelement.c:383: invalid property id 7 for "has-audio" of type `GParamBoolean' in `GstV4lSrc' GStreamer-INFO: 0 live buffer(s) GStreamer-INFO: 1 live bufferpool(s) GStreamer-INFO: 0 live event(s) RUNNING pipeline Opened device 'Philips 740 webcam' ('/dev/video0') successfully ERROR: /pipeline0/v4lsrc0: Error setting audio mute: (un)setting mute is not supported pipeline doesn't want to play GStreamer-INFO: 0 live buffer(s) GStreamer-INFO: 1 live bufferpool(s) GStreamer-INFO: 0 live event(s) ---------------------------- Then I hacked v4l_calls.c a little bit and replaces gst_v4l_set_audio with: gboolean gst_v4l_set_audio (GstV4lElement *v4lelement, GstV4lAudioType type, gint value) { return TRUE; } and it worked fine.
The audio settings are only acknowledged if the thing says it supports audio in its capabilities/flags field of the video4linux video_capability struct. Apparently, it says it does (the webcam has a mic on it, doesn't it?). If it doesn't support any driver calls, that's a driver bug. Current CVS doesn't do audio handling in the change_state() handler anymore, so it's now up to the application to handle errors. That should solve most of this.
A workaround in 0.6.1 could be to not check for the return value in gst_v4l_set_audio().
Whoops - reopen
Fixed in 0.6.1 CVS.