Share via


IAsyncReader2::SetCurrentTime (Compact 7)

3/12/2014

This method sets the file position, in time, of the first requested sample in the media stream.

Syntax

HRESULT SetCurrentTime(
  REFERENCE_TIME llTime
);

Parameters

  • llTime
    [in] The time offset of the first requested media sample. The time is referenced from the start of the stream.

Return Value

Returns the HRESULT values shown in the following table.

Value Description

E_FAIL

The streamer does not support streaming in time.

S_OK

The start position was set.

Remarks

You must set the offset of the requested media sample based on the properties of the streamer i.e. the streamer supports time based seeking allocator. To retrieve the source properties, call IAsyncReader2::GetCapabilities. If the allocator is based on time streamer supports time-based seeking, set the offset from the start time of the stream and set the time in the IAsyncReader2::SetCurrentTime B83A386C-0EF8-418E-A488-5CAFBB566603method. If the allocator is based on position streamer supports byte-based seeking, set the offset in bytes from the start of the stream.

You can retrieve the sample from this position by calling IAsyncReader2::GetNext.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IAsyncReader2 Interface