From owner-freebsd-ports@FreeBSD.ORG Sat Feb 10 16:26:20 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C566E16A401 for ; Sat, 10 Feb 2007 16:26:20 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id B1F4613C47E for ; Sat, 10 Feb 2007 16:26:20 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l1AGQKii013596; Sat, 10 Feb 2007 08:26:20 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l1AGQKJv013595; Sat, 10 Feb 2007 08:26:20 -0800 (PST) (envelope-from rizzo) Date: Sat, 10 Feb 2007 08:26:20 -0800 From: Luigi Rizzo To: Hajimu UMEMOTO Message-ID: <20070210082620.C13054@xorpc.icir.org> References: <20070209074429.B99372@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from ume@freebsd.org on Sun, Feb 11, 2007 at 01:12:11AM +0900 Cc: ports@freebsd.org Subject: Re: please check if your port may use v4l_compat X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Feb 2007 16:26:20 -0000 On Sun, Feb 11, 2007 at 01:12:11AM +0900, Hajimu UMEMOTO wrote: > Hi, > > >>>>> On Fri, 9 Feb 2007 07:44:29 -0800 > >>>>> Luigi Rizzo said: > > rizzo> after hitting a couple of them myself (net/ekiga and mbone/vic), > rizzo> i believe that there is a number of ports, especially in the > rizzo> multimedia/ graphics/ net/ mbone/ categories which might > rizzo> make good use of a > > rizzo> BUILD_DEPENDS+= v4l_compat>=1.0.20060801:${PORTSDIR}/multimedia/v4l_compat > > rizzo> line in their Makefile, to enable support of video4linux devices. > > I'm using vic with pwc.ko. Since vic uses MMAP, it works only when > pwcbsd is built with MMAP support. I tried both linux-gspca-kmod and > linux-ov511-kmod with vic. But, they didn't work. It seems neither > linux-gspca-kmod nor linux-ov511-kmod support MMAP. > I need following patch to work Logicool Qcam for Notebooks Pro: in a related email (to multimedia) i sent some patches for vic that make it work without mmap. Your use of capability.minwidth/capability.minheight is also a nice addition. I also committed a change to linux-kmod-compat that makes MMAP properly 'unsupported' (i.e. returns EINVAL on the mmap-related ioctls) so the client understands the lack of support. cheers luigi > Index: vic/vic/video/grabber-video4linux.cpp > diff -u vic/vic/video/grabber-video4linux.cpp:1.1.1.1 vic/vic/video/grabber-video4linux.cpp:1.2 > --- vic/vic/video/grabber-video4linux.cpp:1.1.1.1 Mon Sep 3 18:34:10 2001 > +++ vic/vic/video/grabber-video4linux.cpp Fri Aug 22 20:01:42 2003 > @@ -268,10 +268,17 @@ > perror("open"); > exit(1); > } > + > + /* ask for capabilities */ > + if (-1 == ioctl(fd_,VIDIOCGCAP,&capability)) { > + perror("ioctl VIDIOCGCAP"); > + exit(1); > + } > + > vid_mmap.format = VIDEO_PALETTE_YUV422P; > vid_mmap.frame = 0; > - vid_mmap.width = PAL_WIDTH; > - vid_mmap.height = PAL_HEIGHT; > + vid_mmap.width = capability.minwidth; > + vid_mmap.height = capability.minheight; > > if (-1 != ioctl(fd_, VIDIOCMCAPTURE, &vid_mmap)) { > have_422P = 1; > @@ -284,11 +291,6 @@ > perror("open"); > exit(1); > } > - /* ask for capabilities */ > - if (-1 == ioctl(fd_,VIDIOCGCAP,&capability)) { > - perror("ioctl VIDIOCGCAP"); > - exit(1); > - } > channels = (struct video_channel*) > calloc(capability.channels,sizeof(struct video_channel)); > for (i = 0; i < capability.channels; i++) { > > > rizzo> If you have a match, check the path where the file is looked up, > rizzo> and possibly correct it (some only try /usr/include/linux/videodev.h > rizzo> because that is the linux location). > > The vic's configure tries only /usr/include/linux/videodev.h. So, we > need following patch: > > Index: vic/configure.in > diff -u vic/configure.in.orig vic/configure.in > --- vic/configure.in.orig Wed Jun 14 23:37:19 2006 > +++ vic/configure.in Wed Jun 14 23:44:08 2006 > @@ -70,6 +70,6 @@ > -r /usr/include/dev/ic/bt8xx.h ; then > V_OBJ_GRABBER="video/grabber-meteor.o $V_OBJ_GRABBER" > fi > -if test -r /usr/include/linux/videodev.h ; then > +if test -r /usr/include/linux/videodev.h -o /usr/local/include/linux/videodev.h ; then > V_OBJ_GRABBER="video/grabber-video4linux.o $V_OBJ_GRABBER" > fi > > > Sincerely, > > -- > Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan > ume@mahoroba.org ume@{,jp.}FreeBSD.org > http://www.imasy.org/~ume/