Microsoft Windows CE 3.0  

CSourceSeeking Class

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.

CSourceSeekingis an abstract class that assists source filters with the implementation of IMediaSeekinginterface methods. This class enables a source filter to handle calls that change the start and stop positions in the media stream and the playback rate.

Derive from this class and set the positions. This class supports IMediaSeeking, and calls the pure virtual member functions CSourceSeeking::ChangeStart, CSourceSeeking::ChangeStop, and CSourceSeeking::ChangeRatewhen CSourceSeeking::SetPositionsor CSourceSeeking::SetRateis called, to enable a source filter to handle these commands and start sending new data.

Override the CSourceSeeking::ChangeStart, CSourceSeeking::ChangeStop, and CSourceSeeking::ChangeRatemember functions to do something when the properties change.

Protected Data Members

m_dRateSeeking Playback rate. Set to 1 by default.
m_dwSeekingCaps Seeking capabilities returned in the GetCapabilitiesfunction. Can be one or more of the following values: AM_SEEKING_CanSeekForwards, AM_SEEKING_CanSeekBackwards, AM_SEEKING_CanSeekAbsolute, AM_SEEKING_CanGetStopPos, AM_SEEKING_CanGetDuration. Set to all of these by default.
m_pLock Pointer to a CCritSecobject for locking.
m_rtDuration Duration of the stream. Set to m_rtStopby default.
m_rtStart Start time. Set to zero by default.
m_rtStop Stop time. Set to the largest positive 64-bit integer possible (9223372036854775807) by default.

Member Functions

CSourceSeeking Constructs a CSourceSeekingobject.

Overridable Member Functions

ChangeRate Override this pure virtual to handle notification of a change of sample rate.
ChangeStart Override this pure virtual to handle notification of a change of start time.
ChangeStop Override this pure virtual to handle notification of a change in stop time.

Implemented IMediaSeeking Methods

CheckCapabilities Checks that all requested capabilities are in m_dwSeekingCaps.
ConvertTimeFormat Checks that the time format is TIME_FORMAT_MEDIA_TIME. This is the only format currently available.
GetAvailable Retrieves the range of seeking times. Earliest is zero and latest is the media stream's duration.
GetCapabilities Retrieves the current seeking capabilities in m_dwSeekingCaps.
GetCurrentPosition Not currently implemented.
GetDuration Retrieves the length of time the media stream will play.
GetPositions Retrieves the current start and stop position settings.
GetPreroll Sets the preroll time to zero.
GetRate Retrieves the current playback rate.
GetStopPosition Retrieves the position within the media stream at which playback should stop.
GetTimeFormat Sets the time format to TIME_FORMAT_MEDIA_TIME. This is the only format currently supported.
IsFormatSupported Determines if the requested format is TIME_FORMAT_MEDIA_TIME. This is the only format currently supported.
IsUsingTimeFormat Determines if the requested format is TIME_FORMAT_MEDIA_TIME. This is the only format currently supported.
QueryPreferredFormat Sets the preferred time format to TIME_FORMAT_MEDIA_TIME. This is the only format currently supported.
SetPositions Sets current and stop positions, first checking that the seeking options are valid.
SetRate Sets the playback rate.
SetTimeFormat Checks that the time format is TIME_FORMAT_MEDIA_TIME. This is the only format currently supported.

Implemented INonDelegatingUnknown Methods

NonDelegatingQueryInterface Retrieves an interface and increments the reference count on the interface.