From owner-freebsd-current@FreeBSD.ORG Sun Jan 10 19:33:03 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 7FB86106568F; Sun, 10 Jan 2010 19:33:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC818FC16; Sun, 10 Jan 2010 19:33:02 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=RYQgPGQ7BbsA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=8kQB0OdkAAAA:8 a=6I5d2MoRAAAA:8 a=OdR5sfXFAAAA:8 a=Qd2203DERVxIISpw-G8A:9 a=QmE9FGGqE5A4QaQAyOwA:7 a=pgQXwYCw-eX86rDFpIob2WWeY64A:4 a=9aOQ2cSd83gA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1333031176; Sun, 10 Jan 2010 20:32:59 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Sun, 10 Jan 2010 20:31:37 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.4; amd64; ; ) References: <201001101437.37269.hselasky@c2i.net> <179b97fb1001100940o74d5f42arcba36098dd0bdd34@mail.gmail.com> In-Reply-To: <179b97fb1001100940o74d5f42arcba36098dd0bdd34@mail.gmail.com> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?iso-8859-1?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?iso-8859-1?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7Co?= =?iso-8859-1?q?TlKMusi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001102031.37846.hselasky@c2i.net> Cc: Brandon Gooch , freebsd-multimedia@freebsd.org, freebsd-usb@freebsd.org 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: Sun, 10 Jan 2010 19:33:03 -0000 On Sunday 10 January 2010 18:40:17 Brandon Gooch wrote: > On Sun, Jan 10, 2010 at 1:37 PM, 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. > > Seems to work for just a second or two (I see my ugly mug on-screen), > and then this: > > # ./pwcview/pwcview > Webcam set to: 320x240 (sif) at 5 fps > libv4lconvert: Error decompressing JPEG: fill_nbits error: need 8 more bits > libv4l2: error converting / decoding frame data: v4l-convert: error > parsing JPEG header: Not a JPG file ? Hi, Maybe this is related to a bug in the recent JPEG library. Try googling. You can also try another mode: webcamd -s vga Or other commands. See webcamd -h . --HPS