Export (0) Print
Expand All

IMFPresentationClock::Start method

Starts the presentation clock.

Syntax


HRESULT Start(
  [in]  LONGLONG llClockStartOffset
);

Parameters

llClockStartOffset [in]

Initial starting time, in 100-nanosecond units. At the time the Start method is called, the clock's IMFPresentationClock::GetTime method returns this value, and the clock time increments from there. If the value is PRESENTATION_CURRENT_POSITION, the clock starts from its current position. Use this value if the clock is paused and you want to restart it from the same position.

Return value

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

Return codeDescription
S_OK

The method succeeded.

MF_E_CLOCK_NO_TIME_SOURCE

No time source was set on this clock.

 

Remarks

This method is valid in all states (stopped, paused, or running).

If the clock is paused and restarted from the same position (llClockStartOffset is PRESENTATION_CURRENT_POSITION), the presentation clock sends an IMFClockStateSink::OnClockRestart notification. Otherwise, the clock sends an IMFClockStateSink::OnClockStart notification.

The presentation clock initiates the state change by calling OnClockStart or OnClockRestart on the clock's time source. This call is made synchronously. If it fails, the state change does not occur. If the call succeeds, the state changes, and the clock notifies the other state-change subscribers by calling their OnClockStart or OnClockRestart methods. These calls are made asynchronously.

If the clock is already running, calling Start again has the effect of seeking the clock to the new StartOffset position.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfidl.h

Library

Mfuuid.lib

See also

IMFPresentationClock
Presentation Clock

 

 

Community Additions

ADD
Show:
© 2014 Microsoft