Search code examples
winapivideodirectshowvideo-capture

Different kinds of video input devices in DirectShow


DirectShow supports many kinds of video input devices provided appropriate capture filters are available in a system. Is there a way in DirectShow to detect a type of a video input device? Say, I'm enumerating over video input devices and want to take cameras only... If there is no such API in DirectShow specifically, can you suggest other ways for finding camera devices?


Solution

  • Parsing moniker display name you can get some leads, specifically you can typically sort out virtual cameras, which are not implemented via kernel mode driver (with a real hardware device on the back end you can get VID/PID identifiers to check, for instance, against your internal database of known devices). There is little you can do further, there is no other information attached there.

    You will want to read David Miller's posts on this thread: How to identify a video device correctly?.