Currently there are a lot of video capture devices commercially available; anyone can buy a digital camera or a webcam at a reasonable price. All of these devices can be easily controlled from a program developed by ourselves using Microsoft DirectShow. DirectShow is a set of interfaces that provide a generic API with which you can capture and play audio and video regardless of the brand or model of camera you are using. It also allows recording and playback of files in any format.
In the previous article in this series, I did a summary of the basic components of DirectShow: filters, filter graphs and pins to connect the elements together, and how we can identify them using the GraphEdit tool of the SDK. In this article I will show how to build a "simple" application to capture and playback video using the interfaces provided in DirectShow, a subset of the COM distributed object model from Microsoft.