简体   繁体   English

在DirectShow.NET中设置过滤器的属性

[英]Set properties of filter in DirectShow.NET

How can I set properties of a DirectShow filter in c#? 如何在C#中设置DirectShow过滤器的属性? For example I want to set resolution of a webcam or the clippings of a cropping filter. 例如,我想设置摄像头的分辨率或裁剪滤镜的剪裁。

Filters typically have their "private interfaces", custom filter specific interfaces to control the filter in specific way, such as to set it up and/or alter its runtime behavior. 过滤器通常具有“专用接口”,自定义过滤器特定的接口,以特定方式控制过滤器,例如设置过滤器和/或更改其运行时行为。 There is no universal interface because filters are different. 没有通用接口,因为过滤器不同。 You normally know in advance what filter you are dealing with, so you QueryInterface its interface of interest and then set it up in desired way. 通常,您通常事先知道要处理的过滤器,因此您可以查询感兴趣的QueryInterface接口,然后以所需的方式进行设置。

For certain specific tasks such as choosing capture format (video resolution) there are well known universal approaches, eg Get/set video resolution when capturing image 对于某些特定任务,例如选择捕获格式(视频分辨率),有众所周知的通用方法,例如在捕获图像时获取/设置视频分辨率

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM