From owner-svn-src-all@FreeBSD.ORG Sat Jul 6 19:59:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C002EDC0; Sat, 6 Jul 2013 19:59:07 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A1DCB1286; Sat, 6 Jul 2013 19:59:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r66Jx7HK087891; Sat, 6 Jul 2013 19:59:07 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r66Jx7Wi087888; Sat, 6 Jul 2013 19:59:07 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201307061959.r66Jx7Wi087888@svn.freebsd.org> From: Alexander Leidinger Date: Sat, 6 Jul 2013 19:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252892 - in head/sys: compat/linux contrib/v4l X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2013 19:59:07 -0000 Author: netchild Date: Sat Jul 6 19:59:06 2013 New Revision: 252892 URL: http://svnweb.freebsd.org/changeset/base/252892 Log: - Move videodev headers from compat/linux to contrib/v4l (cp from vendor and apply diff to compat/linux versions). - The cp implies an update of videodev2.h to the linux kernel 2.6.34.14 one. The update makes video in skype v4 work on FreeBSD. Tested by: Artyom Mirgorodskiy (update of header only) Added: head/sys/contrib/v4l/ - copied from r252890, vendor/v4l/dist/ Deleted: head/sys/compat/linux/linux_videodev.h head/sys/compat/linux/linux_videodev2.h Modified: head/sys/compat/linux/linux_ioctl.c head/sys/contrib/v4l/videodev.h head/sys/contrib/v4l/videodev2.h Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Sat Jul 6 19:43:42 2013 (r252891) +++ head/sys/compat/linux/linux_ioctl.c Sat Jul 6 19:59:06 2013 (r252892) @@ -85,10 +85,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include -#include +#include #include CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); Modified: head/sys/contrib/v4l/videodev.h ============================================================================== --- vendor/v4l/dist/videodev.h Sat Jul 6 18:28:06 2013 (r252890) +++ head/sys/contrib/v4l/videodev.h Sat Jul 6 19:59:06 2013 (r252892) @@ -1,48 +1,41 @@ +/* + * This header comes from linux, but it has no license. The author + * (Alan Cox @ Redhat) gave explicit permissions to use it in FreeBSD. + * The FreeBSD vendor branch for v4l gives a more detailed description + * about this in the README. + * + * $FreeBSD$ + */ + #ifndef __LINUX_VIDEODEV_H #define __LINUX_VIDEODEV_H -#include +#include +typedef int32_t __s32; +typedef uint32_t __u32; +typedef uint16_t __u16; +typedef uint8_t __u8; +#if 0 #define HAVE_V4L1 1 #include +#endif -#ifdef __KERNEL__ - -#include - -extern struct video_device* video_devdata(struct file*); - -#define to_video_device(cd) container_of(cd, struct video_device, class_dev) -static inline void -video_device_create_file(struct video_device *vfd, - struct class_device_attribute *attr) -{ - class_device_create_file(&vfd->class_dev, attr); -} -static inline void -video_device_remove_file(struct video_device *vfd, - struct class_device_attribute *attr) -{ - class_device_remove_file(&vfd->class_dev, attr); -} - -#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ -/* helper functions to access driver private data. */ -static inline void *video_get_drvdata(struct video_device *dev) -{ - return dev->priv; -} - -static inline void video_set_drvdata(struct video_device *dev, void *data) -{ - dev->priv = data; -} -#endif - -extern int video_exclusive_open(struct inode *inode, struct file *file); -extern int video_exclusive_release(struct inode *inode, struct file *file); -#endif /* __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 { @@ -157,7 +150,7 @@ struct video_window __u32 width,height; /* Its size */ __u32 chromakey; __u32 flags; - struct video_clip __user *clips; /* Set only */ + struct video_clip *clips; /* Set only */ int clipcount; #define VIDEO_WINDOW_INTERLACE 1 #define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ @@ -197,6 +190,8 @@ struct video_key __u32 flags; }; +#define VIDEO_MAX_FRAME 32 + struct video_mbuf { int size; /* Total memory to map */ Modified: head/sys/contrib/v4l/videodev2.h ============================================================================== --- vendor/v4l/dist/videodev2.h Sat Jul 6 18:28:06 2013 (r252890) +++ head/sys/contrib/v4l/videodev2.h Sat Jul 6 19:59:06 2013 (r252892) @@ -52,10 +52,18 @@ * Justin Schoeman * Hans Verkuil * et al. + * + * $FreeBSD$ */ #ifndef __LINUX_VIDEODEV2_H #define __LINUX_VIDEODEV2_H +#ifdef __FreeBSD__ +#define __user +typedef uint64_t __u64; +typedef int64_t __s64; +typedef uint32_t __le32; +#else #ifdef __KERNEL__ #include /* need struct timeval */ #else @@ -64,6 +72,7 @@ #include #include #include +#endif /* * Common stuff for both V4L1 and V4L2