IMediaPosition::get_CurrentPosition

This method retrieves the current position in terms of the total length of the media stream.

HRESULT get_CurrentPosition(
  REFTIME* pllTime
);

Parameters

  • pllTime
    [out] reference time of the current position.

Return Values

Returns an HRESULT value.

Remarks

This is the position that playback has reached. It is a value between zero and the total duration of the media (that is, it does not take into account the rate and start time). If the filter graph is paused, this is the position at which it will restart.

When the filter graph is stopped or paused, this method returns the position at which playback will recommence. When the filter graph is running, the filter graph manager returns the position according to the reference clock. If an individual filter implements this, it should return the stream time of the sample it is processing (that is, the offset time from the beginning) when paused or running. If you implement this using stream time or the reference clock, remember to adjust the value you return for start position and playback rate so that the value returned is in terms of the media's total duration.

After stopping or pausing, a run command causes playback to begin at the current position. This will be where playback stopped or paused, unless there has been an IMediaPosition::put_CurrentPosition call in the meantime.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.

See Also

IMediaPosition Interface

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.