IFileSourceFilter 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 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.
Inheritance
The IFileSourceFilter interface inherits from the IUnknown interface. IFileSourceFilter also has these types of members:
Methods
The IFileSourceFilter interface has these methods.
IFileSourceFilter::GetCurFile The GetCurFile method retrieves the name and media type of the current file. (IFileSourceFilter.GetCurFile) |
IFileSourceFilter::Load The Load method causes a source filter to load a media file. |
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) |