## PID Sample (Plug-In Distributor Application)

The IAMovie sample shows the implementation of the IAMovie interface for a plug-in distributor (PID). A PID is used to extend the filter graph manager. The filter graph manager distributes the actions of interface methods to the appropriate filters. This distribution enables applications to have a single point of control to perform the basic operations.

In the IAMovie sample, the PID exposes the IAMovie interface and implements it by calling the enumerator of the filter graph manager, finding which filters expose the interface (see EnumFiltersByInterface), and communicating directly with those filters. PIDs are supplied for the standard control interfaces. Independent software vendors (ISVs) can replace these supplied PIDs and add others.

See Plug-in Distributors for information on plug-in distributors.

Sample Locations

SampIOS Sample (IOStream Helper Library)

The IOStream helper library provides text output of the IBaseFilter interface and other DirectShow™ objects. This sample code is provided as a header file (SampIOS.h) and a source file (SampIOS.cpp) that can be built into a library (SampIOS.lib). You can use the library functions in your DirectShow filters and applications. The functions are designed to help retrieve information in text format about the objects in the filter graph. The text output is intended to aid in debugging.

SampIOS.h declares debug output functions that you can call from C. For example, DumpFilterInfo sends information on the given filter interface. See the header file (SampIOS.h) for the syntax of each call. The DumpXxx functions require the cout output stream to be valid in the environment in which you are working, as they implicitly output to cout. The DumpXxx functions are included in the following list.

- DumpFilterInfo
- DumpPinInfo
- DumpAllPins
- DumpAllFilters
- DumpFilterGraph

Extensions to the C++ IOStream library are included, so you can write code like the following to dump information to cout.

       cout << piFilterGraph << endl;

The C++ callable functions declared by SampIOS.h include the following abilities to provide output to an ostream. (The standard C++ ostream class provides the basic capability for sequential and random-access output.) See the header file (SampIOS.h) for the syntax of each call.

- Provide output of a wide string.
- Build and provide output of a textual version of a GUID.
- Provide output of filter information.
- Provide output of filter information for all filters left in an enumerator.
- Provide output of filter and connection details.
- Provide output of pin details (including connection information).
- Provide output of pin details (including connection information) for all pins left in the enumerator.
- Provide output of the pin information for all pins on the supplied filter.

Sample Locations

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.