Can't change video capture resolution using c#

纵然是瞬间 提交于 2019-12-04 12:36:49

Make sure that when you look up your HR error codes you look them up using the DirectShow Error and Success Code list, not the generic HR code list. You'll see from that list that the actual meaning of 0x80040209 is:

VFW_E_NOT_CONNECTED The operation cannot be performed because the pins are not connected.

Looks like your graph is not connecting your sample grabber filter. Make sure to pass the sample grabber in your call to RenderStream.

The right way to change web camera resolution is to query its output pin IAMStreamConfig interface. It can list available formats and resolution and choose one. If you run GraphEditPlus and right click the camera filter's output pin, you'll be able to see that list and make a choice of resolution. Then you can generate code (via File menu) and see how it's done in C#.

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