From owner-freebsd-current@FreeBSD.ORG Tue Jan 12 12:48:55 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D5A71065672 for ; Tue, 12 Jan 2010 12:48:55 +0000 (UTC) (envelope-from mik@pc.dk) Received: from pqueueb.post.tele.dk (pqueueb.post.tele.dk [193.162.153.10]) by mx1.freebsd.org (Postfix) with ESMTP id 06AD88FC16 for ; Tue, 12 Jan 2010 12:48:54 +0000 (UTC) Received: from pfepa.post.tele.dk (pfepa.post.tele.dk [195.41.46.235]) by pqueueb.post.tele.dk (Postfix) with ESMTP id A4FDD8038 for ; Tue, 12 Jan 2010 13:18:06 +0100 (CET) Received: from miknet.dk (0x5738c0ef.rdnqu2.dynamic.dsl.tele.dk [87.56.192.239]) by pfepa.post.tele.dk (Postfix) with ESMTP id 2CA9FA5001D for ; Tue, 12 Jan 2010 13:17:31 +0100 (CET) Date: Tue, 12 Jan 2010 13:16:41 +0100 From: Martin Kristensen To: freebsd-current@freebsd.org Message-ID: <20100112131641.15f44ead@miknet.dk> In-Reply-To: <201001101437.37269.hselasky@c2i.net> References: <201001101437.37269.hselasky@c2i.net> Organization: Private X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.5; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [FreeBSD 8/9] USB webcamd and video4bsd: Call for testing X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 12:48:55 -0000 On Sun, 10 Jan 2010 14:37:37 +0100 Hans Petter Selasky wrote: > Hi, > > During the last couple of days I've spent some time to finish my > webcam daemon. My webcam daemon is basically an application which > consists of userspace Video4Linux USB webcam drivers and some uLinux > glue code which links with libc, pthreads and libusb. The webcamd > talks to /dev/video_daemonX which is provided by the video4bsd kernel > module. There is full support for mmap/read/write/open/close. poll is > not supported. > > Basic operation and idea: > > /dev/video_daemonX is the interface for the webcamd. /dev/videoX is > the interface for the V4L application. The video4bsd transports all > data between these two devices. In the case the V4L application is > using mmap, no data is copied due to shared kernel memory buffer! > > Licensing issues: > > Effectivly the webcamd userland program becomes GPL'ed due to the V4L > USB drivers which are GPL licensed. Some files inside the webcamd > remains BSD licensed which allows for building similar BSD licensed > daemons. > > The rest of the code is BSD licensed. > > Source code: > > 1) FreeBSD 8-stable > > 2) Apply the patch below and re-install libusb in /usr/src/lib/libusb: > > http://p4web.freebsd.org/chv.cgi?CH=172876 > > http://perforce.freebsd.org/chv.cgi?CH=172876 > > 3) Compile ulinux (webcamd + libv4l + pwcview) and video4bsd (must be > checked out in the same folder due to dependencies) > > svn --username anonsvn --password anonsvn \ > checkout svn://svn.turbocat.net/i4b/trunk/usbcam/video4bsd > > make all install > kldload video4bsd > > svn --username anonsvn --password anonsvn \ > checkout svn://svn.turbocat.net/i4b/trunk/usbcam/ulinux > > make fetch > make patch > make all > make install > > # this will attach to the first detected webcam: > ./webcamd > > # this will try to attach to the given USB unit, interface and V4B > unit. ./webcamd -d ugen4.1 -i 0 -v 0 > > # this will display webcam contents from /dev/video0 by default. > ./pwcview/pwcview > > Feedback and bug reports are welcome. > > Yes, I am working on getting this into ports! > > Known issues: > > 1) If you detach the USB webcam you need to manually restart the > webcamd. > > --HPS > > Support: I will be available at #bsdusb on efnet during the day. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org" I works for me on 8-stable, although I get flickering on the lower third of the pwcview screen. I am using a logitech quickcam pro 9000. Output from webcamd: KrefGet: 0x800c95c04 = 1 KrefGet: 0x800c95c04 = 2 KrefGet: 0x800c960bc = 1 KrefGet: 0x800c961ac = 1 Added device 0x800ce2d08 KrefGet: 0x800ce2d0c = 1 KrefGet: 0x800ce2d0c = 2 KrefPut: 0x800ce2d0c = 2 Output from pwcview: libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffec libv4lconvert: Error decompressing JPEG: fill_nbits error: need 1 more bits libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000fffd libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000fffd libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000fffd libv4lconvert: Error decompressing JPEG: fill_nbits error: need 1 more bits libv4lconvert: Error decompressing JPEG: fill_nbits error: need 1 more bits libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffd9 libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffd9 libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffd9 libv4lconvert: Error decompressing JPEG: fill_nbits error: need 5 more bits libv4lconvert: Error decompressing JPEG: fill_nbits error: need 1 more bits libv4lconvert: Error decompressing JPEG: fill_nbits error: need 5 more bits libv4lconvert: Error decompressing JPEG: fill_nbits error: need 4 more bits libv4lconvert: Error decompressing JPEG: fill_nbits error: need 3 more bits libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff Great job! -- Martin Kristensen