GNOME Bugzilla – Bug 560033
[v4l2src] returns caps with a range where max == min
Last modified: 2009-08-09 13:21:48 UTC
Today I received this bug report:
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.
can you make a log with
GST_DEBUG=*v4l*:5 gst-launch v4l2src ! fakesink -v >debug.log 2>&1
gzip and attach here, thanks,
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:
If you look at the log whats happening is quite obvious.
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.
Created attachment 123531 [details] [review]
set value type correctly
Clearing needinfo status, as I've provided the requested info.
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 :)
This should fix it:
Author: Tim-Philipp Müller <email@example.com>
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