mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
Fixed query size to work with drivers that uses intermediate step like "width * height" to find closest size.
Original commit message from CVS: Fixed query size to work with drivers that uses intermediate step like "width * height" to find closest size.
This commit is contained in:
parent
04895ee2ca
commit
dddd1369b8
2 changed files with 4 additions and 4 deletions
|
@ -399,8 +399,8 @@ gst_v4l2src_fixate (GstPad * pad, GstCaps * caps)
|
||||||
structure = gst_caps_get_structure (caps, i);
|
structure = gst_caps_get_structure (caps, i);
|
||||||
const GValue *v;
|
const GValue *v;
|
||||||
|
|
||||||
gst_structure_fixate_field_nearest_int (structure, "width", G_MAXINT);
|
gst_structure_fixate_field_nearest_int (structure, "width", 4096);
|
||||||
gst_structure_fixate_field_nearest_int (structure, "height", G_MAXINT);
|
gst_structure_fixate_field_nearest_int (structure, "height", 4096);
|
||||||
gst_structure_fixate_field_nearest_fraction (structure, "framerate", 15, 2);
|
gst_structure_fixate_field_nearest_fraction (structure, "framerate", 15, 2);
|
||||||
|
|
||||||
v = gst_structure_get_value (structure, "format");
|
v = gst_structure_get_value (structure, "format");
|
||||||
|
|
|
@ -592,8 +592,8 @@ gst_v4l2src_get_size_limits (GstV4l2Src * v4l2src,
|
||||||
GST_LOG_OBJECT (v4l2src, "got min size %dx%d", fmt.fmt.pix.width,
|
GST_LOG_OBJECT (v4l2src, "got min size %dx%d", fmt.fmt.pix.width,
|
||||||
fmt.fmt.pix.height);
|
fmt.fmt.pix.height);
|
||||||
|
|
||||||
fmt.fmt.pix.width = G_MAXINT;
|
fmt.fmt.pix.width = 4096;
|
||||||
fmt.fmt.pix.height = G_MAXINT;
|
fmt.fmt.pix.height = 4096;
|
||||||
if (ioctl (v4l2src->v4l2object->video_fd, VIDIOC_TRY_FMT, &fmt) < 0) {
|
if (ioctl (v4l2src->v4l2object->video_fd, VIDIOC_TRY_FMT, &fmt) < 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue