Поделиться через


CTransformFilter Class (Windows Embedded CE 6.0)

1/6/2010

Ee495037.c50c5578-c38e-4f00-80ad-54d712b744ea(en-US,WinEmbedded.60).gif

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

CTransformFilter

Constructs a CTransformFilter object.

Overrideable Member Functions

Member function Description

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::Transform member 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 IMediaSample interface and writing the data to the output IMediaSample interface (pure virtual).

Implemented IBaseFilter Methods

Method Description

FindPin

Retrieves the pin with the specified identifier.

Pause

Transitions the filter to State_Paused state if it is not in this state already, and informs the derived class.

Stop

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
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment

See Also

Reference

DirectShow Classes