Condividi tramite


IMediaFilter Interface

 
Microsoft DirectShow 9.0

IMediaFilter Interface

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.

In addition to the methods inherited from IPersist, the IMediaFilter interface exposes the following methods.

Method Description
Stop Stops the filter.
Pause Pauses the filter.
Run Runs the filter.
GetState Retrieves the state of the filter (running, stopped, or paused).
SetSyncSource Sets the reference clock for the filter or the filter graph.
GetSyncSource Retrieves the current reference clock.

Requirements

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

Library: Use Strmiids.lib.