summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h
diff options
context:
space:
mode:
authorThierry MERLE <thierry.merle@free.fr>2008-07-06 14:07:34 +0200
committerThierry MERLE <thierry.merle@free.fr>2008-07-06 14:07:34 +0200
commitab715d2e8eb29998b60fa3bbc1ad95441cfb69b3 (patch)
tree78731a6290210dba267ee4f6f3655659334835d4 /v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h
parentc1a4267284bcd81240221187f5a16454f36ba02e (diff)
downloadmediapointer-dvb-s2-ab715d2e8eb29998b60fa3bbc1ad95441cfb69b3.tar.gz
mediapointer-dvb-s2-ab715d2e8eb29998b60fa3bbc1ad95441cfb69b3.tar.bz2
v4l2-library: libv4l-sync-with-0.3.3-release
From: Hans de Goede <j.w.r.degoede@hhs.nl> * 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 <j.w.r.degoede@hhs.nl> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h')
-rw-r--r--v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h b/v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h
index e4edf91f2..203dcffaf 100644
--- a/v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h
+++ b/v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h
@@ -23,6 +23,15 @@
#include <pthread.h>
#include <libv4lconvert.h> /* includes videodev2.h for us */
+/* On 32 bits archs we always use mmap2, on 64 bits archs there is no mmap2 */
+#ifdef __NR_mmap2
+#define SYS_mmap2 __NR_mmap2
+#define MMAP2_PAGE_SHIFT 12
+#else
+#define SYS_mmap2 SYS_mmap
+#define MMAP2_PAGE_SHIFT 0
+#endif
+
#define V4L2_MAX_DEVICES 16
/* Warning when making this larger the frame_queued and frame_mapped members of
the v4l2_dev_info struct can no longer be a bitfield, so the code needs to