IMediaControl::Pause method

The Pause method pauses all the filters in the filter graph.

Syntax


HRESULT Pause();

Parameters

This method has no parameters.

Return value

Returns an HRESULT value. Possible values include the following.

Return codeDescription
S_FALSE

The graph paused successfully, but some filters have not completed the state transition.

S_OK

All filters in the graph completed the transition to a paused state.

 

Remarks

Pausing the filter graph cues the graph for immediate rendering when the graph is next run. While the graph is paused, filters process data but do not render it. Data is pushed through the graph and processed by transform filters as far as buffering permits, but renderer filters do not render the data. However, video renderers display a static poster frame of the first sample.

If the method returns S_FALSE, call the IMediaControl::GetState method to wait for the state transition to complete, or to check if the transition has completed. When you call Pause to display the first frame of a video file, always follow it immediately with a call to GetState to ensure that the state transition has completed. Failure to do this can result in the video rectangle being painted black.

If the method fails, it stops the graph before returning.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Control.h (include Dshow.h)

Library

Strmiids.lib

See also

Error and Success Codes
IMediaControl Interface
IMediaControl::StopWhenReady

 

 

Community Additions

ADD
Show:
© 2014 Microsoft