IMediaFilter 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 IMediaFilter
interface controls the streaming state of a filter.
All DirectShow filters implement this interface. It provides methods for switching the filter between states (stopped, paused, and running); for retrieving the filter's current state; and for setting a reference clock. Applications should not call IMediaFilter
methods on filters.
The Filter Graph Manager also exposes this interface. Applications can use the SetSyncSource method to set the graph reference clock, and GetSyncSource to retrieve the clock. Applications should not call the other methods on this interface. Instead, use the corresponding methods on the IMediaControl interface.
The IBaseFilter interface inherits from IMediaFilter
.
Inheritance
The IMediaFilter interface inherits from IPersist. IMediaFilter also has these types of members:
Methods
The IMediaFilter interface has these methods.
IMediaFilter::GetState The GetState method retrieves the filter's state (running, stopped, or paused). |
IMediaFilter::GetSyncSource The GetSyncSource method retrieves the current reference clock. |
IMediaFilter::Pause The Pause method pauses the filter. |
IMediaFilter::Run The Run method runs the filter. |
IMediaFilter::SetSyncSource The SetSyncSource method sets the reference clock. |
IMediaFilter::Stop The Stop method stops the filter. |
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) |