Microsoft DirectX 8.1 (C++)

Writing a DirectShow Application

A typical DirectShow application performs three basic steps, as illustrated in the following diagram.

Typical DirectShow application

  1. Creates an instance of the Filter Graph Manager, using the CoCreateInstance function.
  2. Uses the Filter Graph Manager to build a filter graph. (You might use other DirectShow helper components as well.)
  3. Controls the filter graph and responds to events.

To get started with DirectShow, read How To Play a File. It presents a simple console application that plays a file. The articles that follow, Setting the Video Window and Responding to Events, expand the program into a simple Windows application.