CBaseFilter Class (Compact 2013)
3/26/2014
This 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
Member |
Description |
---|---|
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
Member function |
Description |
---|---|
Constructs a CBaseFilter object. |
|
Returns the filter graph associated with the filter. This is used in the implementation of CEnumPins. |
|
Adds 1 to the pin version stored in m_PinVersion. |
|
Determines if the filter is currently active (running or paused) or stopped. |
|
Sends an event notification to the filter graph. |
|
Requests pin for a reconnect. |
Overrideable Member Functions
Member function |
Description |
---|---|
Returns a pointer to the requested pin. |
|
Returns the number of pins currently available on this object. |
|
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. |
|
Retrieves the registration data associated with the filter. |
|
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 State_Paused state. |
|
Instructs the filter to transition to State_Running state. Passes a time value to synchronize independent streams. |
|
Informs the filter of the reference clock with which it should synchronize activity. |
|
Instructs the filter to transition to the State_Stopped state. |
Implemented IBaseFilter Methods
Method |
Description |
---|---|
Provides an enumerator for this pin's preferred media types (implemented by this class). |
|
Retrieves the pin with the specified identifier. |
|
Notifies a filter that it has joined a filter graph (implemented by this class). |
|
Gets information about the specified filter (implemented by this class). |
|
Retrieves optional information supplied by a vendor for the specified filter. |
Implemented IAMovieSetup Methods
Method |
Description |
---|---|
Adds the filter to the registry. |
|
Removes the filter from the registry. |
Implemented INonDelegatingUnknown Methods
Method |
Description |
---|---|
Passes out pointers to any interfaces added to the derived filter class. |
Requirements
Header |
dshow.h, |
Library |
ole32.lib, |