Virtual video source device driver

I’ve found this Max Paklin article on KS properties: http://www.wd-3.com/archive/KsProxyPlugin.htm
It implement the “Frame Rate” property (just one long number) and it has a sample app that shows the driver output and accesses that property.
So far it looks like a perfect starting point to me and all I need to do (at least this is how it seems to me now) is to pass a larger buffer containing a bitmap data.
Do you think I’m on the right track?

xxxxx@rogers.com wrote:

I’ve found this Max Paklin article on KS properties: http://www.wd-3.com/archive/KsProxyPlugin.htm
It implement the “Frame Rate” property (just one long number) and it has a sample app that shows the driver output and accesses that property.
So far it looks like a perfect starting point to me and all I need to do (at least this is how it seems to me now) is to pass a larger buffer containing a bitmap data.
Do you think I’m on the right track?

Yes and no.

The Max Paklin article tells you how to write a ksproxy plugin, which
allows you to expose a friendly COM server interface for your new
property. However, the proxy part is not strictly necessary. All you
need is the KSPROPERTY definitions in the AVStream driver itself, to
define the data structures and hook up the handler callback. Once you
have that, your user-mode application can use IKsControl to talk to the
property. Since you will be the only user, you don’t really need the
friendly COM wrapper.


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

xxxxx@rogers.com wrote:

Does it apply to the AVStream sample? Looks like it does as I still have a kernel streaming driver.
I have 2 questions regarding to implementing and using that driver property set:

  • Where can I read or see an example of how to add a property set?

One very prolific example is src\swtuner\bdatuner\capture. This is an
AVStream driver (actually, it’s a BDA driver, which is a layer on top of
AVStream, but it uses the exact same concepts). You can see that they
define property items, then define a property set which includes those
property items. Each property item defines the size of the input and
output structures, plus the “get” and “set” handler functions (one or
the other or both).

  • Where can I read or see an example of how a user mode application can talk to a streaming kernel driver and feed some data into it via the property set?

If you Google for IKsControl, you’ll find a couple of samples. There’s
not much to it. Once you have the IBaseFilter (which you get after
enumerating for the device), you just use QueryInterface to get an
IKsControl interface from it. IKsControl includes a KsProperty function
that does the equivalent of an ioctl into your property handler.


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