Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/libv4l1 graphics/libv4l1: import libv4l-1.18....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b9f0f90b0126
branches:  trunk
changeset: 437682:b9f0f90b0126
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Sat Aug 29 22:18:41 2020 +0000

description:
graphics/libv4l1: import libv4l-1.18.1 from wip/libv4l

libv4l is a collection of libraries which adds a thin abstraction layer on
top of video4linux2 devices. The purpose of this (thin) layer is to make it
easy for application writers to support a wide variety of devices without
having to write seperate code for different devices in the same class.

diffstat:

 graphics/libv4l1/DESCR                                                         |     4 +
 graphics/libv4l1/Makefile                                                      |    65 +
 graphics/libv4l1/PLIST                                                         |    23 +
 graphics/libv4l1/buildlink3.mk                                                 |    13 +
 graphics/libv4l1/distinfo                                                      |    19 +
 graphics/libv4l1/files/videodev.h                                              |   356 +
 graphics/libv4l1/files/videodev2.h                                             |  2430 +++++++
 graphics/libv4l1/files/videoio.h                                               |  3419 ++++++++++
 graphics/libv4l1/patches/patch-configure                                       |    81 +
 graphics/libv4l1/patches/patch-lib_include_libv4l1-videodev.h                  |    13 +
 graphics/libv4l1/patches/patch-lib_include_libv4l2rds.h                        |    13 +
 graphics/libv4l1/patches/patch-lib_include_libv4lconvert.h                     |    22 +
 graphics/libv4l1/patches/patch-lib_libv4l-mplane_libv4l-mplane.c               |    13 +
 graphics/libv4l1/patches/patch-lib_libv4l1_libv4l1.c                           |    13 +
 graphics/libv4l1/patches/patch-lib_libv4l2_libv4l2.c                           |    26 +
 graphics/libv4l1/patches/patch-lib_libv4l2_log.c                               |    13 +
 graphics/libv4l1/patches/patch-lib_libv4l2_v4l2convert.c                       |    13 +
 graphics/libv4l1/patches/patch-lib_libv4l2rds_libv4l2rds.c                     |    13 +
 graphics/libv4l1/patches/patch-lib_libv4lconvert_control_libv4lcontrol.c       |    22 +
 graphics/libv4l1/patches/patch-lib_libv4lconvert_libv4lsyscall-priv.h          |    28 +
 graphics/libv4l1/patches/patch-lib_libv4lconvert_processing_libv4lprocessing.h |    13 +
 21 files changed, 6612 insertions(+), 0 deletions(-)

diffs (truncated from 6696 to 300 lines):

diff -r c49d5d410b12 -r b9f0f90b0126 graphics/libv4l1/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libv4l1/DESCR    Sat Aug 29 22:18:41 2020 +0000
@@ -0,0 +1,4 @@
+libv4l is a collection of libraries which adds a thin abstraction layer on
+top of video4linux2 devices. The purpose of this (thin) layer is to make it
+easy for application writers to support a wide variety of devices without
+having to write seperate code for different devices in the same class.
diff -r c49d5d410b12 -r b9f0f90b0126 graphics/libv4l1/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libv4l1/Makefile Sat Aug 29 22:18:41 2020 +0000
@@ -0,0 +1,65 @@
+# $NetBSD: Makefile,v 1.1 2020/08/29 22:18:41 ryoon Exp $
+
+LIBV4L_VERS=   1.18.1
+DISTNAME=      v4l-utils-${LIBV4L_VERS}
+CATEGORIES=    graphics
+PKGNAME=       libv4l-${LIBV4L_VERS}
+MASTER_SITES=  https://www.linuxtv.org/downloads/v4l-utils/
+EXTRACT_SUFX=  .tar.bz2
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+#HOMEPAGE=     http://people.atrpms.net/~hdegoede/
+COMMENT=       Video4Linux userspace library
+LICENSE=       gnu-gpl-v2
+
+USE_GCC_RUNTIME=       yes
+GNU_CONFIGURE=         yes
+FORTIFY_SUPPORTED=     no
+
+USE_TOOLS+=    gmake
+USE_LIBTOOL=   yes
+
+.include "../../mk/bsd.prefs.mk"
+
+NEWHEADER!=    ${GREP} V4L2_SEL_TGT_CROP /usr/include/sys/videoio.h || echo "no"
+
+.if (${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly") && !exists(/usr/include/sys/videoio.h)
+PLIST.needs_videoio=   yes
+INSTALLATION_DIRS+=    include/sys
+
+pre-configure:
+       ${MKDIR} ${BUILDLINK_DIR}/include/sys
+       cp ${FILESDIR}/videoio.h ${BUILDLINK_DIR}/include/sys
+
+post-install:
+       ${INSTALL_DATA} ${FILESDIR}/videoio.h ${DESTDIR}${PREFIX}/include/sys
+
+.elif (${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly") && ${NEWHEADER} == "no"
+
+pre-configure:
+       ${MKDIR} ${BUILDLINK_DIR}/include/sys
+       cp ${FILESDIR}/videoio.h ${BUILDLINK_DIR}/include/sys
+
+.elif ${OPSYS} == "Linux" && !exists(/usr/include/linux/videodev.h)
+pre-configure:
+       ${MKDIR} ${BUILDLINK_DIR}/include/linux
+       cp ${FILESDIR}/videodev.h ${BUILDLINK_DIR}/include/linux
+       ${LN} -sf ${BUILDLINK_DIR}/include/linux/videodev.h \
+               ${BUILDLINK_DIR}/include/
+       cp ${FILESDIR}/videodev2.h ${BUILDLINK_DIR}/include/linux
+       ${LN} -sf ${BUILDLINK_DIR}/include/linux/videodev2.h \
+               ${BUILDLINK_DIR}/include/
+.endif
+
+PLIST_VARS=    needs_videoio
+
+.include "../../mk/compiler.mk"
+
+.if !empty(PKGSRC_COMPILER:Mclang) || !empty(CC_VERSION:Mgcc-[6-9]*)
+CPPFLAGS.SunOS+=       -D_XOPEN_SOURCE=600
+.else
+CPPFLAGS.SunOS+=       -D_XOPEN_SOURCE=500
+.endif
+
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r c49d5d410b12 -r b9f0f90b0126 graphics/libv4l1/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libv4l1/PLIST    Sat Aug 29 22:18:41 2020 +0000
@@ -0,0 +1,23 @@
+@comment $NetBSD: PLIST,v 1.1 2020/08/29 22:18:41 ryoon Exp $
+include/libv4l-plugin.h
+include/libv4l1-videodev.h
+include/libv4l1.h
+include/libv4l2.h
+include/libv4l2rds.h
+include/libv4lconvert.h
+${PLIST.needs_videoio}include/sys/videoio.h
+lib/libv4l/ov511-decomp
+lib/libv4l/ov518-decomp
+lib/libv4l/plugins/libv4l-mplane.la
+lib/libv4l/v4l1compat.la
+lib/libv4l/v4l2convert.la
+lib/libv4l1.la
+lib/libv4l2.la
+lib/libv4l2rds.la
+lib/libv4lconvert.la
+lib/pkgconfig/libv4l1.pc
+lib/pkgconfig/libv4l2.pc
+lib/pkgconfig/libv4l2rds.pc
+lib/pkgconfig/libv4lconvert.pc
+lib/v4l1compat.so
+lib/v4l2convert.so
diff -r c49d5d410b12 -r b9f0f90b0126 graphics/libv4l1/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libv4l1/buildlink3.mk    Sat Aug 29 22:18:41 2020 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/08/29 22:18:41 ryoon Exp $
+
+BUILDLINK_TREE+=       libv4l
+
+.if !defined(LIBV4L_BUILDLINK3_MK)
+LIBV4L_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libv4l+=         libv4l>=1.18.1
+BUILDLINK_ABI_DEPENDS.libv4l+=         libv4l>=1.18.1
+BUILDLINK_PKGSRCDIR.libv4l?=           ../../graphics/libv4l1
+.endif # LIBV4L_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -libv4l
diff -r c49d5d410b12 -r b9f0f90b0126 graphics/libv4l1/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libv4l1/distinfo Sat Aug 29 22:18:41 2020 +0000
@@ -0,0 +1,19 @@
+$NetBSD: distinfo,v 1.1 2020/08/29 22:18:41 ryoon Exp $
+
+SHA1 (v4l-utils-1.18.1.tar.bz2) = 05017f531d4082efce26392c01d085dd4da10f18
+RMD160 (v4l-utils-1.18.1.tar.bz2) = 7eb9e7aaf0ef4249477479cb4573501935046998
+SHA512 (v4l-utils-1.18.1.tar.bz2) = 2e9f77abc2fd65bd6a5508831185a941553441384719293f99ece7e6c53c37bb142eb3719532b11f1cef48df691667d2a4235d920338d672738d40659d499056
+Size (v4l-utils-1.18.1.tar.bz2) = 1995211 bytes
+SHA1 (patch-configure) = 5831acf2dbe102537632036ccf3b8a33be68ccb3
+SHA1 (patch-lib_include_libv4l1-videodev.h) = 84256cb64dd755b8a12edd9844bc362c35f10dd4
+SHA1 (patch-lib_include_libv4l2rds.h) = ca375e9bac291c8cc295a3393e0497eb12a01cb9
+SHA1 (patch-lib_include_libv4lconvert.h) = e5807fa26d4e73a001f829640902cf22c14b6dfe
+SHA1 (patch-lib_libv4l-mplane_libv4l-mplane.c) = df0d6f863ce3b7ff4b2ad87b8cd348785d0200c7
+SHA1 (patch-lib_libv4l1_libv4l1.c) = 9aa0fd6dccd372f81e409c6ac0768be94957ab31
+SHA1 (patch-lib_libv4l2_libv4l2.c) = f086f39fd25684f91be773637d1922416d224dc4
+SHA1 (patch-lib_libv4l2_log.c) = bcab0be4b49a38271bbc2b4a1d56f9289a471d40
+SHA1 (patch-lib_libv4l2_v4l2convert.c) = f5fefb20f83005b0f91010af6ec9b7f9f76fabe0
+SHA1 (patch-lib_libv4l2rds_libv4l2rds.c) = f6779f323a64bb12ea14829241363f2fc0f9ee2c
+SHA1 (patch-lib_libv4lconvert_control_libv4lcontrol.c) = e4a96570f22d837bbf7248231464a143c339e8ea
+SHA1 (patch-lib_libv4lconvert_libv4lsyscall-priv.h) = 2795b366f05365bf7a7caa142ff4b93b38603787
+SHA1 (patch-lib_libv4lconvert_processing_libv4lprocessing.h) = ecb02a055df546eb0f4bcea96f1a55e312495cdd
diff -r c49d5d410b12 -r b9f0f90b0126 graphics/libv4l1/files/videodev.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libv4l1/files/videodev.h Sat Aug 29 22:18:41 2020 +0000
@@ -0,0 +1,356 @@
+/* This is the header file for video4linux ABI taken from kernel
+ * source 2.4.21.  There was no copyright notice in this file, but the
+ * copyright for the kernel (and hence this file) is GNU GPL version 2
+ * only.  This file is included here as COPYING, and applies to
+ * frameworks itself as well as this file.  See
+ * http://bytesex.org/v4l/ for video4linux information. -pat */
+
+#ifndef __LINUX_VIDEODEV_H
+#define __LINUX_VIDEODEV_H
+
+#include <sys/types.h>
+#include <stdint.h>
+
+typedef uint8_t   __u8;
+typedef int8_t    __s8;
+typedef uint16_t  __u16;
+typedef int16_t   __s16;
+typedef uint32_t  __u32;
+typedef int32_t   __s32;
+
+#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;
+       __u32  flags;
+#define VIDEO_VC_TUNER         1       /* Channel has a tuner */
+#define VIDEO_VC_AUDIO         2       /* Channel has audio */
+       __u16  type;
+#define VIDEO_TYPE_TV          1
+#define VIDEO_TYPE_CAMERA      2       
+       __u16 norm;                     /* Norm set by channel */
+};
+
+struct video_tuner
+{
+       int tuner;
+       char name[32];
+       unsigned long rangelow, rangehigh;      /* Tuner range */
+       __u32 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 */
+       __u16 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
+       __u16 signal;                   /* Signal strength 16bit scale */
+};
+
+struct video_picture
+{
+       __u16   brightness;
+       __u16   hue;
+       __u16   colour;
+       __u16   contrast;
+       __u16   whiteness;      /* Black and white only */
+       __u16   depth;          /* Capture depth */
+       __u16   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 */
+       __u16   volume;         /* If settable */
+       __u16   bass, treble;
+       __u32   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
+        __u16   mode;
+        __u16  balance;        /* Stereo balance */
+        __u16  step;           /* Step actual volume uses */
+};
+
+struct video_clip
+{
+       __s32   x,y;
+       __s32   width, height;
+       struct  video_clip *next;       /* For user use/driver use only */
+};
+
+struct video_window
+{
+       __u32   x,y;                    /* Position of window */
+       __u32   width,height;           /* Its size */
+       __u32   chromakey;
+       __u32   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



Home | Main Index | Thread Index | Old Index