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') 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