From d00cfd7d61d0a9cf2b38a816bfd5478f3342a0e4 Mon Sep 17 00:00:00 2001 From: "hans@localhost.localdomain" Date: Wed, 3 Sep 2008 14:24:30 +0200 Subject: libv4l: Prefer compressed pixformats for resolutions > 176x144 From: Hans de Goede libv4l: Prefer compressed pixformats for resolutions > 176x144 Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/lib/libv4l/libv4l2/libv4l2.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'v4l2-apps/lib/libv4l/libv4l2/libv4l2.c') diff --git a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c index 7029f69c3..937c06cce 100644 --- a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c +++ b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c @@ -739,6 +739,17 @@ int v4l2_ioctl (int fd, unsigned long int request, ...) if (result) break; + if (src_fmt.fmt.pix.pixelformat != dest_fmt->fmt.pix.pixelformat && + v4l2_log_file) { + int pixfmt = src_fmt.fmt.pix.pixelformat; + + fprintf(v4l2_log_file, "VIDIOC_S_FMT converting from: %c%c%c%c\n", + pixfmt & 0xff, + (pixfmt >> 8) & 0xff, + (pixfmt >> 16) & 0xff, + pixfmt >> 24); + } + /* Maybe after try format has adjusted width/height etc, to whats available nothing has changed (on the cam side) ? */ if (!memcmp(&devices[index].src_fmt, &src_fmt, sizeof(src_fmt))) { -- cgit v1.2.3 From 37365f711151fceee2bbc87ef7836c5f08b7c1f1 Mon Sep 17 00:00:00 2001 From: "hans@localhost.localdomain" Date: Mon, 15 Sep 2008 13:48:21 +0200 Subject: libv4l: 0.5.0 release From: Hans de Goede * Add support for enumerating framesizes and frameintervals of emulated formats when the driver supports it for the real format * Make sure the video device always gets opened RW even if the application asks for RO * Add Genius E-Messenger 112 (093a:2476) to list of cams which have their sensor upside down Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/lib/libv4l/libv4l2/libv4l2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'v4l2-apps/lib/libv4l/libv4l2/libv4l2.c') diff --git a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c index 937c06cce..b4a10afac 100644 --- a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c +++ b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c @@ -649,6 +649,11 @@ int v4l2_ioctl (int fd, unsigned long int request, ...) (devices[index].flags & V4L2_ENABLE_ENUM_FMT_EMULATION)) is_capture_request = 1; break; + case VIDIOC_ENUM_FRAMESIZES: + case VIDIOC_ENUM_FRAMEINTERVALS: + if (devices[index].flags & V4L2_ENABLE_ENUM_FMT_EMULATION) + is_capture_request = 1; + break; case VIDIOC_TRY_FMT: if (((struct v4l2_format *)arg)->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) is_capture_request = 1; @@ -714,6 +719,14 @@ int v4l2_ioctl (int fd, unsigned long int request, ...) result = v4lconvert_enum_fmt(devices[index].convert, arg); break; + case VIDIOC_ENUM_FRAMESIZES: + result = v4lconvert_enum_framesizes(devices[index].convert, arg); + break; + + case VIDIOC_ENUM_FRAMEINTERVALS: + result = v4lconvert_enum_frameintervals(devices[index].convert, arg); + break; + case VIDIOC_TRY_FMT: result = v4lconvert_try_format(devices[index].convert, arg, NULL); break; -- cgit v1.2.3