1

How can I set properties of a DirectShow filter in c#? For example I want to set resolution of a webcam or the clippings of a cropping filter.

daniel
  • 34,281
  • 39
  • 104
  • 158

1 Answers1

2

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.

For certain specific tasks such as choosing capture format (video resolution) there are well known universal approaches, e.g. Get/set video resolution when capturing image

Community
  • 1
  • 1
Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • I found out that when you're dealing with an undocumented filter, you can see what interfaces it implements by opening the filter properties in graphedit or graphbuilder and then by looking at the interfaces tab. I think this can be a good starting point for googling more about those interfaces and learning what you can do with them. – Redoman Oct 27 '20 at 06:11