Share via


IStreamSample::SetSampleTimes (Compact 2013)

3/26/2014

This method sets the current sample's start and end times.

You can call this method prior to updating the sample.

Syntax

HRESULT SetSampleTimes(
  const STREAM_TIME* pStartTime,
  const STREAM_TIME* pEndTime
);

Parameters

  • pStartTime
    [in] Pointer to a STREAM_TIME value that contains the sample's new start time.
  • pEndTime
    [in] Pointer to a STREAM_TIME value that contains the sample's new end time.

Return Value

Returns S_OK if successful or E_POINTER if one of the parameters is NULL.

Remarks

For streams that have a clock, the times must be relative to the stream's current time.

If the stream does not have a clock, the times should be relative to the media.

This method applies only to writable streams.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IStreamSample Interface