libv4l: add Robert Swindells' update for libv4l
Does not build for me because of SSP.
This commit is contained in:
parent
efae5f8078
commit
723a209745
|
@ -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.
|
|
@ -0,0 +1,64 @@
|
|||
# $NetBSD: $
|
||||
|
||||
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
|
||||
#HOMEPAGE= http://people.atrpms.net/~hdegoede/
|
||||
COMMENT= Video4Linux userspace library
|
||||
LICENSE= gnu-gpl-v2
|
||||
|
||||
USE_GCC_RUNTIME= yes
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
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 !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"
|
|
@ -0,0 +1,23 @@
|
|||
@comment $NetBSD: $
|
||||
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
|
|
@ -0,0 +1,13 @@
|
|||
Fix:
|
||||
|
||||
v4l1compat.c:115:23: error: redefinition of 'read'
|
||||
LIBV4L_PUBLIC ssize_t read(int fd, void *buffer, size_t n)
|
||||
^~~~
|
||||
In file included from /usr/include/ssp/stdio.h:34,
|
||||
from /usr/include/stdio.h:602,
|
||||
from ../../lib/include/libv4l1.h:26,
|
||||
from v4l1compat.c:31:
|
||||
/usr/include/ssp/unistd.h:39:1: note: previous definition of 'read' was here
|
||||
__ssp_redirect0(ssize_t, read, (int __fd, void *__buf, size_t __len), \
|
||||
^~~~~~~~~~~~~~~
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# $NetBSD: $
|
||||
|
||||
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/libv4l
|
||||
.endif # LIBV4L_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -libv4l
|
|
@ -0,0 +1,19 @@
|
|||
$NetBSD: $
|
||||
|
||||
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
|
|
@ -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
|
||||
/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
|
||||
#define VIDEO_CLIPMAP_SIZE (128 * 625)
|
||||
};
|
||||
|
||||
struct video_capture
|
||||
{
|
||||
__u32 x,y; /* Offsets into image */
|
||||
__u32 width, height; /* Area to capture */
|
||||
__u16 decimation; /* Decimation divider */
|
||||
__u16 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
|
||||
{
|
||||
__u8 key[8];
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
|
||||
#define VIDEO_MAX_FRAME 32
|
||||
|
||||
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 {
|
||||
__u32 sampling_rate; /* in Hz */
|
||||
__u32 samples_per_line;
|
||||
__u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */
|
||||
__s32 start[2]; /* starting line for each frame */
|
||||
__u32 count[2]; /* count of lines for each frame */
|
||||
__u32 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
|
||||
{
|
||||
__u32 frame_count; /* frames output since decode/encode began */
|
||||
__u32 h_size; /* current unscaled horizontal size */
|
||||
__u32 v_size; /* current unscaled veritcal size */
|
||||
__u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */
|
||||
__u32 picture_type; /* current picture type */
|
||||
__u32 temporal_reference; /* current temporal reference */
|
||||
__u8 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;
|
||||
__u8 *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
|
||||
|
||||
|
||||
|
||||
#define VID_HARDWARE_BT848 1
|
||||
#define VID_HARDWARE_QCAM_BW 2
|
||||
#define VID_HARDWARE_PMS 3
|
||||
#define VID_HARDWARE_QCAM_C 4
|
||||
#define VID_HARDWARE_PSEUDO 5
|
||||
#define VID_HARDWARE_SAA5249 6
|
||||
#define VID_HARDWARE_AZTECH 7
|
||||
#define VID_HARDWARE_SF16MI 8
|
||||
#define VID_HARDWARE_RTRACK 9
|
||||
#define VID_HARDWARE_ZOLTRIX 10
|
||||
#define VID_HARDWARE_SAA7146 11
|
||||
#define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */
|
||||
#define VID_HARDWARE_RTRACK2 13
|
||||
#define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */
|
||||
#define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */
|
||||
#define VID_HARDWARE_PLANB 16 /* PowerMac motherboard video-in */
|
||||
#define VID_HARDWARE_BROADWAY 17 /* Broadway project */
|
||||
#define VID_HARDWARE_GEMTEK 18
|
||||
#define VID_HARDWARE_TYPHOON 19
|
||||
#define VID_HARDWARE_VINO 20 /* SGI Indy Vino */
|
||||
#define VID_HARDWARE_CADET 21 /* Cadet radio */
|
||||
#define VID_HARDWARE_TRUST 22 /* Trust FM Radio */
|
||||
#define VID_HARDWARE_TERRATEC 23 /* TerraTec ActiveRadio */
|
||||
#define VID_HARDWARE_CPIA 24
|
||||
#define VID_HARDWARE_ZR36120 25 /* Zoran ZR36120/ZR36125 */
|
||||
#define VID_HARDWARE_ZR36067 26 /* Zoran ZR36067/36060 */
|
||||
#define VID_HARDWARE_OV511 27
|
||||
#define VID_HARDWARE_ZR356700 28 /* Zoran 36700 series */
|
||||
#define VID_HARDWARE_W9966 29
|
||||
#define VID_HARDWARE_SE401 30 /* SE401 USB webcams */
|
||||
#define VID_HARDWARE_PWC 31 /* Philips webcams */
|
||||
#define VID_HARDWARE_MEYE 32 /* Sony Vaio MotionEye cameras */
|
||||
#define VID_HARDWARE_CPIA2 33
|
||||
#define VID_HARDWARE_VICAM 34 /* ViCam, 3Com Homeconnect */
|
||||
#define VID_HARDWARE_SF16FMR2 35
|
||||
|
||||
#endif /* __LINUX_VIDEODEV_H */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,81 @@
|
|||
$NetBSD$
|
||||
|
||||
--- configure.orig 2018-02-10 12:26:12.000000000 +0000
|
||||
+++ configure
|
||||
@@ -22501,76 +22501,6 @@ fi
|
||||
|
||||
LIBS=$dl_saved_libs
|
||||
|
||||
-ac_fn_c_check_header_mongrel "$LINENO" "argp.h" "ac_cv_header_argp_h" "$ac_includes_default"
|
||||
-if test "x$ac_cv_header_argp_h" = xyes; then :
|
||||
-
|
||||
-else
|
||||
- as_fn_error $? "Cannot continue: argp.h not found" "$LINENO" 5
|
||||
-fi
|
||||
-
|
||||
-
|
||||
-argp_saved_libs=$LIBS
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing argp_parse" >&5
|
||||
-$as_echo_n "checking for library containing argp_parse... " >&6; }
|
||||
-if ${ac_cv_search_argp_parse+:} false; then :
|
||||
- $as_echo_n "(cached) " >&6
|
||||
-else
|
||||
- ac_func_search_save_LIBS=$LIBS
|
||||
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-/* Override any GCC internal prototype to avoid an error.
|
||||
- Use char because int might match the return type of a GCC
|
||||
- builtin and then its argument prototype would still apply. */
|
||||
-#ifdef __cplusplus
|
||||
-extern "C"
|
||||
-#endif
|
||||
-char argp_parse ();
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
-return argp_parse ();
|
||||
- ;
|
||||
- return 0;
|
||||
-}
|
||||
-_ACEOF
|
||||
-for ac_lib in '' argp; do
|
||||
- if test -z "$ac_lib"; then
|
||||
- ac_res="none required"
|
||||
- else
|
||||
- ac_res=-l$ac_lib
|
||||
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
- fi
|
||||
- if ac_fn_c_try_link "$LINENO"; then :
|
||||
- ac_cv_search_argp_parse=$ac_res
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext \
|
||||
- conftest$ac_exeext
|
||||
- if ${ac_cv_search_argp_parse+:} false; then :
|
||||
- break
|
||||
-fi
|
||||
-done
|
||||
-if ${ac_cv_search_argp_parse+:} false; then :
|
||||
-
|
||||
-else
|
||||
- ac_cv_search_argp_parse=no
|
||||
-fi
|
||||
-rm conftest.$ac_ext
|
||||
-LIBS=$ac_func_search_save_LIBS
|
||||
-fi
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_argp_parse" >&5
|
||||
-$as_echo "$ac_cv_search_argp_parse" >&6; }
|
||||
-ac_res=$ac_cv_search_argp_parse
|
||||
-if test "$ac_res" != no; then :
|
||||
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
- test "$ac_cv_search_argp_parse" = "none required" || ARGP_LIBS=$ac_cv_search_argp_parse
|
||||
-else
|
||||
- as_fn_error $? "unable to find the argp_parse() function" "$LINENO" 5
|
||||
-fi
|
||||
-
|
||||
-
|
||||
-LIBS=$argp_saved_libs
|
||||
-
|
||||
for ac_func in fork
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/include/libv4l1-videodev.h.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/include/libv4l1-videodev.h
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <linux/ioctl.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/include/libv4l2rds.h.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/include/libv4l2rds.h
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
|
@ -0,0 +1,22 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/include/libv4lconvert.h.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/include/libv4lconvert.h
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <linux/ioctl.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/* end broken header workaround includes */
|
||||
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4l-mplane/libv4l-mplane.c.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/libv4l-mplane/libv4l-mplane.c
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#else
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4l1/libv4l1.c.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/libv4l1/libv4l1.c
|
||||
@@ -58,7 +58,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include "../libv4lconvert/libv4lsyscall-priv.h"
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
|
@ -0,0 +1,26 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4l2/libv4l2.c.orig 2017-12-27 13:50:55.000000000 +0000
|
||||
+++ lib/libv4l2/libv4l2.c
|
||||
@@ -1144,7 +1144,9 @@ int v4l2_ioctl(int fd, unsigned long int
|
||||
break;
|
||||
case VIDIOC_S_STD:
|
||||
case VIDIOC_S_INPUT:
|
||||
+#ifdef VIDIOC_S_DV_TIMINGS
|
||||
case VIDIOC_S_DV_TIMINGS:
|
||||
+#endif
|
||||
is_capture_request = 1;
|
||||
stream_needs_locking = 1;
|
||||
break;
|
||||
@@ -1255,7 +1257,10 @@ no_capture_request:
|
||||
|
||||
case VIDIOC_S_STD:
|
||||
case VIDIOC_S_INPUT:
|
||||
- case VIDIOC_S_DV_TIMINGS: {
|
||||
+#ifdef VIDIOC_S_DV_TIMINGS
|
||||
+ case VIDIOC_S_DV_TIMINGS:
|
||||
+#endif
|
||||
+ {
|
||||
struct v4l2_format src_fmt = { 0 };
|
||||
unsigned int orig_dest_pixelformat =
|
||||
devices[index].dest_fmt.fmt.pix.pixelformat;
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4l2/log.c.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/libv4l2/log.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "../libv4lconvert/libv4lsyscall-priv.h"
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4l2/v4l2convert.c.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/libv4l2/v4l2convert.c
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4l2rds/libv4l2rds.c.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/libv4l2rds/libv4l2rds.c
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
|
@ -0,0 +1,22 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4lconvert/control/libv4lcontrol.c.orig 2020-05-02 12:16:20.000000000 +0000
|
||||
+++ lib/libv4lconvert/control/libv4lcontrol.c
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
-#ifndef __OpenBSD__
|
||||
+#if !defined(__OpenBSD__) && !defined(__NetBSD__)
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
#include <sys/mman.h>
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "libv4lcontrol.h"
|
||||
#include "libv4lcontrol-priv.h"
|
||||
#include "../libv4lsyscall-priv.h"
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
|
@ -0,0 +1,28 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4lconvert/libv4lsyscall-priv.h.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/libv4lconvert/libv4lsyscall-priv.h
|
||||
@@ -59,11 +59,10 @@
|
||||
#define _IOC_NR(cmd) ((cmd) & 0xFF)
|
||||
#define _IOC_TYPE(cmd) IOCGROUP(cmd)
|
||||
#define _IOC_SIZE(cmd) IOCPARM_LEN(cmd)
|
||||
-#define MAP_ANONYMOUS MAP_ANON
|
||||
#define MMAP2_PAGE_SHIFT 0
|
||||
#endif
|
||||
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@@ -111,6 +110,10 @@ register_t __syscall(quad_t, ...);
|
||||
#define SYS_MMAP(addr, len, prot, flags, fd, offset) \
|
||||
__syscall((quad_t)SYS_mmap, (void *)(addr), (size_t)(len), \
|
||||
(int)(prot), (int)(flags), (int)(fd), 0, (off_t)(offset))
|
||||
+#elif defined(__NetBSD__)
|
||||
+#define SYS_MMAP(addr, len, prot, flags, fd, offset) \
|
||||
+ __syscall((quad_t)SYS_mmap, (void *)(addr), (size_t)(len), \
|
||||
+ (int)(prot), (int)(flags), (int)(fd), 0, (off_t)(offset))
|
||||
#else
|
||||
#define SYS_MMAP(addr, len, prot, flags, fd, off) \
|
||||
syscall(SYS_mmap2, (void *)(addr), (size_t)(len), \
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- lib/libv4lconvert/processing/libv4lprocessing.h.orig 2017-01-22 17:33:34.000000000 +0000
|
||||
+++ lib/libv4lconvert/processing/libv4lprocessing.h
|
||||
@@ -22,7 +22,7 @@
|
||||
#define __LIBV4LPROCESSING_H
|
||||
|
||||
#include "../libv4lsyscall-priv.h"
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
Loading…
Reference in New Issue