diff options
author | Edgard Lima <edgard.lima@indt.org.br> | 2006-08-22 20:39:26 +0000 |
---|---|---|
committer | Edgard Lima <edgard.lima@indt.org.br> | 2006-08-22 20:39:26 +0000 |
commit | d3c716b694b065ca6884499cb75f808f21a07f26 (patch) | |
tree | 65c6a4005121567ba1461a4a7179baeb620c7284 | |
parent | 5fc2b326081d07e12c128896667829c45aeb7ea0 (diff) | |
download | gst-plugins-bad-d3c716b694b065ca6884499cb75f808f21a07f26.tar.gz gst-plugins-bad-d3c716b694b065ca6884499cb75f808f21a07f26.tar.bz2 gst-plugins-bad-d3c716b694b065ca6884499cb75f808f21a07f26.zip |
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.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 4 | ||||
-rw-r--r-- | sys/v4l2/v4l2src_calls.c | 4 |
3 files changed, 11 insertions, 4 deletions
@@ -1,3 +1,10 @@ +2006-08-22 Edgard Lima <edgard.lima@indt.org.br> + + * sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_size_limits) + * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_fixate) + Fixed query size to work with drivers that uses intermediate step + like "width * height" to find closest size. + 2006-08-21 Thomas Vander Stichele <thomas at apestaart dot org> * configure.ac: diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 39e35cbe..bf8a2dd4 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -399,8 +399,8 @@ gst_v4l2src_fixate (GstPad * pad, GstCaps * caps) structure = gst_caps_get_structure (caps, i); const GValue *v; - gst_structure_fixate_field_nearest_int (structure, "width", G_MAXINT); - gst_structure_fixate_field_nearest_int (structure, "height", G_MAXINT); + gst_structure_fixate_field_nearest_int (structure, "width", 4096); + gst_structure_fixate_field_nearest_int (structure, "height", 4096); gst_structure_fixate_field_nearest_fraction (structure, "framerate", 15, 2); v = gst_structure_get_value (structure, "format"); diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c index f50c6478..2f46facf 100644 --- a/sys/v4l2/v4l2src_calls.c +++ b/sys/v4l2/v4l2src_calls.c @@ -592,8 +592,8 @@ gst_v4l2src_get_size_limits (GstV4l2Src * v4l2src, GST_LOG_OBJECT (v4l2src, "got min size %dx%d", fmt.fmt.pix.width, fmt.fmt.pix.height); - fmt.fmt.pix.width = G_MAXINT; - fmt.fmt.pix.height = G_MAXINT; + fmt.fmt.pix.width = 4096; + fmt.fmt.pix.height = 4096; if (ioctl (v4l2src->v4l2object->video_fd, VIDIOC_TRY_FMT, &fmt) < 0) { return FALSE; } |