Share via


CSourcePosition Class

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Aa916308.c4a58614-3378-47f5-8838-f840cf3e770c(en-us,MSDN.10).gif

This is an abstract class that assists source filters with the implementation of IMediaPosition methods.

Derive from this class and set the duration and default stop positions.

This class supports IMediaPosition, and calls the pure virtual member functions CSourcePosition::ChangeStart, CSourcePosition::ChangeStop, and CSourcePosition::ChangeRate when CSourcePosition::put_CurrentPosition, CSourcePosition::put_StopTime, or CSourcePosition::put_Rate is called, to allow a source filter to handle these commands and start sending new data.

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

Protected Data Members

Member Description

m_Duration

Duration of the stream.

m_pLock

Pointer to a CCritSec object for locking.

m_Rate

Sample rate.

m_Start

Start time.

m_Stop

Stop time.

Member Functions

Member function Description

CSourcePosition

Constructs a CSourcePosition object.

Overrideable Member Functions

Member function Description

ChangeRate

Override this pure virtual to handle notification that the rate property has changed.

ChangeStart

Override this pure virtual to handle notification that the start position property has changed.

ChangeStop

Override this pure virtual to handle notification that the stop position property has changed.

Implemented IMediaPosition Methods

Method Description

get_CurrentPosition

Not currently implemented.

get_Duration

Retrieves the total duration of the media.

get_PrerollTime

Not currently implemented.

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

Not currently implemented.

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.

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