diff options
author | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-03-11 13:06:14 +0100 |
---|---|---|
committer | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-03-11 13:06:14 +0100 |
commit | 222cbd6fd0bec2c2e4566a251729f1329e031a22 (patch) | |
tree | d788833d126a894b444e222123600d5d4cb01ec1 /v4l2-apps/libv4l/libv4l2 | |
parent | 24ef92f0974bf26cf8ca949b7ae21286cbca3fd3 (diff) | |
download | mediapointer-dvb-s2-222cbd6fd0bec2c2e4566a251729f1329e031a22.tar.gz mediapointer-dvb-s2-222cbd6fd0bec2c2e4566a251729f1329e031a22.tar.bz2 |
libv4l: Add software cropping from CIF to VGA modes (fix skype)
From: Hans de Goede <hdegoede@redhat.com>
* Add support for software cropping from 352x288 -> 320x240 / 176x144 ->
160x120, so that apps which will only work with vga resolutions like
320x240 (Skype!) will work with cams/drivers which do not support cropping
CIF resolutions to VGA resolutions in hardware. This makes all 2.6.27 gspca
supported cams, except for the pac7302 which only does 640x480 (and skype
wants 320x240), work with skype
* The v4lconvert_convert function was becoming a bit of a mess, so split the
functionailiy into seperate v4lconvert_convert_pixfmt, v4lconvert_rotate and
v4lconvert_crop functions, and make v4lconvert_convert a frontend to
these
Priority: normal
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4l2')
-rw-r--r-- | v4l2-apps/libv4l/libv4l2/libv4l2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/v4l2-apps/libv4l/libv4l2/libv4l2.c b/v4l2-apps/libv4l/libv4l2/libv4l2.c index b4a10afac..0a05623cb 100644 --- a/v4l2-apps/libv4l/libv4l2/libv4l2.c +++ b/v4l2-apps/libv4l/libv4l2/libv4l2.c @@ -740,6 +740,16 @@ int v4l2_ioctl (int fd, unsigned long int request, ...) break; } + if (v4l2_log_file) { + int pixfmt = dest_fmt->fmt.pix.pixelformat; + + fprintf(v4l2_log_file, "VIDIOC_S_FMT app requesting: %c%c%c%c\n", + pixfmt & 0xff, + (pixfmt >> 8) & 0xff, + (pixfmt >> 16) & 0xff, + pixfmt >> 24); + } + if (devices[index].flags & V4L2_DISABLE_CONVERSION) { result = syscall(SYS_ioctl, devices[index].fd, VIDIOC_TRY_FMT, dest_fmt); |