CBaseMediaFilter Class
This is an abstract base class that provides support for the IMediaFilter interface. The CBaseMediaFilter class 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 CBaseFilter class (or base classes derived from this) instead of from this class.
All member functions in this class that return HRESULT and 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 CBaseMediaFilter object. |
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. |
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.