CPosPassThru Class (Windows CE 5.0)
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 |
---|---|
CPosPassThru | Constructs a CPosPassThru object. |
ForceRefresh | Releases any cached interfaces held on the upstream pin. |
Overrideable Member Functions
Member function | Description |
---|---|
GetMediaTime | Retrieves the starting and ending media times. |
Implemented IMediaPosition Methods
Method | Description |
---|---|
CanSeekBackward | Determines if the current position can be moved backward in the media stream. |
CanSeekForward | Determines if the current position can be moved forward in the media stream. |
get_CurrentPosition | Retrieves the current position in terms of the total length of the media stream. |
get_Duration | Retrieves the total duration of the media stream. |
get_PrerollTime | Retrieves the time before the start position that the filter graph will start any nonrandom access device rolling. |
get_Rate | Retrieves the playback rate, relative to normal playback of the media. |
get_StopTime | Retrieves the position within the media at which playback should stop. |
put_CurrentPosition | Sets the position within the media at which playback should start. |
put_PrerollTime | Sets the time before the start position that the filter graph will start any nonrandom access device rolling. |
put_Rate | Sets the playback rate, relative to normal playback of the media. |
put_StopTime | Sets the position within the media at which playback should stop. |
Implemented IMediaSeeking Methods
Method | Description |
---|---|
CheckCapabilities | Determines which capabilities exist on a media stream by applying seeking capability flags and checking the returned value. |
ConvertTimeFormat | Converts a time from one time format to another. |
GetAvailable | Returns the range of times in which seeking is efficient. |
GetCapabilities | Retrieves the seeking capabilities of the media stream. |
GetCurrentPosition | Retrieves the current position within the media stream. |
GetDuration | Retrieves the length of time that the media stream will play. |
GetPositions | Retrieves the current start and stop position settings. |
GetPreroll | Retrieves the preroll settings. |
GetRate | Retrieves the current rate. |
GetStopPosition | Retrieves the position at which the media stream stops. |
GetTimeFormat | Retrieves the current media time format. |
IsFormatSupported | Determines if a specified time format is supported. |
IsUsingTimeFormat | Determines if the time format being used in the call is the same as the one the interface currently uses. |
QueryPreferredFormat | Retrieves the preferred time format the interface will use. |
SetPositions | Sets current and stop positions and applies flags to both. |
SetRate | Sets a new playback rate. |
SetTimeFormat | Sets the time format, which determines the format of units used during seeking. |
Implemented INonDelegatingUnknown Methods
Method | Description |
---|---|
NonDelegatingQueryInterface | Returns a specified reference-counted interface. |
Requirements
DirectShow applications and DirectShow filters have different include file and link library requirements.
For more information, see Setting Up the Build Environment.
OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:
Send Feedback on this topic to the authors