Microsoft Windows CE 3.0  


This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Filters are the basic building blocks of DirectShow. DirectShow separates the processing of multimedia data into discrete steps, and a filter represents one (or sometimes more than one) processing step. This enables applications to "mix and match" filters to perform many different kinds of operations on many different media formats using many different classes of hardware and software devices. For example, the File Source (Async) filter reads a file from a disk. Although each of these filters does something very unique internally, from the point of view of an application, each is just a DirectShow filter with certain standard characteristics: support for the IBaseFilter interface and one or more input and/or output pins which represent its connection(s) to one or more other DirectShow filters.

All DirectShow filters fall into one of these three categories: source filters, transform filters, and renderer filters.

Source Filters

Source filters present the raw multimedia data for processing. They may get it from a file on a hard disk (such as the File Source (Async) source filter), or from a CD or DVD drive, or they may get it from a "live" source such as a television receiver card or a capture card connected to a digital camera. (Source filters for all these scenarios are included with DirectShow and ship with every copy of Microsoft Windows 9x and Windows 2000.) Some source filters simply pass on the raw data to a parser or splitter filter, while other source filters also perform the parsing step themselves.

Transform Filters

Transform filters accept either raw or partially-processed data and process it further before passing it on. There are many types of transform filters including parsers that split raw byte streams into samples or frames, compressors and decompressors, and format converters. DirectShow includes many popular codecs. In the example described in The Filter Graph, the AVI Splitter and the AVI decompressor are both transform filters. (One transform filter that DirectShow does not provide is an MPEG-2 decoder. These are available in either hardware or software implementations from third-parties.)

Renderer Filters

Renderer filters generally accept fully-processed data and play it on the system's monitor or through the speakers or possibly through some external device. Also included in this category are "file-writer" filters that save data to disk or other persistent storage. The video renderer filters that come with DirectShow use DirectDraw to display video and the default audio renderer filter uses DirectSound to play audio.

Filters for playing, and converting many different media formats are supplied with DirectShow. Developers can also build their own custom filters for handling either custom or standard data formats.

 Last updated on Tuesday, May 18, 2004

© 2004 Microsoft Corporation. All rights reserved.