다음을 통해 공유


IMediaControl::Stop

 
Microsoft DirectShow 9.0

IMediaControl::Stop

The Stop method stops all the filters in the graph.

Syntax

  HRESULT Stop(void);

Return Values

Returns S_OK if successful, or an HRESULT value that indicates the cause of the error.

Remarks

If the graph is running, this method pauses the graph before stopping it. While paused, video renderers can copy the current frame to display as a poster frame.

This method does not seek to the beginning of the stream. If you call this method and then call the IMediaControl::Run method, playback resumes from the stopped position. To seek, use the IMediaSeeking interface.

The Filter Graph Manager pauses all the filters in the graph, and then calls the IMediaFilter::Stop method on all filters, without waiting for the pause operations to complete. Therefore, some filters might have their Stop method called before they complete their pause operation. If you develop a custom rendering filter, you might need to handle this case by pausing the filter if it receives a stop command while in a running state. However, most filters do not need to take any special action in this regard.

Requirements

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

Library: Use Strmiids.lib.

See Also