please check if your port may use v4l_compat
Luigi Rizzo
rizzo at icir.org
Sat Feb 10 16:26:20 UTC 2007
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 <rizzo at icir.org> 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 at mahoroba.org ume@{,jp.}FreeBSD.org
> http://www.imasy.org/~ume/
More information about the freebsd-ports
mailing list