mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
v4l2src: fix pads, so that they are subset of template caps
Do not add w=0 | h=0. When we can't get a framerate add fraction range.
This commit is contained in:
parent
636cd65ebf
commit
f86b485f3b
1 changed files with 9 additions and 4 deletions
|
@ -749,6 +749,9 @@ return_data:
|
|||
* value */
|
||||
gst_structure_set_value (s, "framerate", &rates);
|
||||
g_value_unset (&rates);
|
||||
} else {
|
||||
gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1,
|
||||
NULL);
|
||||
}
|
||||
return s;
|
||||
|
||||
|
@ -817,11 +820,13 @@ gst_v4l2src_probe_caps_for_format (GstV4l2Src * v4l2src, guint32 pixelformat,
|
|||
w = MIN (size.discrete.width, G_MAXINT);
|
||||
h = MIN (size.discrete.height, G_MAXINT);
|
||||
|
||||
tmp = gst_v4l2src_probe_caps_for_format_and_size (v4l2src, pixelformat,
|
||||
w, h, template);
|
||||
if (w && h) {
|
||||
tmp = gst_v4l2src_probe_caps_for_format_and_size (v4l2src, pixelformat,
|
||||
w, h, template);
|
||||
|
||||
if (tmp)
|
||||
results = g_list_prepend (results, tmp);
|
||||
if (tmp)
|
||||
results = g_list_prepend (results, tmp);
|
||||
}
|
||||
|
||||
size.index++;
|
||||
} while (v4l2_ioctl (fd, VIDIOC_ENUM_FRAMESIZES, &size) >= 0);
|
||||
|
|
Loading…
Reference in a new issue