IMediaFilter::Run method (strmif.h)

The Run method runs the filter.

Syntax

HRESULT Run(
  REFERENCE_TIME tStart
);

Parameters

tStart

Reference time corresponding to stream time 0.

Return value

Returns an HRESULT value. Possible values include those shown in the following table.

Return code Description
S_FALSE
Transition is not complete.
S_OK
Success. Transition is complete.

Remarks

When a filter is running, it can receive, process, and deliver samples. Source filters generate new samples, and renderer filters render them.

The state transition might be asynchronous. If the method returns before the transition completes, the return value is S_FALSE.

Stream time is calculated as the current reference time minus tStart. To calculate when a media sample should be rendered, the renderer compares the time stamp with the current stream time. Thus, a media sample with a time stamp of zero should be rendered at time tStart. For more information, see Time and Clocks in DirectShow.

When an application calls the IMediaControl::Run method, the Filter Graph Manager calls IMediaFilter::Run on each filter. It sets the value of tStart slightly in the future, to account for graph latency.

Requirements

   
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)
Library Strmiids.lib

See also

Error and Success Codes

IMediaFilter Interface