diff options
author | Koop Mast <kwm@FreeBSD.org> | 2015-06-14 04:59:37 +0000 |
---|---|---|
committer | Koop Mast <kwm@FreeBSD.org> | 2015-06-14 04:59:37 +0000 |
commit | 636dab0705fda62735af1c32cfd0044e7411d00b (patch) | |
tree | e28f69d965fffbb0ca82d5ddafa17b411ba2eeed /multimedia/libv4l | |
parent | - Upgrade to 0.36. (diff) |
Update libv4l and friends to 1.6.3.
Turn v4l-util and v4l_compat into slave ports.
"Steal" the dvb headers from linux 3.16.7 and roll them into a tarball.
Assign maintainership to multimedia@
Differential Revision: https://reviews.freebsd.org/D1482
Approved by: nox@, hslasky@, kwm@ (multimedia@)
Notes
Notes:
svn path=/head/; revision=389588
Diffstat (limited to 'multimedia/libv4l')
-rw-r--r-- | multimedia/libv4l/Makefile | 79 | ||||
-rw-r--r-- | multimedia/libv4l/distinfo | 6 | ||||
-rw-r--r-- | multimedia/libv4l/files/extra-linux_dvb_ca.h | 20 | ||||
-rw-r--r-- | multimedia/libv4l/files/extra-linux_dvb_osd.h | 11 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-Make.rules | 26 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-configure | 11 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-include_libv4l1-videodev.h | 18 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-include_linux_dvb_frontend.h | 17 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-include_linux_dvb_video.h | 11 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-lib_Makefile.in | 13 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-lib_libv4lconvert_control_libv4lcontrol.c (renamed from multimedia/libv4l/files/patch-libv4lconvert_control_libv4lcontrol.c) | 21 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-utils_Makefile.in | 11 | ||||
-rw-r--r-- | multimedia/libv4l/files/patch-utils_v4l2-ctl_v4l2-ctl.cpp | 54 | ||||
-rw-r--r-- | multimedia/libv4l/files/videodev.h | 340 | ||||
-rw-r--r-- | multimedia/libv4l/pkg-plist | 64 |
15 files changed, 620 insertions, 82 deletions
diff --git a/multimedia/libv4l/Makefile b/multimedia/libv4l/Makefile index f2b73c661743..9b14fa02c618 100644 --- a/multimedia/libv4l/Makefile +++ b/multimedia/libv4l/Makefile @@ -1,32 +1,73 @@ # Created by: Andrew Thompson <thompsa@FreeBSD.org> # $FreeBSD$ +# Check v4l_compat and v4l-utils slave ports -PORTNAME= libv4l -PORTVERSION= 0.8.8 -PORTREVISION= 2 +PORTNAME?= libv4l +PORTVERSION= 1.6.3 +PORTREVISION?= 0 CATEGORIES= multimedia -MASTER_SITES= http://linuxtv.org/downloads/v4l-utils/ -DISTNAME= v4l-utils-${PORTVERSION} +MASTER_SITES= http://linuxtv.org/downloads/v4l-utils/:master \ + LOCAL/kwm:local +DISTFILES+= v4l-utils-${PORTVERSION}.tar.bz2:master \ + linux-3.16.7-dvb-headers.tar.xz:local -MAINTAINER= hselasky@FreeBSD.org -COMMENT= Video4Linux library +MAINTAINER= multimedia@FreeBSD.org +COMMENT?= Video4Linux library -BUILD_DEPENDS= v4l_compat>=1.0.20120501:${PORTSDIR}/multimedia/v4l_compat -LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg +LICENSE= GPLv2 LGPL21 +LICENSE_COMB= dual -MAKE_ARGS= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" LIBDIR="${PREFIX}/lib" -USES= gmake tar:bzip2 +LIBV4L_SLAVE?= no + +USES= tar:bzip2 +WRKSRC= ${WRKDIR}/v4l-utils-${PORTVERSION} + +.if ${LIBV4L_SLAVE} != compat +BUILD_DEPENDS+= v4l_compat>=${PORTVERSION}:${PORTSDIR}/multimedia/v4l_compat +LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg \ + libargp.so:${PORTSDIR}/devel/argp-standalone + +GNU_CONFIGURE= yes +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +USES+= gmake libtool pathfix pkgconfig USE_LDCONFIG= yes +CONFIGURE_ARGS= --enable-libdvbv5 \ + --disable-qv4l2 \ + --without-libudev +INSTALL_TARGET= install-strip + +. if ${LIBV4L_SLAVE} == utils +BUILD_DEPENDS+= libv4l>=${PORTVERSION}:${PORTSDIR}/multimedia/libv4l +LIB_DEPENDS+= libv4l2.so:${PORTSDIR}/multimedia/libv4l +# Disabling building libv4l in the utils slave is too much hackery +# Lets wait for subpackages +CONFIGURE_ARGS+=--enable-v4l-utils +. else +CONFIGURE_ARGS+=--disable-v4l-utils --enable-libv4l +. endif +.endif -WRKSRC= ${WRKDIR}/${DISTNAME}/lib +HEADER_PATCHES= extra-linux_dvb_ca.h \ + extra-linux_dvb_osd.h \ + patch-include_linux_dvb_frontend.h \ + patch-include_linux_dvb_video.h post-patch: - @${REINPLACE_CMD} -e 's|$$(LIBDIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|g' \ - -e 's|-lrt||g' \ - ${WRKSRC}/libv4l1/Makefile \ - ${WRKSRC}/libv4l2/Makefile \ - ${WRKSRC}/libv4lconvert/Makefile - @${RM} ${WRKSRC}/../include/linux/videodev2.h + @${REINPLACE_CMD} -e 's|$$libdir/pkgconfig|${PREFIX}/libdata/pkgconfig|g' \ + ${WRKSRC}/configure +# fix weird types, except a few headers which have compat code for these types. + @${FIND} ${WRKDIR} -type f \( -iname "*.h" ! -iname "input.h" ! -iname "videodev2.h" \) | \ + ${XARGS} -n 10 ${REINPLACE_CMD} \ + -e 's|linux/types.h|sys/types.h|g; s|__user||g; \ + s|__u8|uint8_t|g; s|__s8|int8_t|g; \ + s|__u16|uint16_t|g; s|__s16|int16_t|g; \ + s|__u32|uint32_t|g; s|__s32|int32_t|g; \ + s|__u64|uint64_t|g; s|__s64|int64_t|g' +.if ${LIBV4L_SLAVE} == compat +.for patch in ${HEADER_PATCHES} + @cd ${WRKDIR}/linux && ${PATCH} -p2 < ${FILESDIR}/${patch} +.endfor +.endif .include <bsd.port.mk> diff --git a/multimedia/libv4l/distinfo b/multimedia/libv4l/distinfo index 987c1e3abebd..69a66754e59b 100644 --- a/multimedia/libv4l/distinfo +++ b/multimedia/libv4l/distinfo @@ -1,2 +1,4 @@ -SHA256 (v4l-utils-0.8.8.tar.bz2) = 5fa4c6f4b6f5410de57271a03cc9a15f15195ef3fc05a8e42ecf507d6d70a87f -SIZE (v4l-utils-0.8.8.tar.bz2) = 420888 +SHA256 (v4l-utils-1.6.3.tar.bz2) = 164abf5c1befcd27e8e6ef824a82d4015bdfb5d99ae82daa00e77d895ff9864c +SIZE (v4l-utils-1.6.3.tar.bz2) = 1151081 +SHA256 (linux-3.16.7-dvb-headers.tar.xz) = 0ee217b243d52b8104e6b61bbf009bf84155573317720f41930af0a9ef50cdaa +SIZE (linux-3.16.7-dvb-headers.tar.xz) = 11712 diff --git a/multimedia/libv4l/files/extra-linux_dvb_ca.h b/multimedia/libv4l/files/extra-linux_dvb_ca.h new file mode 100644 index 000000000000..d1352f6ed8f7 --- /dev/null +++ b/multimedia/libv4l/files/extra-linux_dvb_ca.h @@ -0,0 +1,20 @@ +--- ../linux/dvb/ca.h.orig 2014-12-01 10:58:18.000000000 +0100 ++++ ../linux/dvb/ca.h 2015-01-23 22:41:21.761540460 +0100 +@@ -80,9 +80,17 @@ + + #define CA_RESET _IO('o', 128) + #define CA_GET_CAP _IOR('o', 129, ca_caps_t) ++ ++/* At least CA_GET_SLOT_INFO and CA_GET_MSG need to be _IOWR not _IOR. ++ * This is wrong on Linux too but there the driver doesn't care. ++ * + #define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t) + #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t) + #define CA_GET_MSG _IOR('o', 132, ca_msg_t) ++ */ ++#define CA_GET_SLOT_INFO _IOWR('o', 130, ca_slot_info_t) ++#define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t) ++#define CA_GET_MSG _IOWR('o', 132, ca_msg_t) + #define CA_SEND_MSG _IOW('o', 133, ca_msg_t) + #define CA_SET_DESCR _IOW('o', 134, ca_descr_t) + #define CA_SET_PID _IOW('o', 135, ca_pid_t) diff --git a/multimedia/libv4l/files/extra-linux_dvb_osd.h b/multimedia/libv4l/files/extra-linux_dvb_osd.h new file mode 100644 index 000000000000..55d9806c0c39 --- /dev/null +++ b/multimedia/libv4l/files/extra-linux_dvb_osd.h @@ -0,0 +1,11 @@ +--- ../linux/dvb/osd.h.bak 2014-12-01 10:58:18.000000000 +0100 ++++ ../linux/dvb/osd.h 2015-01-24 00:12:54.252160592 +0100 +@@ -24,7 +24,7 @@ + #ifndef _DVBOSD_H_ + #define _DVBOSD_H_ + +-#include <linux/compiler.h> ++#include <sys/types.h> + + typedef enum { + // All functions return -2 on "not open" diff --git a/multimedia/libv4l/files/patch-Make.rules b/multimedia/libv4l/files/patch-Make.rules deleted file mode 100644 index 23ed35a13bef..000000000000 --- a/multimedia/libv4l/files/patch-Make.rules +++ /dev/null @@ -1,26 +0,0 @@ ---- ../Make.rules.orig 2010-08-26 17:19:37.000000000 +0200 -+++ ../Make.rules 2010-11-04 20:26:22.000000000 +0100 -@@ -7,8 +7,8 @@ CFLAGS += -Wall -Wpointer-arith - CXXFLAGS := $(CFLAGS) - CFLAGS += -Wstrict-prototypes -Wmissing-prototypes - --PREFIX = /usr/local --LIBDIR = $(PREFIX)/lib -+PREFIX ?= /usr/local -+LIBDIR ?= $(PREFIX)/lib - # subdir below LIBDIR in which to install the libv4lx libc wrappers - LIBSUBDIR = libv4l - -@@ -22,10 +22,10 @@ LIB_RELEASE = 0 - # And last various rules - - %.o: %.c -- $(CC) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -+ $(CC) -MMD -MF "$*.d" -MQ "$@" -MP -c $(CPPFLAGS) $(CFLAGS) -o $@ $< - - %.o: %.cpp -- $(CXX) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< -+ $(CXX) -MMD -MF "$*.d" -MQ "$@" -MP -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< - - %.so: - $(CC) -shared $(LDFLAGS) -Wl,-soname,$@.$(LIB_RELEASE) -o $@.$(LIB_RELEASE) $^ $(LIBS_$*) diff --git a/multimedia/libv4l/files/patch-configure b/multimedia/libv4l/files/patch-configure new file mode 100644 index 000000000000..88cb70f21836 --- /dev/null +++ b/multimedia/libv4l/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig 2015-01-25 19:42:02.248041140 +0100 ++++ configure 2015-01-25 19:42:14.503036421 +0100 +@@ -19876,7 +19876,7 @@ + WITH_LIBV4L_FALSE= + fi + +- if test x$enable_v4l_utils != xno -a x$linux_os = xyes; then ++ if test x$enable_v4l_utils != xno; then + WITH_V4LUTILS_TRUE= + WITH_V4LUTILS_FALSE='#' + else diff --git a/multimedia/libv4l/files/patch-include_libv4l1-videodev.h b/multimedia/libv4l/files/patch-include_libv4l1-videodev.h deleted file mode 100644 index c63ef5c1e4ce..000000000000 --- a/multimedia/libv4l/files/patch-include_libv4l1-videodev.h +++ /dev/null @@ -1,18 +0,0 @@ -diff -ru v4l-utils-0.8.4.orig/lib/include/libv4l1-videodev.h v4l-utils-0.8.4/lib/include/libv4l1-videodev.h ---- include/libv4l1-videodev.h 2011-06-27 09:52:38.000000000 +0200 -+++ include/libv4l1-videodev.h 2011-06-27 09:55:51.000000000 +0200 -@@ -2,7 +2,14 @@ - #ifndef __LINUX_VIDEODEV_H - #define __LINUX_VIDEODEV_H - -+#ifdef linux - #include <linux/ioctl.h> -+#endif -+ -+#ifdef __FreeBSD__ -+#include <sys/ioctl.h> -+#endif -+ - #include <stdint.h> - - #define VID_TYPE_CAPTURE 1 /* Can capture */ diff --git a/multimedia/libv4l/files/patch-include_linux_dvb_frontend.h b/multimedia/libv4l/files/patch-include_linux_dvb_frontend.h new file mode 100644 index 000000000000..bb9b61dfe278 --- /dev/null +++ b/multimedia/libv4l/files/patch-include_linux_dvb_frontend.h @@ -0,0 +1,17 @@ +--- include/linux/dvb/frontend.h.orig 2015-01-10 15:04:07.446370686 +0100 ++++ include/linux/dvb/frontend.h 2015-01-10 15:05:20.367365809 +0100 +@@ -549,7 +549,13 @@ + }; + + #define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties) +-#define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties) ++/* ++ * This is broken on linux as well but they workaround it in the driver. ++ * Since this is impossible to do on FreeBSD fix the header instead. ++ * Detailed and discussion : ++ * http://lists.freebsd.org/pipermail/freebsd-multimedia/2010-April/010958.html ++ */ ++#define FE_GET_PROPERTY _IOW('o', 83, struct dtv_properties) + + + /** diff --git a/multimedia/libv4l/files/patch-include_linux_dvb_video.h b/multimedia/libv4l/files/patch-include_linux_dvb_video.h new file mode 100644 index 000000000000..eb05f38fb57f --- /dev/null +++ b/multimedia/libv4l/files/patch-include_linux_dvb_video.h @@ -0,0 +1,11 @@ +--- include/linux/dvb/video.h.orig 2015-01-10 15:05:58.438363362 +0100 ++++ include/linux/dvb/video.h 2015-01-10 15:06:25.350361374 +0100 +@@ -133,7 +133,7 @@ + #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 + #define VIDEO_EVENT_DECODER_STOPPED 3 + #define VIDEO_EVENT_VSYNC 4 +- __kernel_time_t timestamp; ++ struct timespec timestamp; + union { + video_size_t size; + unsigned int frame_rate; /* in frames per 1000sec */ diff --git a/multimedia/libv4l/files/patch-lib_Makefile.in b/multimedia/libv4l/files/patch-lib_Makefile.in new file mode 100644 index 000000000000..e70776250578 --- /dev/null +++ b/multimedia/libv4l/files/patch-lib_Makefile.in @@ -0,0 +1,13 @@ +--- lib/Makefile.in.orig 2015-01-12 10:51:50.193906738 +0100 ++++ lib/Makefile.in 2015-01-12 10:52:04.848018891 +0100 +@@ -77,8 +77,8 @@ + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-@LINUX_OS_TRUE@am__append_1 = \ +-@LINUX_OS_TRUE@ libdvbv5 ++am__append_1 = \ ++ libdvbv5 + + subdir = lib + DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am diff --git a/multimedia/libv4l/files/patch-libv4lconvert_control_libv4lcontrol.c b/multimedia/libv4l/files/patch-lib_libv4lconvert_control_libv4lcontrol.c index 35eeec85f6b8..ada1fc0ce46b 100644 --- a/multimedia/libv4l/files/patch-libv4lconvert_control_libv4lcontrol.c +++ b/multimedia/libv4l/files/patch-lib_libv4lconvert_control_libv4lcontrol.c @@ -1,6 +1,6 @@ ---- libv4lconvert/control/libv4lcontrol.c.orig 2012-05-02 21:17:37.000000000 +0200 -+++ libv4lconvert/control/libv4lcontrol.c 2012-05-06 08:52:42.000000000 +0200 -@@ -345,6 +345,16 @@ +--- lib/libv4lconvert/control/libv4lcontrol.c.orig 2014-07-26 21:33:00.000000000 +0200 ++++ lib/libv4lconvert/control/libv4lcontrol.c 2015-01-11 09:40:05.521158993 +0100 +@@ -361,6 +361,16 @@ unsigned short *vendor_id, unsigned short *product_id, int *speed) { @@ -17,7 +17,7 @@ FILE *f; int i, minor; struct stat st; -@@ -434,6 +444,7 @@ +@@ -457,6 +467,7 @@ return 0; /* Should never happen */ return 1; @@ -25,16 +25,3 @@ } /* -@@ -456,7 +456,12 @@ - while (isspace(*start)) start++; - n = strlen(start); - while (n > 0 && isspace(start[n-1])) --n; -+#ifndef __FreeBSD__ - trimmed_dmi = strndupa(start, n); -+#else -+ trimmed_dmi = (char *)alloca(n + 1); -+ strlcpy(trimmed_dmi, start, n + 1); -+#endif - - /* find trimmed value */ - for (entry_ptr = table_entries; *entry_ptr; entry_ptr++) { diff --git a/multimedia/libv4l/files/patch-utils_Makefile.in b/multimedia/libv4l/files/patch-utils_Makefile.in new file mode 100644 index 000000000000..01ff4e13714c --- /dev/null +++ b/multimedia/libv4l/files/patch-utils_Makefile.in @@ -0,0 +1,11 @@ +--- utils/Makefile.in.orig 2015-01-25 19:52:31.619994565 +0100 ++++ utils/Makefile.in 2015-01-25 19:53:34.975249497 +0100 +@@ -374,7 +374,7 @@ + top_srcdir = @top_srcdir@ + udevrulesdir = @udevrulesdir@ + SUBDIRS = dvb libv4l2util libmedia_dev decode_tm6000 keytable \ +- media-ctl v4l2-compliance v4l2-ctl v4l2-dbg v4l2-sysfs-path \ ++ v4l2-compliance v4l2-dbg v4l2-sysfs-path \ + rds-ctl $(am__append_1) $(am__append_2) $(am__append_3) + all: all-recursive + diff --git a/multimedia/libv4l/files/patch-utils_v4l2-ctl_v4l2-ctl.cpp b/multimedia/libv4l/files/patch-utils_v4l2-ctl_v4l2-ctl.cpp new file mode 100644 index 000000000000..6db9c5db638e --- /dev/null +++ b/multimedia/libv4l/files/patch-utils_v4l2-ctl_v4l2-ctl.cpp @@ -0,0 +1,54 @@ +--- utils/v4l2-ctl/v4l2-ctl.cpp.orig 2015-06-14 00:23:03.316457000 -0400 ++++ utils/v4l2-ctl/v4l2-ctl.cpp 2015-06-14 00:28:46.421843000 -0400 +@@ -614,9 +614,50 @@ static std::string cap2s(unsigned cap) + return s; + } + ++#if __FreeBSD_version < 1000000 ++/* from FreeBSD src/lib/libc/string/strchrnul.c: */ ++ ++char *strchrnul(const char *p, int ch); ++ ++char * ++strchrnul(const char *p, int ch) ++{ ++ char c; ++ ++ c = ch; ++ for (;; ++p) { ++ if (*p == c || *p == '\0') ++ return ((char *)p); ++ } ++ /* NOTREACHED */ ++} ++#endif ++ ++int ++my_getsubopt(char **optionp, char *const *tokens, char **valuep) ++{ ++ char *endp, *vstart; ++ int cnt; ++ ++ if (**optionp == '\0') ++ return -1; ++ ++ /* Find end of next token. */ ++ endp = strchrnul (*optionp, ','); ++ ++ /* The current suboption does not match any option. */ ++ *valuep = *optionp; ++ ++ if (*endp != '\0') ++ *endp++ = '\0'; ++ *optionp = endp; ++ ++ return -1; ++} ++ + int parse_subopt(char **subs, const char * const *subopts, char **value) + { +- int opt = getsubopt(subs, (char * const *)subopts, value); ++ int opt = my_getsubopt(subs, (char * const *)subopts, value); + + if (opt == -1) { + fprintf(stderr, "Invalid suboptions specified\n"); diff --git a/multimedia/libv4l/files/videodev.h b/multimedia/libv4l/files/videodev.h new file mode 100644 index 000000000000..c26f07da98fa --- /dev/null +++ b/multimedia/libv4l/files/videodev.h @@ -0,0 +1,340 @@ +/* + * Video for Linux version 1 - OBSOLETE + * + * Header file for v4l1 drivers and applications, for + * Linux kernels 2.2.x or 2.4.x. + * + * Provides header for legacy drivers and applications + * + * See http://linuxtv.org for more info + * + */ +#ifndef __LINUX_VIDEODEV_H +#define __LINUX_VIDEODEV_H + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <linux/videodev2.h> + +#if defined(__MIN_V4L1) && defined (__KERNEL__) + +/* + * Used by those V4L2 core functions that need a minimum V4L1 support, + * in order to allow V4L1 Compatibilty code compilation. + */ + +struct video_mbuf +{ + int size; /* Total memory to map */ + int frames; /* Frames */ + int offsets[VIDEO_MAX_FRAME]; +}; + +#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */ + +#else +#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) + +#define VID_TYPE_CAPTURE 1 /* Can capture */ +#define VID_TYPE_TUNER 2 /* Can tune */ +#define VID_TYPE_TELETEXT 4 /* Does teletext */ +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ +#define VID_TYPE_CLIPPING 32 /* Can clip */ +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ +#define VID_TYPE_SCALES 128 /* Scalable */ +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ + +struct video_capability +{ + char name[32]; + int type; + int channels; /* Num channels */ + int audios; /* Num audio devices */ + int maxwidth; /* Supported width */ + int maxheight; /* And height */ + int minwidth; /* Supported width */ + int minheight; /* And height */ +}; + + +struct video_channel +{ + int channel; + char name[32]; + int tuners; + uint32_t flags; +#define VIDEO_VC_TUNER 1 /* Channel has a tuner */ +#define VIDEO_VC_AUDIO 2 /* Channel has audio */ + uint16_t type; +#define VIDEO_TYPE_TV 1 +#define VIDEO_TYPE_CAMERA 2 + uint16_t norm; /* Norm set by channel */ +}; + +struct video_tuner +{ + int tuner; + char name[32]; + unsigned long rangelow, rangehigh; /* Tuner range */ + uint32_t flags; +#define VIDEO_TUNER_PAL 1 +#define VIDEO_TUNER_NTSC 2 +#define VIDEO_TUNER_SECAM 4 +#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */ +#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */ +#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */ +#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */ +#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */ + uint16_t mode; /* PAL/NTSC/SECAM/OTHER */ +#define VIDEO_MODE_PAL 0 +#define VIDEO_MODE_NTSC 1 +#define VIDEO_MODE_SECAM 2 +#define VIDEO_MODE_AUTO 3 + uint16_t signal; /* Signal strength 16bit scale */ +}; + +struct video_picture +{ + uint16_t brightness; + uint16_t hue; + uint16_t colour; + uint16_t contrast; + uint16_t whiteness; /* Black and white only */ + uint16_t depth; /* Capture depth */ + uint16_t palette; /* Palette in use */ +#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */ +#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */ +#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */ +#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */ +#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */ +#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */ +#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */ +#define VIDEO_PALETTE_YUYV 8 +#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */ +#define VIDEO_PALETTE_YUV420 10 +#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */ +#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */ +#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */ +#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */ +#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */ +#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */ +#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */ +#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */ +}; + +struct video_audio +{ + int audio; /* Audio channel */ + uint16_t volume; /* If settable */ + uint16_t bass, treble; + uint32_t flags; +#define VIDEO_AUDIO_MUTE 1 +#define VIDEO_AUDIO_MUTABLE 2 +#define VIDEO_AUDIO_VOLUME 4 +#define VIDEO_AUDIO_BASS 8 +#define VIDEO_AUDIO_TREBLE 16 +#define VIDEO_AUDIO_BALANCE 32 + char name[16]; +#define VIDEO_SOUND_MONO 1 +#define VIDEO_SOUND_STEREO 2 +#define VIDEO_SOUND_LANG1 4 +#define VIDEO_SOUND_LANG2 8 + uint16_t mode; + uint16_t balance; /* Stereo balance */ + uint16_t step; /* Step actual volume uses */ +}; + +struct video_clip +{ + int32_t x,y; + int32_t width, height; + struct video_clip *next; /* For user use/driver use only */ +}; + +struct video_window +{ + uint32_t x,y; /* Position of window */ + uint32_t width,height; /* Its size */ + uint32_t chromakey; + uint32_t flags; + struct video_clip *clips; /* Set only */ + int clipcount; +#define VIDEO_WINDOW_INTERLACE 1 +#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ +#define VIDEO_CLIP_BITMAP -1 +/* bitmap is 1024x625, a '1' bit represents a clipped pixel */ +#define VIDEO_CLIPMAP_SIZE (128 * 625) +}; + +struct video_capture +{ + uint32_t x,y; /* Offsets into image */ + uint32_t width, height; /* Area to capture */ + uint16_t decimation; /* Decimation divider */ + uint16_t flags; /* Flags for capture */ +#define VIDEO_CAPTURE_ODD 0 /* Temporal */ +#define VIDEO_CAPTURE_EVEN 1 +}; + +struct video_buffer +{ + void *base; + int height,width; + int depth; + int bytesperline; +}; + +struct video_mmap +{ + unsigned int frame; /* Frame (0 - n) for double buffer */ + int height,width; + unsigned int format; /* should be VIDEO_PALETTE_* */ +}; + +struct video_key +{ + uint8_t key[8]; + uint32_t flags; +}; + +struct video_mbuf +{ + int size; /* Total memory to map */ + int frames; /* Frames */ + int offsets[VIDEO_MAX_FRAME]; +}; + +#define VIDEO_NO_UNIT (-1) + +struct video_unit +{ + int video; /* Video minor */ + int vbi; /* VBI minor */ + int radio; /* Radio minor */ + int audio; /* Audio minor */ + int teletext; /* Teletext minor */ +}; + +struct vbi_format { + uint32_t sampling_rate; /* in Hz */ + uint32_t samples_per_line; + uint32_t sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */ + int32_t start[2]; /* starting line for each frame */ + uint32_t count[2]; /* count of lines for each frame */ + uint32_t flags; +#define VBI_UNSYNC 1 /* can distingues between top/bottom field */ +#define VBI_INTERLACED 2 /* lines are interlaced */ +}; + +/* video_info is biased towards hardware mpeg encode/decode */ +/* but it could apply generically to any hardware compressor/decompressor */ +struct video_info +{ + uint32_t frame_count; /* frames output since decode/encode began */ + uint32_t h_size; /* current unscaled horizontal size */ + uint32_t v_size; /* current unscaled veritcal size */ + uint32_t smpte_timecode; /* current SMPTE timecode (for current GOP) */ + uint32_t picture_type; /* current picture type */ + uint32_t temporal_reference; /* current temporal reference */ + uint8_t user_data[256]; /* user data last found in compressed stream */ + /* user_data[0] contains user data flags, user_data[1] has count */ +}; + +/* generic structure for setting playback modes */ +struct video_play_mode +{ + int mode; + int p1; + int p2; +}; + +/* for loading microcode / fpga programming */ +struct video_code +{ + char loadwhat[16]; /* name or tag of file being passed */ + int datasize; + uint8_t *data; +}; + +#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */ +#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */ +#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */ +#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */ +#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */ +#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */ +#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */ +#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */ +#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */ +#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */ +#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */ +#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */ +#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */ +#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */ +#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */ +#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */ +#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */ +#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */ +#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */ +#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */ +#define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */ +#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */ +#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */ +#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */ +#define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */ +#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */ +#define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */ +#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */ +#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */ + + +#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */ + +/* VIDIOCSWRITEMODE */ +#define VID_WRITE_MPEG_AUD 0 +#define VID_WRITE_MPEG_VID 1 +#define VID_WRITE_OSD 2 +#define VID_WRITE_TTX 3 +#define VID_WRITE_CC 4 +#define VID_WRITE_MJPEG 5 + +/* VIDIOCSPLAYMODE */ +#define VID_PLAY_VID_OUT_MODE 0 + /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */ +#define VID_PLAY_GENLOCK 1 + /* p1: 0 = OFF, 1 = ON */ + /* p2: GENLOCK FINE DELAY value */ +#define VID_PLAY_NORMAL 2 +#define VID_PLAY_PAUSE 3 +#define VID_PLAY_SINGLE_FRAME 4 +#define VID_PLAY_FAST_FORWARD 5 +#define VID_PLAY_SLOW_MOTION 6 +#define VID_PLAY_IMMEDIATE_NORMAL 7 +#define VID_PLAY_SWITCH_CHANNELS 8 +#define VID_PLAY_FREEZE_FRAME 9 +#define VID_PLAY_STILL_MODE 10 +#define VID_PLAY_MASTER_MODE 11 + /* p1: see below */ +#define VID_PLAY_MASTER_NONE 1 +#define VID_PLAY_MASTER_VIDEO 2 +#define VID_PLAY_MASTER_AUDIO 3 +#define VID_PLAY_ACTIVE_SCANLINES 12 + /* p1 = first active; p2 = last active */ +#define VID_PLAY_RESET 13 +#define VID_PLAY_END_MARK 14 + +#endif /* CONFIG_VIDEO_V4L1_COMPAT */ +#endif /* __MIN_V4L1 */ + +#endif /* __LINUX_VIDEODEV_H */ + +/* + * Local variables: + * c-basic-offset: 8 + * End: + */ diff --git a/multimedia/libv4l/pkg-plist b/multimedia/libv4l/pkg-plist index feece3f6d54b..9d621d6c0155 100644 --- a/multimedia/libv4l/pkg-plist +++ b/multimedia/libv4l/pkg-plist @@ -1,17 +1,81 @@ +include/libdvbv5/atsc_eit.h +include/libdvbv5/atsc_header.h +include/libdvbv5/cat.h +include/libdvbv5/crc32.h +include/libdvbv5/desc_atsc_service_location.h +include/libdvbv5/desc_ca.h +include/libdvbv5/desc_ca_identifier.h +include/libdvbv5/desc_cable_delivery.h +include/libdvbv5/desc_event_extended.h +include/libdvbv5/desc_event_short.h +include/libdvbv5/desc_extension.h +include/libdvbv5/desc_frequency_list.h +include/libdvbv5/desc_hierarchy.h +include/libdvbv5/desc_isdbt_delivery.h +include/libdvbv5/desc_language.h +include/libdvbv5/desc_logical_channel.h +include/libdvbv5/desc_network_name.h +include/libdvbv5/desc_partial_reception.h +include/libdvbv5/desc_sat.h +include/libdvbv5/desc_service.h +include/libdvbv5/desc_t2_delivery.h +include/libdvbv5/desc_terrestrial_delivery.h +include/libdvbv5/desc_ts_info.h +include/libdvbv5/descriptors.h +include/libdvbv5/dvb-demux.h +include/libdvbv5/dvb-fe.h +include/libdvbv5/dvb-file.h +include/libdvbv5/dvb-frontend.h +include/libdvbv5/dvb-log.h +include/libdvbv5/dvb-sat.h +include/libdvbv5/dvb-scan.h +include/libdvbv5/dvb-v5-std.h +include/libdvbv5/eit.h +include/libdvbv5/header.h +include/libdvbv5/mgt.h +include/libdvbv5/mpeg_es.h +include/libdvbv5/mpeg_pes.h +include/libdvbv5/mpeg_ts.h +include/libdvbv5/nit.h +include/libdvbv5/pat.h +include/libdvbv5/pmt.h +include/libdvbv5/sdt.h +include/libdvbv5/vct.h +include/libv4l-plugin.h include/libv4l1-videodev.h include/libv4l1.h include/libv4l2.h +include/libv4l2rds.h include/libv4lconvert.h +lib/libdvbv5.a +lib/libdvbv5.so +lib/libdvbv5.so.0 +lib/libdvbv5.so.0.0.0 lib/libv4l/ov511-decomp lib/libv4l/ov518-decomp +lib/libv4l/plugins/libv4l-mplane.so lib/libv4l/v4l1compat.so lib/libv4l/v4l2convert.so +lib/libv4l1.a lib/libv4l1.so lib/libv4l1.so.0 +lib/libv4l1.so.0.0.0 +lib/libv4l2.a lib/libv4l2.so lib/libv4l2.so.0 +lib/libv4l2.so.0.0.0 +lib/libv4l2rds.a +lib/libv4l2rds.so +lib/libv4l2rds.so.0 +lib/libv4l2rds.so.0.0.0 +lib/libv4lconvert.a lib/libv4lconvert.so lib/libv4lconvert.so.0 +lib/libv4lconvert.so.0.0.0 +lib/v4l1compat.so +lib/v4l2convert.so +libdata/pkgconfig/libdvbv5.pc libdata/pkgconfig/libv4l1.pc libdata/pkgconfig/libv4l2.pc +libdata/pkgconfig/libv4l2rds.pc libdata/pkgconfig/libv4lconvert.pc |