Microsoft Windows CE 3.0  

CBaseMediaFilter 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.

This is an abstract base class that provides support for the IMediaFilterinterface. The CBaseMediaFilterclass handles State_Stopped, State_Paused, and State_Running state transitions. Typically, this class is used for plug-in distributors rather than filters with pins. Derive your filter classes from the CBaseFilterclass (or base classes derived from this) instead of from this class.

All member functions in this class that return HRESULTand accept a pointer as a parameter return E_POINTER when passed a null pointer.

Protected Data Members

m_clsid Class identifier (CLSID) used for serialization using IPersist.
m_pClock Pointer to a reference clock used for synchronization. The reference count of the clock object must be incremented using AddRef. Pass NULL if no reference clock is available.
m_State Current state of the filter, which can be State_Stopped, State_Paused, or State_Running.
m_tStart Offset from the stream time to the reference time.

Member Functions

CBaseMediaFilter Constructs a CBaseMediaFilterobject.
IsActive Determines if the filter is currently active (running or paused) or stopped.

Overridable Member Functions

StreamTime Returns the current stream time.

Implemented IPersist Methods

GetClassID Returns the class identifier of this filter.

Implemented IMediaFilter Methods

GetState Retrieves the current state of the filter.
GetSyncSource Retrieves the current reference clock in use by this filter.
Pause Instructs the filter to transition to the new (paused) state.
Run Instructs the filter to transition to the new (running) state.
SetSyncSource Informs the filter of the reference clock with which it should synchronize activity.
Stop Instructs the filter to transition to the new (stopped) state.

Implemented INonDelegatingUnknown Methods

NonDelegatingQueryInterface Passes out references to interfaces supported by CBaseFilter. Override this to pass out pointers to interfaces supported in a derived filter class.