[gstreamer-bugs] [Bug 628118] New: wrong format detection in gstv4l2object.c

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Aug 27 05:38:22 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=628118
  GStreamer | gst-plugins-good | 0.10.28

           Summary: wrong format detection in gstv4l2object.c
    Classification: Desktop
           Product: GStreamer
           Version: 0.10.28
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: jphilippe.francois at gmail.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
      GNOME target: ---
     GNOME version: ---


I have a v4l2 camera, which supports only the UYVY format.
When using the v4l2src source element, the format detection loop in

gst_v4l2_object_fill_format_list :

  /* format enumeration */
  for (n = 0;; n++) {
    format = g_new0 (struct v4l2_fmtdesc, 1);

    format->index = n;
    format->type = v4l2object->type;

    if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUM_FMT, format) < 0) {
      if (errno == EINVAL) {
        g_free (format);
        break;                  /* end of enumeration */
      } else {
        goto failed;
      }
    }
    ---- some logging ---
    v4l2object->formats = g_slist_insert_sorted (v4l2object->formats, format,
        (GCompareFunc) format_cmp_func);
  }


On the "kernel side", ie using printk and strace, I see only one  (successful)
call to ENUM_FMT.

On the library side, however, the code is looping five time. In GDB, i can see
n being incremented to 5, but it seems the ioctl line is skipped after the
first loop. If logging is enabled, I can also see the log output five time, and
finally, when looking at the caps of the source pad, I can see the good format,
plus the other four ones.

What is more strange is that the loop exits without an invalid ENUM_FMT ioctl
call, 

Since the code (as I understand it) and the program behaviour disagree, I am
stuck here.

This is with gstreamer 0.10.28, the plugin-good version is 0.10.21, and all
this is from the ubuntu 10.04 gstreamer packages

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list