IMFPresentationClock interface (mfidl.h)

Represents a presentation clock, which is used to schedule when samples are rendered and to synchronize multiple streams.


The IMFPresentationClock interface inherits from IMFClock. IMFPresentationClock also has these types of members:


The IMFPresentationClock interface has these methods.


Registers an object to be notified whenever the clock starts, stops, or pauses, or changes rate.

Retrieves the latest clock time.

Retrieves the clock's presentation time source.

Pauses the presentation clock. While the clock is paused, the clock time does not advance, and the clock's IMFPresentationClock::GetTime returns the time at which the clock was paused.

Unregisters an object that is receiving state-change notifications from the clock.

Sets the time source for the presentation clock. The time source is the object that drives the clock by providing the current time.

Starts the presentation clock.

Stops the presentation clock. While the clock is stopped, the clock time does not advance, and the clock's IMFPresentationClock::GetTime method returns zero.


To create a new instance of the presentation clock, call the MFCreatePresentationClock function. The presentation clock must have a time source, which is an object that provides the clock times. For example, the audio renderer is a time source that uses the sound card to drive the clock. Time sources expose the IMFPresentationTimeSource interface. To set the time source, call SetTimeSource. The presentation clock does not begin running until the Start method is called.

To get the presentation clock from the Media Session, call IMFMediaSession::GetClock.


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

See also


Media Foundation Interfaces

Presentation Clock