Microsoft DirectX 8.1 (C++)

IMultiMediaStream::GetTime

Retrieves the current time from the multimedia stream's clock, if it has a clock.

Syntax

HRESULT GetTime(
  STREAM_TIME *pCurrentTime
  );

Parameters

pCurrentTime

[out] Pointer to a STREAM_TIME value that will contain the current time, if the media stream has a clock.

Return Value

Returns one of the following values.

Return code Description
E_POINTER The pCurrentTime pointer is invalid.
S_FALSE Stream doesn't have a clock; *pCurrentTime is zero.
S_OK Stream has a clock and the method succeeded; pCurrentTime contains the current time.

Remarks

If the stream doesn't have a clock, this method sets *pCurrentTime to zero and returns S_FALSE. If a stream has a clock, the stream sample times are relative to the stream's clock.

STREAM_TIME is defined as a LONGLONG value.

See Also