IMediaSeeking::SetTimeFormat method

The SetTimeFormat method sets the time format for subsequent seek operations.

Syntax


HRESULT SetTimeFormat(
  [inconst 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.

Return codeDescription
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. Whenever you call one of these other methods, any parameters that express time values are given in units of the current time format.

The default time format is REFERENCE_TIME units (100 nanoseconds). Other time formats include frames, samples, and bytes. To determine if a given format is supported, call the IMediaSeeking::IsFormatSupported method. If a format is supported, you can switch to that format by calling SetTimeFormat. Only one time format is active at any one time.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

Error and Success Codes
IMediaSeeking Interface
IMediaSeeking::GetTimeFormat
IMediaSeeking::QueryPreferredFormat

 

 

Show: