[FreeBSD 8/9] USB webcamd and video4bsd: Call for testing
Daichi GOTO
daichi at freebsd.org
Fri Jan 22 05:22:27 UTC 2010
Hi Hans, I have checked your work, and it works well, great :)
This is a little tweak,
--- /usr/local/etc/devd/webcamd.conf.orig 2010-01-22 13:19:20.371987293
+0900
+++ /usr/local/etc/devd/webcamd.conf 2010-01-22 13:52:00.286912793 +0900
@@ -1,5 +1,5 @@
attach 100 {
- device-name "ugen[0-9]+";
+ device-name "ugen[0-9.]+";
match "intclass" "(0x0e|0xff)";
action "/usr/local/etc/rc.d/webcamd start $device-name";
};
I want to know what does "intclass" mean. The webcamd(8) cannot
been engaged automatically by devd(8), because of not match of
"intclass".
when webcam device attached, cosole output:
Jan 22 13:50:26 parancell daichi: Unknown USB device: vendor 0x046d
product 0x09a2 bus uhub7
Jan 22 13:50:26 parancell kernel: ugen7.2: <vendor 0x046d> at usbus7
% sudo usbconfig -d ugen7.2
ugen7.2: <product 0x09a2 vendor 0x046d> at usbus7, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=ON
%
On 2010/01/10 22:37, 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
--
Daichi GOTO
81-42-316-7945 | daichi at ongs.co.jp | http://www.ongs.co.jp
LinkedIn: http://linkedin.com/in/daichigoto
More information about the freebsd-current
mailing list