Introduction
The purpose of this article is to help to work on video stream using a simple plugin approach. Instead of using a full DShow architecture, I use the FxEngine Framework from SMProcess.
My approach was the following: create a video source plugin using DShow's components and process video stream with one or several processing plugins using C++.
Background
The plugin is based on the StillCap sample from DShow SDK (SDK\Samples\Multimedia\DirectShow\Editing\StillCap). There is an excellent article by Chesnokov Yuriy about this.
Using the Code
Firstly, I used the Framework to build the plugin (Out pin, plugin's parameter, Win32 dialog and plugin interface). I just read sample code and the user's guide that comes with the Framework installation.
Secondly, I used DShow programming to get video data.
The video capture is done by:
- Creating an
ISampleGrabber object to receive video data
- Retrieving the default video capture device using
GetDefaultCapDevice() method
- Initializing video capture device using the
InitVideoCapture() method
Using the Plugin
As shown in the screenshot above, I used the plugin in the Framework Editor to stream video data into several RGB splitters.