The Filter Graph
Whenever a media file or stream is played, recorded, captured, broadcast, or processed in any way, it is done by means of connecting one or more filters together in a configuration called a filter graph. The graph-building process can be done manually by an application or automatically by the Graph Builder or Filter Graph Manager. In either case the process usually begins with the source filter and is always based on two main factors: the number of streams and their media types that a filter expects as input, and the number of streams and their media types that it outputs.
For example, consider a simple filter graph for playing back an AVI file with compressed video. A source filter, such as the file source (Async) filter, would read the bytes from the file and pass them on to the AVI splitter filter video compression scheme, parse the data into time-stamped media samples, and pass the video samples downstream to the AVI Decompressor. For video, each sample contains one frame of video. The AVI Decompressor would find the correct codec to decompress the samples and pass the decompressed video frames to the video renderer filter, which will display the video on the computer screen. Because the audio samples are not compressed, the AVI Splitter can connect directly to the DirectSound Audio Renderer.
© 2005 Microsoft Corporation. All rights reserved.