开发者

How do I set the properties of a DirectShow Filters

Ok I have this 3d tv Transformation Filter. I can easily configure its properties by using GraphEdit开发者_如何学Go, right click on its properties and set whatever I want.

Now I want to set the properties automatically by building a Filter Graph in C++. I've read up the Windows SDK documentation and find out that I have to use the IKsPropertySet function (correct me if i'm wrong).

I have to use IKsPropertySet::QuerySupported to check whether it support this kind of property or not. And to do that, i have to know the

dwPropID

[in] Identifier of the property within the property set.

But how can I get that ID. Like this filter have the property of adjusting horizontal and vertical, but i cannot find the ID of that properties.

Is there anyway to list down all the properties ID that a filter support ?


Functionality for directshow filters are usually exposed through interfaces. Either standard directshow interfaces, or custom interfaces. You get the interface by calling QueryInterface on the COM object (probably your filter, but it could also be one of the pins). What kinds of interfaces the filter exposes is probably described in the filter documentation.

I think you shold try to take a look at some information about directshow and COM before you dive into coding. Here you'll find some info about DirecShow. And here you'll find some about COM.

If you are planning to do this in .net, try searching for directshownet. It's an open source project that wraps the directshow API for use in managed code.

-Svein

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜