From owner-freebsd-ports@FreeBSD.ORG Sat Feb 10 16:24:42 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 3402716A406 for ; Sat, 10 Feb 2007 16:24:42 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.freebsd.org (Postfix) with ESMTP id EA8A713C471 for ; Sat, 10 Feb 2007 16:24:41 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from kasuga.mahoroba.org (IDENT:9HW+Biw0YeufEni+xGEfmbFU8tbBG3JyRH1KDzRQV9HvacBONR2aqpgMyaXIzXY3@kasuga.mahoroba.org [IPv6:2001:2f0:104:8010:20b:97ff:fe2e:b521]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.8/8.13.8) with ESMTP/inet6 id l1AGCCDm073900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Feb 2007 01:12:19 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 11 Feb 2007 01:12:11 +0900 Message-ID: From: Hajimu UMEMOTO To: Luigi Rizzo In-Reply-To: <20070209074429.B99372@xorpc.icir.org> References: <20070209074429.B99372@xorpc.icir.org> User-Agent: xcite1.38> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.93 (i386-pc-freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.2-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (ameno.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Sun, 11 Feb 2007 01:12:20 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on ameno.mahoroba.org 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:24:42 -0000 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: 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/