IMediaPosition Interface (Windows Embedded CE 6.0)
1/6/2010
It is recommended that the IMediaSeeking interface be used instead of IMediaPosition. This depreciated interface is no longer fully supported.
Applications communicating with the filter graph can call methods on the IMediaPosition interface to set or retrieve properties such as the duration of the stream, the start and stop times, the preroll time, the rate, and the current position. The filter graph uses these properties on seekable filters to control the playback of streams within the graph; where there are multiple streams, the filter graph sets them all to play in parallel, beginning at the same position, and will report the duration as being the duration of the longest stream. The REFTIME parameters used in this interface are double value, representing a fractional number of seconds. Internally, filters will store time to an accuracy of 100 nanoseconds.
When to Implement
The filter graph manager exposes the IMediaPosition interface if any of the filters within the graph are seekable (can seek to an arbitrary position in the stream). This normally means a seekable file source filter. Filters, such as a file source filter, will expose IMediaPosition if they can seek their data or if their output pin represents a seekable stream. The renderer filter should also expose this interface. Output pins of transform filters expose this interface to pass the positioning information upstream from the renderer through each intermediate filter to the seekable filter.
Use the CMediaPosition class to help implement this interface on a filter. Use the CPosPassThru base class to implement this interface on output pins of transform filters used to pass media positioning information upstream. This is enabled by default in the pin base classes.
When to Use
Applications can use this interface to set or retrieve media positioning properties. Most commonly, an application will use the methods on this interface to play a media stream for some duration starting at some set position in the stream (for example, 10 seconds from the start).
Methods in Vtable Order
The following tables show the methods that appear in the Vtable beneath the standard COM methods inherited from IUnknown.
IDispatch method | Description |
---|---|
Determines whether there is type information available for this dispinterface. |
|
Retrieves the type information for this dispinterface if GetTypeInfoCount returned successfully. |
|
Converts text names of properties and methods (including arguments) to their corresponding DISPIDs. |
|
Calls a method or accesses a property in this dispinterface if given a DISPID and any other necessary parameters. |
IMediaPosition method | Description |
---|---|
Retrieves the total duration of the media stream. |
|
Sets the time that the media stream begins. |
|
Retrieves the current position in terms of the total length of the media stream. |
|
Retrieves the position within the media stream at which playback should stop. |
|
Sets the position within the media stream at which playback should stop. |
|
Retrieves the time prior to the start position that the filter graph begins any nonrandom access device rolling. |
|
Sets the time prior to the start position that the filter graph begins any nonrandom access device rolling. |
|
Sets the playback rate, relative to normal playback of the media stream. |
|
Retrieves the playback rate, relative to normal playback of the media stream. |
|
Determines if the current position can be moved forward in the media stream. |
|
Determines if the current position can be moved backward in the media stream. |
Requirements
Windows Embedded CE | Windows CE 2.12 and later |
Note | Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements For more information, see Setting Up the Build Environment |