SetTime
Collapse the table of content
Expand the table of content

IMediaSample::SetTime method

The SetTime method sets the stream times when this sample should begin and finish.

Syntax


HRESULT SetTime(
  [in] REFERENCE_TIME *pTimeStart,
  [in] REFERENCE_TIME *pTimeEnd
);

Parameters

pTimeStart [in]

Pointer to a variable that contains the start time of the sample.

pTimeEnd [in]

Pointer to a variable that contains the stop time of the sample.

Return value

Returns S_OK, or HRESULT value indicating the cause of the error.

Remarks

Both time values are relative to the stream time. For more information, see Time and Clocks in DirectShow.

To invalidate the stream times, set pTimeStart and pTimeEnd to NULL. This will cause the IMediaSample::GetTime method to return VFW_E_SAMPLE_TIME_NOT_SET.

For more information about stream times, see Time and Clocks in DirectShow.

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
IMediaSample Interface

 

 

Show:
© 2016 Microsoft