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.
Syntax
HRESULT Receive(
IMediaSample *pSample
);
Parameters
pSample
Pointer to the IMediaSample interface on the input sample.
Return Value
Returns an HRESULT value. Possible values include the following:
Value | Description |
S_FALSE | The upstream filter should stop sending samples. |
S_OK | Success. |
Remarks
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.
See Also