Microsoft Windows CE 3.0  

CTransformFilter Class

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.

CTransformFilteris an abstract base class that supports a simple transform filter with a single input and a single output. It is derived from the CUnknownclass, and it supports the IBaseFilterinterface. Each pin, declared as Friends in this class, supports the IPininterface and uses the shared memory transport based on the IMemInputPininterface. The filter uses classes derived from the CBaseFilterclass to support IBaseFilter; the CTransformInputPininput pin class is derived from the CBaseInputPinclass, and the CTransformOutputPinoutput pin class is derived from the CBaseOutputPinclass.

Note that, while most member functions in this class are designed to be overridden, the following pure virtual member functions must be overridden.

CheckInputType

CheckTransform

DecideBufferSize

GetMediaType

Transform

Protected Data Members

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::Receiveif the call to the derived class's Transformmember function fails ( CTransformFilter::Receivereturns 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 CBaseMediaFilterconstructor so that the base class uses it too.
m_csReceive Critical section that is held when processing events that occur on the receiving thread ( CTransformInputPin::Receiveand CTransformInputPin::EndOfStream).
m_idTransform Identifier used for performance measurement. Available only when PERFis defined.
m_pInput Pointer to the input pin class object.
m_pOutput Pointer to the output pin class object.

Member Functions

CTransformFilter Constructs a CTransformFilterobject.

Overridable Member Functions

AlterQuality Receives a quality-control notification from the output pin and provides an opportunity to alter the media stream's quality.
BeginFlush Receives notification of entering the flushing state and passes it downstream.
BreakConnect Informs the derived class when the connection is broken.
CheckConnect Informs the derived class when the connection process is starting.
CheckInputType Verifies that the input pin supports the media type and proposes the media type of the output pin (pure virtual).
CheckTransform Verifies that the input and output pins support the media type (pure virtual).
CompleteConnect Informs the derived class when the connection process has completed.
DecideBufferSize Sets the number and size of buffers required for the transfer (pure virtual).
EndFlush Receives notification of leaving the flushing state and passes it downstream.
EndOfStream Receives an end-of-stream notification and passes it downstream.
GetMediaType Returns one of the media types that the output pin supports (pure virtual).
GetPin Returns the pin for the index specified.
GetPinCount Returns the number of pins on the filter.
NewSegment Informs the derived class that a new segment has started and delivers it downstream.
Receive Receives the media sample, calls the CTransformFilter::Transformmember function, and then delivers the media sample.
RegisterPerfId Registers a performance measurement identifier.
SetMediaType Informs the derived class when the media type is established for the connection.
StartStreaming Informs the derived class that streaming is starting.
StopStreaming Informs the derived class that streaming is ending.
Transform Performs transform operations, reading from the input IMediaSampleinterface and writing the data to the output IMediaSampleinterface (pure virtual).

Implemented IBaseFilter Methods

FindPin Retrieves the pin with the specified identifier.
Pause Transitions the filter to State_Pausedstate if it is not in this state already, and informs the derived class.
Stop Transitions the filter to State_Stoppedstate if it is not in this state already, and informs the derived class.