Freigeben über


IMFMediaSource::Pause Method

Pauses all active streams in the media source.

Syntax

HRESULT Pause();

Parameter

Methode umfasst keine Parameter.

Rückgabewert

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

Rückgabecode Beschreibung
S_OK

The method succeeded.

MF_E_INVALID_STATE_TRANSITION

Invalid state transition. The media source must be in the started state.

MF_E_SHUTDOWN

The media source's Shutdown method has been called.

 

Hinweise

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.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Mfidl.h

Bibliothek

Mfuuid.lib

Siehe auch

IMFMediaSource

Media Sources