如何设置DirectShow过滤器的属性 [英] How do I set the properties of a DirectShow Filters

查看:293
本文介绍了如何设置DirectShow过滤器的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我有这个3d电视转换过滤器。我可以通过使用GraphEdit轻松配置它的属性,右键单击它的属性并设置任何我想要的。

现在我想通过在C ++。
我读了Windows SDK文档,发现我必须使用IKsPropertySet函数(纠正我,如果我错了)。

I必须使用IKsPropertySet :: QuerySupported来检查它是否支持这种属性。而要做到这一点,我必须知道的

dwPropID



[in]标识符财产集。

但是我怎样才能得到这个ID。像这个过滤器有调整水平和垂直的属性,但我找不到那个属性的ID。

有没有办法列出所有的属性ID,一个过滤器支持?

解决方案

directshow过滤器的功能通常通过接口暴露。标准的directshow接口或自定义接口。你可以通过调用COM对象上的QueryInterface来获得接口(可能是你的过滤器,但也可能是其中的一个接口)。过滤器文档中可能描述了过滤器暴露的什么类型的接口。



我想你应该先试着看一下关于directshow和COM的一些信息,然后再进入编码领域。 这里你会发现一些信息关于DirecShow。和这里你会发现一些关于COM的。



如果您打算在.net中执行此操作,请尝试搜索directshownet。这是一个开源项目,它包装了用于托管代码的directshow API。



-Svein


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 ?

解决方案

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

这篇关于如何设置DirectShow过滤器的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆