IFileSourceFilter interface (strmif.h)

The IFileSourceFilter interface is exposed by source filters to set the file name and media type of the media file that they are to render. It is an abbreviated version of the COM IPersistFile interface. If the file has a type that can be determined by the algorithm described in Registering a Custom File Type, the recommended file source filter CLSID is used when the filter graph manager attempts to render the filter graph.

If a filter needs the name of a file to open, it should expose this interface to allow an application to set the file name. Note that there is no base class implementation of this interface.

An application that inserts file source filters directly must query for this interface and set the file name. Normally, the filter graph manager uses this interface when an application calls IGraphBuilder::RenderFile. The Graphedt.exe tool queries for the IFileSourceFilter interface and prompts for a file name if it finds it.


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


The IFileSourceFilter interface has these methods.


The GetCurFile method retrieves the name and media type of the current file.

The Load method causes a source filter to load a media file.


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)