IMediaPosition interface (control.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The IMediaPosition interface contains methods for seeking to a position within a stream.

Note  Applications should use IMediaSeeking instead of IMediaPosition.
 

This interface is exposed by the Filter Graph Manager as well as by individual filters. Applications should obtain an IMediaPosition interface pointer from the Filter Graph Manager, not from a filter. The Filter Graph Manager distributes method calls to all of the renderer filters. The renderer filters propagate the calls upstream to the source filters. This sequence of events ensures that all streams remain synchronized.

If one of the distributed calls returns an error, the Filter Graph Manager returns the first error value it received. Some of the distributed calls may have succeeded in this case. However, the filter graph does not return E_NOTIMPL unless all the distributed calls return E_NOTIMPL. If at least one filter in the graph implements the method, the Filter Graph Manager does not return E_NOTIMPL.

Inheritance

The IMediaPosition interface inherits from the IDispatch interface. IMediaPosition also has these types of members:

Methods

The IMediaPosition interface has these methods.

 
IMediaPosition::CanSeekBackward

The CanSeekBackward method determines whether the filter graph can seek backward in the stream.
IMediaPosition::CanSeekForward

The CanSeekForward method determines whether the filter graph can seek forward in the stream.
IMediaPosition::get_CurrentPosition

The get_CurrentPosition method retrieves the current position, relative to the total duration of the stream.
IMediaPosition::get_Duration

The get_Duration method retrieves the duration of the stream.
IMediaPosition::get_PrerollTime

The get_PrerollTime method retrieves the amount of data that will be queued before the start position.
IMediaPosition::get_Rate

The get_Rate method retrieves the playback rate.
IMediaPosition::get_StopTime

The get_StopTime method retrieves the time at which the playback will stop, relative to the duration of the stream.
IMediaPosition::put_CurrentPosition

The put_CurrentPosition method sets the current position, relative to the total duration of the stream.
IMediaPosition::put_PrerollTime

The put_PrerollTime method sets the amount of data that will be queued before the start position.
IMediaPosition::put_Rate

The put_Rate method sets the playback rate.
IMediaPosition::put_StopTime

The put_StopTime method sets the time at which the playback will stop, relative to the duration of the stream.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header control.h (include Dshow.h)

See also

IDispatch