xxxxx@flextronicssoftware.com wrote:
I am new to streaming drivers, suppose to a write driver for USB 2.0 web camera on Windows Vista OS. I don’t know what to choose between WDM/WDF model. Microsoft provides only WDM sample on this. Expecting your valuable commets.
You have several choices.
As Doron said, the best choice is to design your web camera to meet the
USB Video Class Specification. That way, you do not need to write a
driver at all. The standard operating system driver usbvideo.sys will
handle it for you, both on Windows and on Linux.
Assuming your hardware is already designed and cannot be made compliant,
there are still several choices. One choice is to write a lower filter
to usbvideo.sys to make your hardware LOOK like Video Class. I’ve done
this with usbaudio.sys, but not with Video Class, so I don’t really
appreciate how much effort this might be.
Another choice is to use the USBCAMD library. The USBINTEL sample in
the DDK demonstrates this. USBCAMD is somewhat dated, but it still works.
Another is to write an AVStream driver. The avssamp and avshws samples
demonstrate the basics of an AVStream driver, but they all have
“simulated” hardware. The job, then, becomes removing the hardware
simulation and bolting on a class to talk to your USB device. I’m
actually in the middle of this task right now, and it was only a few
weeks of work. But remember that I’ve done quite a number of webcam and
AVStream drivers in the past; this was merely the first time I did both
at the same time.
Another choice is to write a stream-class driver. This gives you more
control, but it’s also more trouble and somewhat less intuitive (that’s
strictly my opinion; I know there are people who prefer stream-class to
AVStream).
Yet another choice is to write a VFW driver. Again, it is a dated
technology, but it still works.
So, which do I recommend? Until recently, I would have pointed to
USBCAMD without reservation. But now that I’m doing an AVStream
version, I think that it’s about the same amount of work, and probably
provides a better path into the future.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.