Important:
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.
A version of this page is also available for
4/8/2010

If a moniker is found for a source filter that can read a file of the specified type, the Filter Graph Manager uses CoCreateInstanceto create an instance of the filter using the returned GUID, and then calls its own AddFiltermethod to add the filter to the filter graph. Once added to the graph, the filter creates one or more output pins configured for the type of file it will be reading. After the pin(s) are created, the Filter Graph Manager will examine the media type each pin supports and then look again in the registry for a filter that can accept that media type on its input pin. When it finds a suitable filter, it adds it to the graph and then calls the IPin::Connectmethod on the upstream filter's output pin. The output pin can enumerate the supported media types on the input pin and attempt to use that type by calling IPin::ReceiveConnectionon that pin. If the input pin agrees on the media type, then the connection is made. This process is repeated until all the necessary filters have been added to the graph. Typically, the second filter in a playback graph will be a parser or splitter filter, which reads a raw stream of data, such as AVI or MPEG, and splits it into separate audio and video streams, creating an output pin for each stream. If the data for either stream is compressed, the next filter on each stream will be a decompressor, followed by a renderer filter.

The Intelligent Connectmechanisms can also be used by applications to partially build graphs. For example, assume you have a special filter that captures data from some device and outputs it in a standard format. Your application can manually add the first filter to the graph, then use the Filter Graph Manager to obtain a pointer to the filter, then use the filter's EnumPinsor FindPinmethods to obtain pointers to the output pins. Then, when the application supplies that pointer in a call to IGraphBuilder::Render, the Filter Graph Manager will use the Intelligent Connect process to finish building the rest of the graph. An application can also manually disconnect any filter inserted into a graph and replace it with another filter.

See Also