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 from which all filters are derived.
It supports the Component Object Model (COM) IBaseFilterinterface and is derived from the CUnknownclass. This class supports the enumeration of pins by calling the pure virtual member functions CBaseFilter::GetPinand GetPinCount. These member functions must be overridden by any derived class.
The CBaseFilterclass assumes that all the filter's pins are derived from the CBasePinclass. CBaseFilter::GetPinmust return a pointer to CBasePin.
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
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 IMediaEventSinkinterface 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 CBaseFilterobject. |
|
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
Windows Embedded CE | Windows CE 3.0 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 |