Commit a597c1d4 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

sys/v4l2/v4l2src_calls.c: but the corresponding ioctl() call fails even though...

sys/v4l2/v4l2src_calls.c: but the corresponding ioctl() call fails even though the driver claims to support this form...

Original commit message from CVS:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format):
If VIDIOC_ENUM_FRAMESIZES is defined (= recent kernel), but the
corresponding ioctl() call fails even though the driver claims to
support this format, just fall back to the pre-2.6.19 kernel
routine that creates caps with suitable height and width ranges
(see #448278).
parent 711afebc
2007-11-13 Tim-Philipp Müller <tim at centricular dot net>
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format):
If VIDIOC_ENUM_FRAMESIZES is defined (= recent kernel), but the
corresponding ioctl() call fails even though the driver claims to
support this format, just fall back to the pre-2.6.19 kernel
routine that creates caps with suitable height and width ranges
(see #448278).
2007-11-13 Tim-Philipp Müller <tim at centricular dot net>
 
Patch by: Mark Nauwelaerts <manauw skynet be>
......
......@@ -810,6 +810,9 @@ gst_v4l2src_probe_caps_for_format (GstV4l2Src * v4l2src, guint32 pixelformat,
results = g_list_delete_link (results, results);
}
if (gst_caps_is_empty (ret))
goto enum_framesizes_no_results;
return ret;
/* ERRORS */
......@@ -821,6 +824,15 @@ enum_framesizes_failed:
" (%s)", GST_FOURCC_ARGS (pixelformat), g_strerror (errno));
goto default_frame_sizes;
}
enum_framesizes_no_results:
{
/* it's possible that VIDIOC_ENUM_FRAMESIZES is defined but the driver in
* question doesn't actually support it yet */
GST_DEBUG_OBJECT (v4l2src, "No results for pixelformat %" GST_FOURCC_FORMAT
" enumerating frame sizes, trying fallback",
GST_FOURCC_ARGS (pixelformat));
goto default_frame_sizes;
}
unknown_type:
{
GST_WARNING_OBJECT (v4l2src,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment