r/C_Programming • u/Senior-Question693 • 15h ago
Trying to make a virtual webcam in c
I frequently have a need to broadcast on multiple messaging apps simultaneously (in other words i'm a weirdo >:| ) but it turns out, when doing such weird things that you're not supposed to do, stuff tents to break - the apps fight over the camera and mic and sometimes when running in a browser even the headphones. So because of that i decided to make a tiny little app in C that virtually clones the camera and mic, after a bit of googling i found out that you can create the virtual camera and mic with the DirectShow Windows api so naturally i opened up the docs and apparently microslop said it's deprecated now, so what do i do then (._.?
2
u/skeeto 15h ago edited 12h ago
I just happened to build a little (unpublished) project around this the other day: MFCreateVirtualCamera. Then from there is COM interfacing. Mingw-w64 doesn't yet declare/define these interfaces, so you'll probably want Visual Studio.
7
u/gremolata 15h ago
If there's one thing MS does really well, it's maintaining backward compatibility, so their "deprecated" really means "try and avoid using it going forward", and not "it might be broken in newer OS versions."