v4l2src: make this work more than once in a row

We used to skip frame rate setup if the camera was already setup
with the requested frame rate. This breaks some cameras though,
causing them to not output data (several models of Thinkpad cameras
have this problem at least).
So, don't skip.

https://bugzilla.gnome.org/show_bug.cgi?id=638300
This commit is contained in:
Vincent Penquerc'h 2011-08-25 23:37:47 +01:00 committed by Sebastian Dröge
parent f3fc3e1f69
commit 3968dc7688

View file

@ -236,13 +236,11 @@ gst_v4l2src_set_capture (GstV4l2Src * v4l2src, guint32 pixelformat,
goto done;
}
/* Note: V4L2 provides the frame interval, we have the frame rate */
if (gst_util_fraction_compare (stream.parm.capture.timeperframe.numerator,
stream.parm.capture.timeperframe.denominator, fps_d, fps_n) == 0) {
GST_DEBUG_OBJECT (v4l2src, "Desired framerate already set");
goto already_set;
}
/* We used to skip frame rate setup if the camera was already setup
with the requested frame rate. This breaks some cameras though,
causing them to not output data (several models of Thinkpad cameras
have this problem at least).
So, don't skip. */
/* We want to change the frame rate, so check whether we can. Some cheap USB
* cameras don't have the capability */
@ -265,8 +263,6 @@ gst_v4l2src_set_capture (GstV4l2Src * v4l2src, guint32 pixelformat,
goto done;
}
already_set:
v4l2src->fps_n = fps_n;
v4l2src->fps_d = fps_d;