IMediaSeeking interface (strmif.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 IMediaSeeking
interface contains methods for seeking to a position within a stream, and for setting the playback rate. The Filter Graph Manager exposes this interface, and so do individual filters or pins. Applications should query the Filter Graph Manager for the interface.
The Filter Graph Manager distributes any IMediaSeeking
call to each of the renderer filters in the graph. The renderer filters send the call upstream to the source filters. This sequence of events ensures that all streams remain synchronized. If any of the distributed calls returns an error, the Filter Graph Manager returns the first error value it received, even if some of the distributed calls succeed. An exception is E_NOTIMPL: the Filter Graph Manager does not return E_NOTIMPL unless it was returned by all of the distributed calls.
An application can seek the graph while the graph is in any state (running, paused or stopped). If the graph is running, the Filter Graph Manager pauses the graph before it issues the seek command. Then it runs the graph again. All seeking operations are independent of the current playback rate. Seeking operations cause any pending media data to be flushed from the graph.
For all IMediaSeeking
parameters that specify time, the unit of time depends on the current time format. To set the time format, call the IMediaSeeking::SetTimeFormat method. Time formats are globally unique identifiers (GUIDs) defined in uuids.h. For more information, see Time Format GUIDs.
Inheritance
The IMediaSeeking interface inherits from the IUnknown interface. IMediaSeeking also has these types of members:
Methods
The IMediaSeeking interface has these methods.
IMediaSeeking::CheckCapabilities The CheckCapabilities method queries whether a stream has specified seeking capabilities. |
IMediaSeeking::ConvertTimeFormat The ConvertTimeFormat method converts from one time format to another. |
IMediaSeeking::GetAvailable The GetAvailable method retrieves the range of times in which seeking is efficient. |
IMediaSeeking::GetCapabilities The GetCapabilities method retrieves all the seeking capabilities of the stream. |
IMediaSeeking::GetCurrentPosition The GetCurrentPosition method retrieves the current position, relative to the total duration of the stream. |
IMediaSeeking::GetDuration The GetDuration method gets the duration of the stream. |
IMediaSeeking::GetPositions The GetPositions method retrieves the current position and the stop position, relative to the total duration of the stream. |
IMediaSeeking::GetPreroll The GetPreroll method retrieves the amount of data that will be queued before the start position. |
IMediaSeeking::GetRate The GetRate method retrieves the playback rate. |
IMediaSeeking::GetStopPosition The GetStopPosition method retrieves the time at which the playback will stop, relative to the duration of the stream. |
IMediaSeeking::GetTimeFormat The GetTimeFormat method retrieves the time format that is currently being used for seek operations. |
IMediaSeeking::IsFormatSupported The IsFormatSupported method determines whether a specified time format is supported for seek operations. |
IMediaSeeking::IsUsingTimeFormat The IsUsingTimeFormat method determines whether seek operations are currently using a specified time format. |
IMediaSeeking::QueryPreferredFormat The QueryPreferredFormat method retrieves the preferred time format for seeking. |
IMediaSeeking::SetPositions The SetPositions method sets the current position and the stop position. |
IMediaSeeking::SetRate The SetRate method sets the playback rate. |
IMediaSeeking::SetTimeFormat The SetTimeFormat method sets the time format for subsequent seek operations. |
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 | strmif.h (include Dshow.h) |