如何设置 DirectShow 过滤器的属性
好的,我有这个 3D 电视转换滤镜。我可以使用 GraphEdit 轻松配置其属性,右键单击其属性并设置我想要的任何内容。
现在我想通过在 C++ 中构建过滤器图来自动设置属性。 我已经阅读了 Windows SDK 文档,发现我必须使用 IKsPropertySet 函数(如果我错了,请纠正我)。
我必须使用 IKsPropertySet::QuerySupported 来检查它是否支持这种属性。为此,我必须知道
dwPropID
属性集中属性的
[in] 标识符。但我怎样才能得到这个ID。像这个过滤器有调整水平和垂直的属性,但我找不到该属性的ID。
有没有办法列出过滤器支持的所有属性 ID?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
directshow 过滤器的功能通常通过接口公开。标准 directshow 接口或自定义接口。您可以通过在 COM 对象(可能是您的过滤器,但也可能是引脚之一)上调用 QueryInterface 来获取该接口。过滤器公开的接口类型可能在过滤器文档中进行了描述。
我认为在你开始编码之前你应该尝试看看一些关于 directshow 和 COM 的信息。 在这里您会找到一些信息关于 DirecShow。 在这里您将找到一些有关 COM 的信息。
如果您计划在 .net 中执行此操作,请尝试搜索 directshownet。它是一个开源项目,封装了 directshow API 以在托管代码中使用。
-斯韦因
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