Microsoft DirectX 8.1 (C++)

CTransformFilter::Receive

The Receive method receives a media sample, processes it, and delivers an output sample to the downstream filter.

Syntax

HRESULT Receive(
    IMediaSample *pSample
);

Parameters

pSample

Pointer to the IMediaSample interface on the input sample.

Return Value

Returns an HRESULT value.

Remarks

The filter's input pin calls this method when it receives a sample. This method calls the InitializeOutputSample method, which prepares a new output sample. Then it calls the Transform method, which the derived class must implement. The Transform method processes the input data and produces output data.

If the Transform method returns S_FALSE, the Receive method drops this sample. On the first dropped sample, the filter sends an EC_QUALITY_CHANGE event to the filter graph manager. Otherwise, if the Transform method returns S_OK, the filter delivers the output sample. To do so, it calls the IMemInputPin::Receive method on the downstream input pin.

See Also