IMediaSample::SetTime

 
Microsoft DirectShow 9.0

IMediaSample::SetTime

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

Syntax

HRESULT SetTime(
  REFERENCE_TIME *pTimeStart,
  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 Values

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

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also


Show: