Windows 10 Project and build structure for Microsoft DirectShow based virtual webcam application on Window 10

  • Thread starter Thread starter alokmahor
  • Start date Start date
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.

  1. I would need to use Microsoft DirectShow.
  2. I would need to develop one source filter that would work as capture filter using IBaseFilter
  3. 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
  4. 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);
  5. Then I would need to add these filters to Filter Graph
  6. Then I would set Filter Graph to Capture Filter Graph like hr = 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...
 
Back
Top