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 742863 - v4l2radio failed to query attributes
v4l2radio failed to query attributes
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.4.5
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-13 15:00 UTC by triniton
Modified: 2015-01-13 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
DEBUG INFO (2.76 KB, text/plain)
2015-01-13 17:58 UTC, triniton
Details
v4l2-compliance test (2.42 KB, text/plain)
2015-01-13 18:28 UTC, triniton
Details
DEBUG INFO with 1.4.5 (2.76 KB, text/plain)
2015-01-13 18:34 UTC, triniton
Details

Description triniton 2015-01-13 15:00:07 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 ...
Comment 1 triniton 2015-01-13 15:02:37 UTC
I try to make an application to listen to FM radio using Gstramer backend

With Video4Linux2 API my radio tuner work fine.
Comment 2 Nicolas Dufresne (ndufresne) 2015-01-13 15:39:22 UTC
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.
Comment 3 triniton 2015-01-13 17:58:35 UTC
Created attachment 294453 [details]
DEBUG INFO
Comment 4 triniton 2015-01-13 18:01:45 UTC
OK I put DEBUG LOG in attachaments.
Comment 5 Nicolas Dufresne (ndufresne) 2015-01-13 18:10:10 UTC
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 ?
Comment 6 triniton 2015-01-13 18:28:18 UTC
I make a test with v4l2-compliance --radio-device=/dev/radio0 (see attachaments)
Comment 7 triniton 2015-01-13 18:28:51 UTC
Created attachment 294455 [details]
v4l2-compliance test
Comment 8 triniton 2015-01-13 18:34:52 UTC
Created attachment 294457 [details]
DEBUG INFO with 1.4.5
Comment 9 triniton 2015-01-13 18:36:01 UTC
Using gstreamer1.0-plugins-good:amd64 (1.4.5-1ubuntu1)
Comment 10 Nicolas Dufresne (ndufresne) 2015-01-13 18:56:22 UTC
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.