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 560033 - [v4l2src] returns caps with a range where max == min
[v4l2src] returns caps with a range where max == min
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.11
Other Linux
: Normal normal
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-09 16:13 UTC by Hans de Goede
Modified: 2009-08-09 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The requested log file (7.01 KB, application/octet-stream)
2008-11-10 21:21 UTC, Hans de Goede
  Details
set value type correctly (1.61 KB, patch)
2008-11-27 10:29 UTC, Chia-I Wu
needs-work Details | Review

Description Hans de Goede 2008-11-09 16:13:41 UTC
Hi,

Today I received this bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=470698

The problem here is that for cams which support only one resolution (and do not
support the v4l2 ENUM_FRAMEIVAL ioctl). gstreamer will return caps with a range
for width and height with range_min == range_max.

I believe that this is not correct and the gstreamer instead should return a gvalue holding just an int.

This currently results causes an empty resolution list (and generally not working) in cheese, I've written a patch for cheese to work around this for now, see bug 560032.
Comment 1 Wim Taymans 2008-11-10 17:01:18 UTC
can you make a log with

GST_DEBUG=*v4l*:5 gst-launch v4l2src ! fakesink -v >debug.log 2>&1

gzip and attach here, thanks,
Comment 2 Hans de Goede 2008-11-10 21:21:19 UTC
Created attachment 122352 [details]
The requested log file

(In reply to comment #1)
> can you make a log with
> 
> GST_DEBUG=*v4l*:5 gst-launch v4l2src ! fakesink -v >debug.log 2>&1
> 
> gzip and attach here, thanks,
> 

Ok I had to rmmod both my bttv and webcam driver first and then only modprobe the webcam driver, as the command above does not seem to honor the gstreamer-properties default video input device.

Also I slightly modified the command to get you a more readable log, I added:
GST_DEBUG_NO_COLOR=1

If you look at the log whats happening is quite obvious.
Comment 3 Chia-I Wu 2008-11-27 10:28:07 UTC
I could confirm this bug.  My camera supports only one resolution and does not support VIDIOC_ENUM_FRAMESIZES.

The attached (untested) patch should fix the issue.
Comment 4 Chia-I Wu 2008-11-27 10:29:03 UTC
Created attachment 123531 [details] [review]
set value type correctly
Comment 5 Hans de Goede 2009-01-23 10:07:07 UTC
Clearing needinfo status, as I've provided the requested info.
Comment 6 Sebastian Dröge (slomo) 2009-05-07 13:17:12 UTC
This patch is not correct though as G_TYPE_INT would take one parameter, not two. Other than that it looks good... if you fix this I'll commit it :)
Comment 7 Tim-Philipp Müller 2009-08-09 13:21:48 UTC
This should fix it:

 commit 8c8e6af45badae969278c35da114ded6ce0ef0f7
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Sun Aug 9 14:19:42 2009 +0100

    v4l2src: if max == min width/height put an int in the probed caps, not an int range
    
    Fixes #560033.