How do I set the properties of a DirectShow Filters

有些话、适合烂在心里 提交于 2019-12-13 02:49:12

问题


Ok I have this 3d tv Transformation Filter. I can easily configure its properties by using GraphEdit, 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 ?


回答1:


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



来源:https://stackoverflow.com/questions/4930586/how-do-i-set-the-properties-of-a-directshow-filters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!