Partager via


IFileSourceFilter Interface

 
Microsoft DirectShow 9.0

IFileSourceFilter Interface

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.

In addition to the methods inherited from IUnknown, the IFileSourceFilter interface exposes the following methods.

Method Description
Load Loads the source filter with the file.
GetCurFile Retrieves the current file.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.