summaryrefslogtreecommitdiff
path: root/v4l2-apps
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-06-17 14:56:29 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-06-17 14:56:29 +0200
commit7a7d2c3791928d88ef83f28a7d1fd3095f0bb459 (patch)
tree66017e177165ec7d7b93d00247445f7be58f13f4 /v4l2-apps
parentb530bfbf669215b30f2821355ffdb9f7c4b161b6 (diff)
downloadmediapointer-dvb-s2-7a7d2c3791928d88ef83f28a7d1fd3095f0bb459.tar.gz
mediapointer-dvb-s2-7a7d2c3791928d88ef83f28a7d1fd3095f0bb459.tar.bz2
libv4l1: Use v4l2_ioctl when determining min/max size
From: Hans de Goede <hdegoede@redhat.com> Use v4l2_ioctl instead of native ioctl's when finding out what the minimum / maximum size is, so that we take the resolution aligment done by libv4l2 into account for the minimum / maximum size. Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps')
-rw-r--r--v4l2-apps/libv4l/libv4l1/libv4l1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/v4l2-apps/libv4l/libv4l1/libv4l1.c b/v4l2-apps/libv4l/libv4l1/libv4l1.c
index b676d69ed..4d251a481 100644
--- a/v4l2-apps/libv4l/libv4l1/libv4l1.c
+++ b/v4l2-apps/libv4l/libv4l1/libv4l1.c
@@ -219,14 +219,14 @@ static void v4l1_find_min_and_max_size(int index, struct v4l2_format *fmt2)
for (i = 0; ; i++) {
fmtdesc2.index = i;
- if (SYS_IOCTL(devices[index].fd, VIDIOC_ENUM_FMT, &fmtdesc2))
+ if (v4l2_ioctl(devices[index].fd, VIDIOC_ENUM_FMT, &fmtdesc2))
break;
fmt2->fmt.pix.pixelformat = fmtdesc2.pixelformat;
fmt2->fmt.pix.width = 48;
fmt2->fmt.pix.height = 32;
- if (SYS_IOCTL(devices[index].fd, VIDIOC_TRY_FMT, fmt2) == 0) {
+ if (v4l2_ioctl(devices[index].fd, VIDIOC_TRY_FMT, fmt2) == 0) {
if (fmt2->fmt.pix.width < devices[index].min_width)
devices[index].min_width = fmt2->fmt.pix.width;
if (fmt2->fmt.pix.height < devices[index].min_height)
@@ -237,7 +237,7 @@ static void v4l1_find_min_and_max_size(int index, struct v4l2_format *fmt2)
fmt2->fmt.pix.width = 100000;
fmt2->fmt.pix.height = 100000;
- if (SYS_IOCTL(devices[index].fd, VIDIOC_TRY_FMT, fmt2) == 0) {
+ if (v4l2_ioctl(devices[index].fd, VIDIOC_TRY_FMT, fmt2) == 0) {
if (fmt2->fmt.pix.width > devices[index].max_width)
devices[index].max_width = fmt2->fmt.pix.width;
if (fmt2->fmt.pix.height > devices[index].max_height)