Partager via


Write a Transform Filter in C/C++ (Windows CE 5.0)

Send Feedback

A transform filter takes media input and alters it in some way.

When you design a transform filter, your filter class derives from one of the transform base classes, CTransformFilter, CTransInPlaceFilter, or CVideoTransformFilter, or from the more generic CBaseFilter class.

The base class you choose depends on whether your filter must copy media samples or can transform them in place. For more information, see Determine Which Base Classes to Use.

The filter graph manager can use the functions of the base classes your filter derives from to fit your filter into the filter graph and automatically create the connections between your filters. The filter mapper uses your filter's registry information to configure the filter graph.

For the simplest transform filter (for example, one that has only one input pin and one output pin), you can derive your filter class from CTransformFilter and override only the Transform and CheckInputType functions.

If you need custom behaviors, you can override additional functions to create your own connections, pins, and other filter behaviors and capabilities. For more information, see Override the Base Class Member Functions.

You can also derive your filter class from CBaseFilter and override its methods.

This section discusses how to do the following:

Every transform filter must implement code to perform all preceding steps except access additional interfaces.

For background information about transform filters, see the following topics:

For information on registering a filter or making it self-registering, see Registering DirectShow Filters.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.