Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The CPosPassThruclass is a utility class that handles the IMediaPositionand IMediaSeekinginterfaces for single-input pin renderers and transform filters.
IMediaPositionis the interface originally used for seeking in time-based media streams. IMediaSeekingis an interface intended to replace IMediaPositionin 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 IMediaPositionand IMediaSeekingfrom 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 IMediaPositionor IMediaSeekinginterface 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 IPinpointer to your input pin, and delegate all IMediaPositionand IMediaSeekingmethods to it. The class will find the output pin connected to the input pin, query this output pin for the IMediaPositionor IMediaSeekinginterface, and respond appropriately.
Protected Data Members
m_Pin | Pointer to the input pin of the filter. |
Member Functions
CPosPassThru | Constructs a CPosPassThruobject. |
ForceRefresh | Releases any cached interfaces held on the upstream pin. |
Overridable Member Functions
GetMediaTime | Retrieves the starting and ending media times. |
Implemented IMediaPosition Methods
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
Name | 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
NonDelegatingQueryInterface | Returns a specified reference-counted interface. |