How to create a virtual video camera driver?

Hi masters:

We want to create a virtual camera driver. The virtual camera can read an avi file as the video source in order to make use of other applications which communicate with video cameras.

Any advice will be appreciated.

xxxxx@idiov.com wrote:

We want to create a virtual camera driver. The virtual camera can read an avi file as the video source in order to make use of other applications which communicate with video cameras.

Any advice will be appreciated.

My advice is to forget about writing a kernel driver, and instead write
this as a normal DirectShow source filter.

There is a tendency to think that kernel drivers are somehow magical.
However, remember that kernel drivers do not actually participate
directly in DirectShow graphs. Capture drivers work because there is a
user-mode DirectShow source filter called ksproxy that communicates with
the driver. That immediately implies that anything you can do with a
kernel capture driver can also be done with a normal source filter.

And it is unquestionably true that source filters are much easier to
write, MUCH easier to debug, and much easier to distribute.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

If you will be able to find the old Win95 DDK - then there are headers and
libs there to build an old-style WINMM driver, a user-mode DLL.

Then DirectShow’s QCAP.DLL will automatically wrap it around and represent
as DirectShow source.

Works with GraphEdt, AmCap, MSN Messenger’s video facility (I remember this
will also require preview support in your driver, at least some versions of
Messenger used the constant pinging by preview instead of the usual video) and
so on.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi masters:
>
> We want to create a virtual camera driver. The virtual camera can read an avi
file as the video source in order to make use of other applications which
communicate with video cameras.
>
> Any advice will be appreciated.
>

Thank you Tim and Maxim. I am wondering whether your opinions are the same meaning?

xxxxx@idiov.com wrote:

Thank you Tim and Maxim. I am wondering whether your opinions are the same meaning?

Not quite. Maxim is, I believe, advocating a Video For Windows driver.
I don’t know what else he would mean by a “winmm” driver for video.

I’m advocating a DirectShow source filter.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> Not quite. Maxim is, I believe, advocating a Video For Windows driver.

I don’t know what else he would mean by a “winmm” driver for video.

Yes. It is really a WINMM’s driver, same way as old-style wave sound driver
DLLs.

I’m advocating a DirectShow source filter.

Yes.

Differences:

  • WINMM driver is easier to code - lesser things to support, no COM etc, and it
    is automatically wrapped by QCAP.DLL to be represented as DirectShow.
  • WINMM driver requires the outdated DDK.
  • WINMM driver has lesser functionality then DirectShow filter.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com