Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Making a "fake" camera driver

14 views
Skip to first unread message

Greg113

unread,
Oct 3, 2008, 10:22:01 AM10/3/08
to
I have to get our video into a third party app that only accepts data from
Directshow cameras. So I am making a "fake" camera driver. I want it to
take video generated by our program on the machine, and send it to the
driver, which will output it like its coming from a physical camera.
(Kludgy, I admit, but good things can come of this).

So I started with the WinDDK AVSTREAM avshws sample program. It generates a
test pattern and is recognized by the third party software as a real camera.
So I just have to replace the test pattern with data coming into the driver
from an application.

And using the WinDDK general ioctl sample to get video sized frames into a
driver. But I tried to fuse the code from avshws and ioctl and failed
miserably. I cannot come up with a DriverEntry function that sets up both
the ioctl table and the KsInitializeDriver properly. If KsInitializeDriver
is the last function call in the DriverEntry, the test pattern is outputted
from the driver, but the instant I use an external program to feed data to
the driver via ioctl, I get a blue screen. And if KsINtiialDriver is not
last, I don't get video.

Is there some trick to this? Or an easier way to send data to a camera
driver? (Can I just use named pipes, or shared memory or something?) I am
not that fluent in writing device drivers, so sample code would be real
helpful.
Thanks
Greg

0 new messages