如何以编程方式设置Directshow过滤器的选项?
我在Graphedit中有过滤器,可以更改其设置。
I have filters in Graphedit whose settings can be changed.
我有一个USB网络摄像头,可以转到其属性并以不同的大小进行流传输,但是我不确定我如何以编程方式更改这些类型的选项,而不会弹出实际的网络摄像头属性框。我想在某种意义上保持流线排列。
I have a usb webcam which i can go to its properties and make it stream at different sizes, but im not sure how i would change these types of options programmatically without popping up the actual webcam property box. I want to keep it stream lined in a sense.
.QueryFilterInfo()
不允许我访问这些类型的选项,
didn't give me any access to those types of options, and neither did
.QueryPinInfo()
有没有办法在C#中访问这些选项?
Is there a way to get access to these options in C#?
更新:
http:/ /sourceforge.net/projects/directshownet/forums/forum/460697/topic/1319584
向您展示如何正确使用GetStreamCaps
shows you how to correctly use GetStreamCaps
您正在寻找的界面是 IAMStreamConfig 这样,您就可以指定fps,高度和宽度等。即使该链接适用于c ++版本,IAMStreamConfig在C#中可用,因为它已列出此处。
The interface you're looking for is IAMStreamConfig on the source filter's output pin This lets you specify fps and height and width, etc. Even though the link is for the c++ version, IAMStreamConfig is available in C# as it is listed here.