Virtual webcam in C ++

I want to write a new virtual webcam driver, which, for example, will use AVI or live broadcast, for example, for the screen and transmit it as the source of the webcam.

I will not have a webcam, I want to add a virtual webcam that will broadcast the desktop.

Should I write a webcam in kernel mode to do this? If so, can you lead me to a sample webcam driver?

If I have to do this in DirectShow, how to add a webcam to the list of webcams in the control panel, for example, in Yahoo Messenger, I can select this device as a webcam and transfer the desktop as webcam images .

How can i start?

+4
c ++ visual-c ++ kernel
source share
2 answers

You need to write the original DirectShow filter. The Windows SDK contains a library called baseclasses that helps you develop such a filter. For a good starting point, see CSourceStream .

In order for the device to appear under other video streaming devices, you need to register your filter using the DirectShow API in the CLSID_VideoInputCategory. You do not need / do not need to write a kernel driver.

+4
source share

You can start with the "amcap" sample in the DirectShow package, this is a great sample for beginners. If you want to list the webcam devices, go to the SelectDevices () method.

+2
source share

All Articles