summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c
diff options
context:
space:
mode:
authorhans@localhost.localdomain <hans@localhost.localdomain>2008-09-03 14:24:30 +0200
committerhans@localhost.localdomain <hans@localhost.localdomain>2008-09-03 14:24:30 +0200
commitd00cfd7d61d0a9cf2b38a816bfd5478f3342a0e4 (patch)
tree2ed689b61d990bd4731882c26d87f0430a612d93 /v4l2-apps/lib/libv4l/libv4l2/libv4l2.c
parentfd1a54135c2d7959bf7b78cada95ee9152eedf41 (diff)
downloadmediapointer-dvb-s2-d00cfd7d61d0a9cf2b38a816bfd5478f3342a0e4.tar.gz
mediapointer-dvb-s2-d00cfd7d61d0a9cf2b38a816bfd5478f3342a0e4.tar.bz2
libv4l: Prefer compressed pixformats for resolutions > 176x144
From: Hans de Goede <j.w.r.degoede@hhs.nl> libv4l: Prefer compressed pixformats for resolutions > 176x144 Priority: normal Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l2/libv4l2.c')
-rw-r--r--v4l2-apps/lib/libv4l/libv4l2/libv4l2.c11
1 files changed, 11 insertions, 0 deletions
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))) {