From ab715d2e8eb29998b60fa3bbc1ad95441cfb69b3 Mon Sep 17 00:00:00 2001 From: Thierry MERLE Date: Sun, 6 Jul 2008 14:07:34 +0200 Subject: v4l2-library: libv4l-sync-with-0.3.3-release From: Hans de Goede * Add open64 and mmap64 wrappers to the LD_PRELOAD wrapper libs, so that they also work for applications compiled with FILE_OFFSET_BITS=64, this fixes using them with v4l-info * While looking at xawtv in general, found a few bugs in xawtv itself, added a patch to fix those to the appl-patches dir * Talking about the appl-patches dir, restore that as it accidentally got dropped from 0.3.2 * Be more verbose in various places when it comes to logging (esp errors) * Change v4lconvert_enum_fmt code a bit, so that it is easier to add more supported destination formats to libv4lconvert * Don't return -EINVAL from try_fmt when we cannot convert because the cam doesn't have any formats we know. Instead just return as format whatever the cam returns from try_fmt, this new behavior is compliant with the v4l2 api as documented Signed-off-by: Hans de Goede Signed-off-by: Thierry MERLE --- .../lib/libv4l/appl-patches/xawtv-3.95-fixes.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 v4l2-apps/lib/libv4l/appl-patches/xawtv-3.95-fixes.patch (limited to 'v4l2-apps/lib/libv4l/appl-patches/xawtv-3.95-fixes.patch') diff --git a/v4l2-apps/lib/libv4l/appl-patches/xawtv-3.95-fixes.patch b/v4l2-apps/lib/libv4l/appl-patches/xawtv-3.95-fixes.patch new file mode 100644 index 000000000..ccb077be0 --- /dev/null +++ b/v4l2-apps/lib/libv4l/appl-patches/xawtv-3.95-fixes.patch @@ -0,0 +1,29 @@ +--- xawtv-3.95/libng/plugins/drv0-v4l2.c 2005-02-11 18:56:24.000000000 +0100 ++++ xawtv-3.95.new/libng/plugins/drv0-v4l2.c 2008-07-05 21:12:37.000000000 +0200 +@@ -161,7 +161,7 @@ + #define PREFIX "ioctl: " + + static int +-xioctl(int fd, int cmd, void *arg, int mayfail) ++xioctl(int fd, unsigned long int cmd, void *arg, int mayfail) + { + int rc; + +@@ -768,6 +768,7 @@ + /* get it */ + memset(&buf,0,sizeof(buf)); + buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ buf.memory = V4L2_MEMORY_MMAP; + if (-1 == xioctl(h->fd,VIDIOC_DQBUF,&buf, 0)) + return -1; + h->waiton++; +@@ -813,8 +814,7 @@ + if (-1 == xioctl(h->fd, VIDIOC_QUERYBUF, &h->buf_v4l2[i], 0)) + return -1; + h->buf_me[i].fmt = h->fmt_me; +- h->buf_me[i].size = h->buf_me[i].fmt.bytesperline * +- h->buf_me[i].fmt.height; ++ h->buf_me[i].size = h->buf_v4l2[i].length; + h->buf_me[i].data = mmap(NULL, h->buf_v4l2[i].length, + PROT_READ | PROT_WRITE, MAP_SHARED, + h->fd, h->buf_v4l2[i].m.offset); -- cgit v1.2.3