Sets the time source for the presentation clock. The time source is the object that drives the clock by providing the current time.
public:
HRESULT SetTimeSource(
IMFPresentationTimeSource *pTimeSource
)
pTimeSource
Type: IMFPresentationTimeSource *
[in, optional]
Pointer to the IMFPresentationTimeSource interface of the time source.
Type: HRESULT
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
| S_OK | The method succeeded. |
| MF_E_CLOCK_NOT_SIMPLE | The time source does not have a frequency of 10 MHz. |
| MF_E_NOT_INITIALIZED | The time source has not been initialized. |
Refer to Media Foundation return codes.
The presentation clock cannot start until it has a time source.
The time source is automatically registered to receive state change notifications from the clock, through the time source’s IMFClockStateSink interface, which all time sources must implement.
This time source have a frequency of 10 MHz. See IMFClock::GetClockCharacteristics. If not, the method returns MF_E_CLOCK_NOT_SIMPLE.
Header: Declared in mfidl.h.
Library: Use mfuuid.lib.