Microsoft DirectX 8.1 (C++) |
The Receive method receives a media sample, processes it, and delivers it to the downstream filter.
Syntax
HRESULT Receive(
IMediaSample *pSample
);
Parameters
pSample
Pointer to the IMediaSample interface on the sample.
Return Value
Returns an HRESULT value. Possible values include those shown in the following table.
Value | Description |
S_OK | Success |
E_UNEXPECTED | Unexpected error |
Remarks
The filter's input pin calls this method when it receives a sample. The filter calls the Transform method, which the derived class must implement. The Transform method processes the data. If the filter is using only one allocator, it passes pSample directly to the Tranform method. Otherwise, it copies pSample and passes the copy.
If the Transform method returns S_FALSE, the Receive method drops the 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