CBaseMediaFilter Class
A version of this page is also available for
4/8/2010
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
Member | Description |
---|---|
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
Member function | Description |
---|---|
Constructs a CBaseMediaFilter object. |
|
Determines if the filter is active (running or paused) or stopped. |
Overrideable Member Functions
Member function | Description |
---|---|
Returns the current stream time. |
Implemented IPersist Methods
Method | Description |
---|---|
Returns the class identifier of this filter. |
Implemented IMediaFilter Methods
Method | Description |
---|---|
Retrieves the current state of the filter. |
|
Retrieves the current reference clock in use by this filter. |
|
Instructs the filter to transition to the new (paused) state. |
|
Instructs the filter to transition to the new (running) state. |
|
Informs the filter of the reference clock it should synchronize activity with. |
|
Instructs the filter to transition to the new (stopped) state. |
Implemented INonDelegatingUnknown Methods
Method | Description |
---|---|
Passes out references to interfaces supported by CBaseFilter. To pass out pointers to interfaces supported in a derived filter class, override this. |
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 |