How can i Programmatically set a Directshow Filters' options?

自闭症网瘾萝莉.ら 提交于 2019-12-11 12:38:53

问题


I have filters in Graphedit whose settings can be changed.

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()

Is there a way to get access to these options in C#?

Update: http://sourceforge.net/projects/directshownet/forums/forum/460697/topic/1319584

shows you how to correctly use GetStreamCaps


回答1:


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.



来源:https://stackoverflow.com/questions/6471999/how-can-i-programmatically-set-a-directshow-filters-options

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