CSourceSeeking Class (Windows CE 5.0)

Send Feedback

ms938858.cutil15(en-us,MSDN.10).gif

This is an abstract class that assists source filters with the implementation of IMediaSeeking interface 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::ChangeRate when CSourceSeeking::SetPositions or CSourceSeeking::SetRate is called, to enable a source filter to handle these commands and start sending new data.

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

Protected Data Members

Member Description
m_dRateSeeking Playback rate. Set to 1 by default.
m_dwSeekingCaps Seeking capabilities returned in the GetCapabilities function.

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 CCritSec object for locking.
m_rtDuration Duration of the stream. Set to m_rtStop by 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

Member function Description
CSourceSeeking Constructs a CSourceSeeking object.

Overrideable Member Functions

Member function Description
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

Method Description
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 supported.
QueryPreferredFormat Sets the preferred time format to TIME_FORMAT_MEDIA_TIME. This is the only format 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 supported.

Implemented INonDelegatingUnknown Methods

Method Description
NonDelegatingQueryInterface Retrieves an interface and increments the reference count on the 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

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.