|Microsoft DirectX 9.0|
The Receive method receives a media sample, processes it, and delivers an output sample to the downstream filter. This method overrides the CTransformFilter::Receive method.
HRESULT Receive( IMediaSample *pSample );
Pointer to the IMediaSample interface on the input sample.
Returns an HRESULT value. Possible values include the following:
|S_FALSE||The upstream filter should stop sending samples.|
This method calls CVideoTransformFilter::ShouldSkipFrame to determine whether it should deliver this sample or simply discard it. If ShouldSkipFrame returns FALSE (indicating the sample should be delivered), the method does the following:
Also, this method checks for format changes on the input or output sample, by calling IMediaSample::GetMediaType. If there is a format change, the method sets the connection type on the corresponding pin. Before it sets the new type, it calls StopStreaming. After it sets the new type, it calls StartStreaming. The derived class can use these methods to update its internal state. The derived class might also need to check for the new format in its Transform method.