IMFMediaSource::Pause method (mfidl.h)

Pauses all active streams in the media source.


HRESULT Pause();

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
The method succeeded.
Invalid state transition. The media source must be in the started state.
The media source's Shutdown method has been called.


This method is asynchronous. When the operation completes, the media source sends and MESourcePaused event, and every active stream sends an MEStreamPaused event. If the method returns a failure code, no events are raised.

The media source must be in the started state. The method fails if the media source is paused or stopped.

While the source is paused, calls to IMFMediaStream::RequestSample succeed, but the streams will not deliver any samples until after the source is started again. Note that the source's event queue is not serialized with the stream event queues, so the client might receive some samples after the MESourcePaused event, due to multi-threading issues. But the client will not receive any samples from a stream after the MEStreamPaused event.

Not every media source can pause. If a media source can pause, the IMFMediaSource::GetCharacteristics method returns the MFMEDIASOURCE_CAN_PAUSE flag.


Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header mfidl.h
Library Mfuuid.lib

See also


Media Sources