Microsoft DirectX 8.1 (C++)

IMediaSeeking::SetTimeFormat

The SetTimeFormat method sets the time format.

Syntax

HRESULT SetTimeFormat(
  const GUID *pFormat
);

Parameters

pFormat

[in] Pointer to a GUID that specifies the time format. See Time Format GUIDs.

Return Value

Returns an HRESULT value. Possible values include the following.

Value Description
S_OK Success.
E_INVALIDARG Invalid argument.
E_NOTIMPL Method is not supported.
E_POINTER NULL pointer argument.
VFW_E_WRONG_STATE Filter graph is not stopped.

Remarks

This method specifies the time units used by other IMediaSeeking methods, such as IMediaSeeking::GetPositions and IMediaSeeking::SetPositions. To determine what formats are supported, call the IMediaSeeking::IsFormatSupported method. To retrieve the current time format, call the IMediaSeeking::GetTimeFormat method. To determine the preferred time format, call the IMediaSeeking::QueryPreferredFormat method.

Only one time format can be set on the filter graph at any one time.

See Also