CTransformFilter Class
A version of this page is also available for
4/8/2010
This is an abstract base class that supports a simple transform filter with a single input and a single output.
It is derived from the CUnknown class, and it supports the IBaseFilter interface.
Each pin, declared as Friends in this class, supports the IPin interface and uses the shared memory transport based on the IMemInputPin interface.
The filter uses classes derived from the CBaseFilter class to support IBaseFilter; the CTransformInputPin input pin class is derived from the CBaseInputPin class, and the CTransformOutputPin output pin class is derived from the CBaseOutputPin class.
Although most member functions in this class are designed to be overridden, the following pure virtual member functions must be overridden:
Protected Data Members
Member | Description |
---|---|
m_bEOSDelivered |
End-of-stream delivery status flag. |
m_bQualityChanged |
Status flag that indicates if the stream has degraded. This is set to TRUE in CTransformFilter::Receive if the call to the derived class's Transform member function fails (CTransformFilter::Receive returns NOERROR in this case because returning S_FALSE indicates that the end-of-stream has arrived). |
m_bSampleSkipped |
Status flag that indicates if a frame was skipped. |
m_csFilter |
Critical section that protects the filter state. This critical section is held whenever the state is currently changing or might change. It is passed to the CBaseMediaFilter constructor so the base class uses it too. |
m_csReceive |
Critical section that is held when processing events that occur on the receiving thread (CTransformInputPin::Receive and CTransformInputPin::EndOfStream). |
m_idTransform |
Identifier used for performance measurement. Available only when PERF is defined. |
m_pInput |
Pointer to the input pin class object. |
m_pOutput |
Pointer to the output pin class object. |
Member Functions
Member function | Description |
---|---|
Constructs a CTransformFilter object. |
Overrideable Member Functions
Member function | Description |
---|---|
Receives a quality-control notification from the output pin and provides an opportunity to alter the media stream's quality. |
|
Receives notification of entering the flushing state and passes it downstream. |
|
Informs the derived class when the connection is broken. |
|
Informs the derived class when the connection process is starting. |
|
Verifies that the input pin supports the media type and proposes the media type of the output pin (pure virtual). |
|
Verifies that the input and output pins support the media type (pure virtual). |
|
Informs the derived class when the connection process has completed. |
|
Sets the number and size of buffers required for the transfer (pure virtual). |
|
Receives notification of leaving the flushing state and passes it downstream. |
|
Receives an end-of-stream notification and passes it downstream. |
|
Returns one of the media types that the output pin supports (pure virtual). |
|
Returns the pin for the index specified. |
|
Returns the number of pins on the filter. |
|
Informs the derived class that a new segment has started and delivers it downstream. |
|
Receives the media sample, calls the CTransformFilter::Transform member function, and then delivers the media sample. |
|
Registers a performance measurement identifier. |
|
Informs the derived class when the media type is established for the connection. |
|
Informs the derived class that streaming is starting. |
|
Informs the derived class that streaming is ending. |
|
Performs transform operations, reading from the input IMediaSample interface and writing the data to the output IMediaSample interface (pure virtual). |
Implemented IBaseFilter Methods
Method | Description |
---|---|
Retrieves the pin with the specified identifier. |
|
Transitions the filter to State_Paused state if it is not in this state already, and informs the derived class. |
|
Transitions the filter to State_Stopped state if it is not in this state already, and informs the derived class. |
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 |