CPosPassThru Class
A version of this page is also available for
4/8/2010
This class is a utility class that handles the IMediaPosition and IMediaSeeking interfaces for single-input pin renderers and transform filters.
IMediaPosition is the interface originally used for seeking in time-based media streams. IMediaSeeking is an interface intended to replace IMediaPosition in filter graphs that require seeking to units other than time, such as samples or fields, or that require more precise time-based seeking.
Renderers will use this class to implement IMediaPosition and IMediaSeeking from the filter; transform filters will use it to implement these two interfaces from the output pin.
In both cases, the methods will be implemented by calls to the IMediaPosition or IMediaSeeking interface provided by the output pin of the connected upstream filter, effectively passing the position information through to the next filter.
Create a class derived from CPosPassThru, giving it the IPin pointer to your input pin, and delegate all IMediaPosition and IMediaSeeking methods to it.
The class will find the output pin connected to the input pin, query this output pin for the IMediaPosition or IMediaSeeking interface, and respond appropriately.
Protected Data Members
Member | Description |
---|---|
m_Pin |
Pointer to the input pin of the filter. |
Member Functions
Member function | Description |
---|---|
Constructs a CPosPassThru object. |
|
Releases any cached interfaces held on the upstream pin. |
Overrideable Member Functions
Member function | Description |
---|---|
Retrieves the starting and ending media times. |
Implemented IMediaPosition Methods
Method | Description |
---|---|
Determines if the current position can be moved backward in the media stream. |
|
Determines if the current position can be moved forward in the media stream. |
|
Retrieves the current position in terms of the total length of the media stream. |
|
Retrieves the total duration of the media stream. |
|
Retrieves the time before the start position that the filter graph will start any nonrandom access device rolling. |
|
Retrieves the playback rate, relative to normal playback of the media. |
|
Retrieves the position within the media at which playback should stop. |
|
Sets the position within the media at which playback should start. |
|
Sets the time before the start position that the filter graph will start any nonrandom access device rolling. |
|
Sets the playback rate, relative to normal playback of the media. |
|
Sets the position within the media at which playback should stop. |
Implemented IMediaSeeking Methods
Method | Description |
---|---|
Determines which capabilities exist on a media stream by applying seeking capability flags and checking the returned value. |
|
Converts a time from one time format to another. |
|
Returns the range of times in which seeking is efficient. |
|
Retrieves the seeking capabilities of the media stream. |
|
Retrieves the current position within the media stream. |
|
Retrieves the length of time that the media stream will play. |
|
Retrieves the current start and stop position settings. |
|
Retrieves the preroll settings. |
|
Retrieves the current rate. |
|
Retrieves the position at which the media stream stops. |
|
Retrieves the current media time format. |
|
Determines if a specified time format is supported. |
|
Determines if the time format being used in the call is the same as the one the interface currently uses. |
|
Retrieves the preferred time format the interface will use. |
|
Sets current and stop positions and applies flags to both. |
|
Sets a new playback rate. |
|
Sets the time format, which determines the format of units used during seeking. |
Implemented INonDelegatingUnknown Methods
Method | Description |
---|---|
Returns a specified reference-counted interface. |
Requirements
Windows Embedded CE | Windows CE 2.12 and later |
Windows Mobile | Windows Mobile Version 5.0 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 |