GNOME Bugzilla – Bug 742863
v4l2radio failed to query attributes
Last modified: 2015-01-13 18:56:22 UTC
I try to launch v4l2radio with line: gst-launch v4l2radio device=/dev/radio0 frequency=101200000 and get this error: Setting pipeline to PAUSED ... ERROR: Pipeline doesn't want to pause. ERROR: from element /GstPipeline:pipeline0/GstV4l2Radio:v4l2radio0: Failed to query attributes of input 0 in device /dev/radio0 Additional debug info: v4l2_calls.c(142): gst_v4l2_fill_lists (): /GstPipeline:pipeline0/GstV4l2Radio:v4l2radio0: Failed to get 0 in input enumeration for /dev/radio0. (25 - Inappropriate ioctl for device) Setting pipeline to NULL ... Freeing pipeline ...
I try to make an application to listen to FM radio using Gstramer backend With Video4Linux2 API my radio tuner work fine.
GStreamer is also using Video4Linux API btw (hence the name of the element). It looks like GStreamer expects a certain ioctl() to be supported, but it's not supported by your driver. I don't own any FM radio device supported by linux/v4l2 myself, so I can't try and reproduce your issue (need to ask Hans if we have an emulated driver somewhere). Though, I can guide you through if you are able to provide more information. First step you be to produce a v4l2 log. GST_DEBUG="v4l2*:7" gst-launch v4l2radio device=/dev/radio0 frequency=101200000 This should give us more context around this failure.
Created attachment 294453 [details] DEBUG INFO
OK I put DEBUG LOG in attachaments.
That's weird, the log says errno is ENOTTY (25), which mean it should not reach this error: if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMINPUT, &input) < 0) { if (errno == EINVAL || errno == ENOTTY) break; /* end of enumeration */ else { GST_ELEMENT_ERROR (e, RESOURCE, SETTINGS, (_("Failed to query attributes of input %d in device %s"), n, v4l2object->videodev), ("Failed to get %d in input enumeration for %s. (%d - %s)", n, v4l2object->videodev, errno, strerror (errno))); return FALSE; } } Another thing I notice, is that in both 1.4 and master branch, this error is at line 152, and the log you provided says it is at line 142. Are you really using GStreamer 1.4.5 as reported here ? Have you made any modification to GStreamer ?
I make a test with v4l2-compliance --radio-device=/dev/radio0 (see attachaments)
Created attachment 294455 [details] v4l2-compliance test
Created attachment 294457 [details] DEBUG INFO with 1.4.5
Using gstreamer1.0-plugins-good:amd64 (1.4.5-1ubuntu1)
Ah, just found your mistake, use gst-launch-1.0 instead. You are running on Gst 0.10. As you can see, this ENOTTY case was not yet handled back in the days (3 years ago). http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/sys/v4l2/v4l2_calls.c?id=RELEASE-0.10.31#n135 GStreamer 0.10 development has stopped two years ago. It's not useful to file bugs against it.