Question

I had an idea, but don't know if it could be possible to do :

Could it be possible to code a usb cam driver who can multiplex a video source to any software that needs it ? a sort of "man in the middle" driver :)

Was it helpful?

Solution

If you need a Linux driver, look at the v4l loopback driver:

http://www.lavrsen.dk/foswiki/bin/view/Motion/VideoFourLinuxLoopbackDevice

It should be possible to combine that with some userland code to do what you want.

For Windows, you can probably do something in user space using DirectShow.

OTHER TIPS

Yes. As for how that is system dependent. You don't even say what OS you're talking about. At any rate both windows and linux support drivers that call other drivers.

This should be possible in the Windows driver model too. It's called an "upper level filter driver", and sits between the regular driver and userspace.

The underlying driver is apparently is exclusive, while your filter should not be. It may be wise then to read this blogpost on how to make drivers (non)exclusive.

Hrm, if it's GNU/Linux, MacOS or any other supported OS it might be possible to multiplex the device node with a simple enough FUSE module... If there are no responses along this line by tomorrow I'll try knocking up a little Perl (if I can find my cam...) :)

I thought about coding something like this (as a kernel module) some time ago but it ended up on the back burner - the idea was actually for webcams but could have be applied to provide a multiplexed, read-only device node abstracting any other device node providing a stream of data...

May want to look at a FTDI chip http://www.ftdichip.com/

Has a driver available for many OS's.

Also could look at the Arduino board that already has a USB chip on it. http://www.arduino.cc/.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top