Microsoft DirectX 8.1 (C++) |
Filters are the basic building blocks of DirectShow. DirectShow divides digital media processing into discrete steps, and each filter represents one or more steps. An application can perform a particular task by combining filters together.
For example:
Although each of these filters performs a unique function, the application can treat them in a similar way. All filters support the IBaseFilter interface; many support other, more specialized interfaces.
Most DirectShow filters fall into one of several broad categories:
Filters for playing, converting, and capturing many different media formats are supplied with DirectShow and ship with every copy of Windows. Developers can also build their own custom filters for handling either custom or standard data formats.
As of DirectX 8, DirectShow also supports a simpler model, DirectX Media Objects (DMOs). DMOs are similar to DirectShow filters but support a much smaller set of APIs. You can insert a DMO in a DirectShow filter graph, using the DMO Wrapper filter. Unlike a filter, however, you can also use a DMO outside of DirectShow. Although DMOs do not completely replace DirectShow filters, they are appropriate for many scenarios, particularly for creating custom encoders and decoders.