Microsoft DirectX 8.1 (C++)

IMediaPosition Object

The IMediaPosition object contains methods for seeking the filter graph and setting the playback rate.

To use this object, declare a variable of type IMediaPosition and set it equal to the FilgraphManager object:

Dim mGraph As New FilgraphManager
Dim iPosition As ImediaEvent
Set iPosition = mGraph

Requirements

Include a reference in your project to "ActiveMovie control type library" (Quartz.dll).

The IMediaPosition object exposes the following properties and methods.

Property Description
CurrentPosition Sets or retrieves the playback position.
Duration Retrieves the duration of the stream.
PrerollTime Sets or retrieves the amount of data that will be queued before the start position.
Rate Sets or retrieves the playback rate.
StopTime Sets or retrieves the stop time.

Method Description
CanSeekBackward Queries whether the stream can be seeked backward.
CanSeekForward Queries whether the stream can be seeked forward.