A
alokmahor
I am trying to create simplest virtual webcam application which can display image file on my local filesystem.
After initial research on stackoverflow links and seeing OBS Studio source code I got some idea how can I achieve this.
Here is my confusion now:
After these steps I am not sure if I have to wrap these
Or How should I wrap these steps to create final application?
Continue reading...
After initial research on stackoverflow links and seeing OBS Studio source code I got some idea how can I achieve this.
- I would need to use Microsoft DirectShow.
- I would need to develop one source filter that would work as capture filter using IBaseFilter
- I would need to develop another source filter that would work as output filter or virtual webcam filter. I would need to compile this filter as .dll file and will need to register using
regsvr32.exe
As given on Building DirectShow Filters - Win32 apps - I would need to create Filter Graph and Capture Filter Graph using
CoCreateInstance
like
hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IFilterGraph, (void **)&graph);
hr = CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC_SERVER, IID_ICaptureGraphBuilder2, (void **)&builder); - Then I would need to add these filters to
Filter Graph
- Then I would set
Filter Graph
toCapture Filter Graph
likehr = builder->SetFiltergraph(graph);
Here is my confusion now:
After these steps I am not sure if I have to wrap these
Graph Filters
and Capture Graph Filter
in one application which would be having main
method and compile it to get .exe file or I need to compile as another .dll file.Or How should I wrap these steps to create final application?
Continue reading...