IFilterGraph interface (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The IFilterGraph interface provides methods for building a filter graph. An application can use it to add filters to the graph, connect or disconnect filters, remove filters, and perform other basic operations. However, the IGraphBuilder interface inherits from this interface and provides additional methods that are more sophisticated. Therefore, applications should use IGraphBuilder rather than using IFilterGraph directly.

The filter graph manager implements this interface.

Inheritance

The IFilterGraph interface inherits from the IUnknown interface. IFilterGraph also has these types of members:

Methods

The IFilterGraph interface has these methods.

 
IFilterGraph::AddFilter

The AddFilter method adds a filter to the graph.
IFilterGraph::ConnectDirect

The ConnectDirect method connects the two pins directly (without intervening filters).
IFilterGraph::Disconnect

The Disconnect method disconnects this pin.
IFilterGraph::EnumFilters

The EnumFilters method provides an enumerator for all filters in the graph.
IFilterGraph::FindFilterByName

The FindFilterByName method finds a filter that was added to the filter graph with a specific name.
IFilterGraph::Reconnect

The Reconnect method disconnects a pin and then reconnects it to the same pin.
IFilterGraph::RemoveFilter

The RemoveFilter method removes a filter from the graph.
IFilterGraph::SetDefaultSyncSource

The SetDefaultSyncSource method sets the reference clock to the default clock.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)