[gstreamer-bugs] [Bug 516649] [v4l2src] tries to VIDIOC_S_PARM without checking capabilities
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Tue Mar 25 05:33:21 PDT 2008
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=516649
GStreamer | gst-plugins-good | Ver: HEAD CVS
Tim-Philipp Müller changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #105313|none |rejected
Flag| |
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|HEAD |0.10.8
------- Comment #4 from Tim-Philipp Müller 2008-03-25 12:33 UTC -------
> I believe this patch is not correct. The statement
> if (v4l2src->v4l2object->vcap.capabilities & V4L2_CAP_TIMEPERFRAME)
> is in error, because vcap is a v4l2_captureparm structure, whereas the flag
> V4L2_CAP_TIMEPERFRAME is only present in a v4l2_capability structure.
I think you're right. This is is the list of flags used in the capabilities
field of a v4l2_capability structure according to the docs:
http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec/r13105.htm#DEVICE-CAPABILITIES
> You may wish to look at the corresponding part of the proposed patch in bug
> #520092 to see how (I believe) this may be done correctly.
I've committed something based on your patch now:
2008-03-25 Tim-Philipp Müller <tim at centricular dot net>
Based on patch by: William M. Brack <wbrack at mmm com hk>
* sys/v4l2/v4l2src_calls.c: (fractions_are_equal),
(gst_v4l2src_set_capture):
Check whether the device supports setting the framerate before
trying to set it and then posting a warning or error if it doesn't
work (#516649, #520092). Also compare fractions more correctly.
I guess it's better to output data with a non-wanted framerate than to error
out, at least while we require a framerate to be specified in the caps. Some
refactoring might be in order here one day.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=516649.
More information about the Gstreamer-bugs
mailing list