+2008-08-12 Edward Hervey <edward.hervey@collabora.co.uk>
+
+ * sys/v4l2/gstv4l2src.c: (gst_v4l2src_query):
+ Add warning messages stating exactly why the latency query failed.
+ * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture):
+ In some cases, the negotiated framerate might be the default one which
+ is already set internally. But we still need to mark it down in fps_n
+ and fps_d so that the latency query can happen properly.
+
2008-08-12 Edward Hervey <edward.hervey@collabora.co.uk>
* docs/plugins/inspect/plugin-1394.xml:
GstClockTime min_latency, max_latency;
/* device must be open */
- if (!GST_V4L2_IS_OPEN (src->v4l2object))
+ if (!GST_V4L2_IS_OPEN (src->v4l2object)) {
+ GST_WARNING_OBJECT (src,
+ "Can't give latency since device isn't open !");
goto done;
+ }
/* we must have a framerate */
- if (src->fps_n <= 0 || src->fps_d <= 0)
+ if (src->fps_n <= 0 || src->fps_d <= 0) {
+ GST_WARNING_OBJECT (src,
+ "Can't give latency since framerate isn't fixated !");
goto done;
+ }
/* min latency is the time to capture one frame */
min_latency =
/* Note: V4L2 provides the frame interval, we have the frame rate */
if (fractions_are_equal (stream.parm.capture.timeperframe.numerator,
stream.parm.capture.timeperframe.denominator, fps_d, fps_n)) {
- GST_LOG_OBJECT (v4l2src, "Desired framerate already set, nothing to do");
+ GST_LOG_OBJECT (v4l2src, "Desired framerate already set");
+ v4l2src->fps_n = fps_n;
+ v4l2src->fps_d = fps_d;
goto done;
}