summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitrios Katsaros <patcherwork@gmail.com>2015-07-24 15:10:05 +0200
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2015-07-25 10:40:51 -0400
commita55b9060f8956fd41b6400d18fbda77c99260c66 (patch)
treeb126dd84fc82bb6e71ed18190bdbeb1e5f936316
parent7917bea855307da5b9fc515f581c0197c3903845 (diff)
v4l2: Allow framerate to be large then 100pfs
This limit was arbitrary. We still fixate near 100pfs for compatibility. https://bugzilla.gnome.org/show_bug.cgi?id=752825
-rw-r--r--sys/v4l2/gstv4l2object.c10
-rw-r--r--sys/v4l2/gstv4l2src.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index d60a66540..17847e69f 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -1336,7 +1336,7 @@ gst_v4l2_object_v4l2fourcc_to_structure (guint32 fourcc)
gst_structure_set (template,
"width", GST_TYPE_INT_RANGE, 1, GST_V4L2_MAX_SIZE,
"height", GST_TYPE_INT_RANGE, 1, GST_V4L2_MAX_SIZE,
- "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, NULL);
+ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
}
break;
}
@@ -1369,7 +1369,7 @@ gst_v4l2_object_get_caps_helper (GstV4L2FormatFlags flags)
gst_structure_set (structure,
"width", GST_TYPE_INT_RANGE, 1, GST_V4L2_MAX_SIZE,
"height", GST_TYPE_INT_RANGE, 1, GST_V4L2_MAX_SIZE,
- "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, NULL);
+ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
}
switch (gst_v4l2_formats[i].format) {
@@ -2146,8 +2146,8 @@ return_data:
gst_structure_take_value (s, "framerate", &rates);
} else if (v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE ||
v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
- gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1,
- NULL);
+ gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT,
+ 1, NULL);
}
return s;
@@ -2444,7 +2444,7 @@ default_frame_sizes:
v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
/* if norm can't be used, copy the template framerate */
gst_structure_set (tmp, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
- 100, 1, NULL);
+ G_MAXINT, 1, NULL);
}
if (min_w == max_w)
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index 633e46fb6..e8bfb187a 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -270,7 +270,7 @@ gst_v4l2src_fixate (GstBaseSrc * basesrc, GstCaps * caps)
if (gst_structure_has_field (structure, "framerate"))
gst_structure_fixate_field_nearest_fraction (structure, "framerate",
- G_MAXINT, 1);
+ 100, 1);
if (gst_structure_has_field (structure, "format"))
gst_structure_fixate_field (structure, "format");