CBaseFilter Class
CBaseFilter is an abstract base class from which all filters are derived. It supports the Component Object Model (COM) IBaseFilter interface and is derived from the CUnknown class. This class supports the enumeration of pins by calling the pure virtual member functions CBaseFilter::GetPin and GetPinCount. These member functions must be overridden by any derived class.
The CBaseFilter class assumes that all the filter's pins are derived from the CBasePin class. CBaseFilter::GetPin must return a pointer to CBasePin.
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 | Filter graph's reference clock. |
m_pGraph | Pointer to a graph to which this filter belongs. |
m_PinVersion | Current version of the pins used on the filter. |
m_pLock | Pointer to the critical section used for locking. |
m_pName | Filter name. |
m_pSink | Pointer to the IMediaEventSink interface on the filter graph manager. |
m_State | Current state: running or paused. |
m_tStart | Offset from the stream time to the reference time. |
Member Functions
CBaseFilter | Constructs a CBaseFilter object. |
GetFilterGraph | Returns the filter graph associated with the filter. This is used in the implementation of CEnumPins. |
IncrementPinVersion | Adds 1 to the pin version stored in m_PinVersion. |
IsActive | Determines if the filter is currently active (running or paused) or stopped. |
NotifyEvent | Sends an event notification to the filter graph. |
ReconnectPin | Requests pin for a reconnect. |
Overridable Member Functions
GetPin | Returns a pointer to the requested pin. |
GetPinCount | Returns the number of pins currently available on this object. |
GetPinVersion | Returns the current version of the base filter for comparison with the version with which the pin was initialized. This member function can be overridden if pins are being created dynamically. |
GetSetupData | Retrieves the registration data associated with the filter. |
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 State_Paused state. |
Run | Instructs the filter to transition to State_Running state. Passes a time value to synchronize independent streams. |
SetSyncSource | Informs the filter of the reference clock with which it should synchronize activity. |
Stop | Instructs the filter to transition to the State_Stopped state. |
Implemented IBaseFilter Methods
EnumPins | Provides an enumerator for this pin's preferred media types (implemented by this class). |
FindPin | Retrieves the pin with the specified identifier. |
JoinFilterGraph | Notifies a filter that it has joined a filter graph (implemented by this class). |
QueryFilterInfo | Gets information about the specified filter (implemented by this class). |
QueryVendorInfo | Retrieves optional information supplied by a vendor for the specified filter. |
Implemented IAMovieSetup Methods
Register | Adds the filter to the registry. |
Unregister | Removes the filter from the registry. |
Implemented INonDelegatingUnknown Methods
NonDelegatingQueryInterface | Passes out pointers to any interfaces added to the derived filter class. |
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.