|Microsoft DirectX 9.0|
The PrepareReceive method prepares the filter to render a sample.
virtual HRESULT PrepareReceive( IMediaSample *pMediaSample );
Pointer to the sample's IMediaSample interface.
Returns an HRESULT value. Possible values include those in the following table.
|VFW_E_SAMPLE_REJECTED||Filter is dropping this sample.|
The filter calls this method from inside the CBaseRenderer::Receive method, before it renders a sample. If the filter is running, this method schedules the sample for rendering.
If the filter already has a pending sample, or if the end-of-stream was already reached, the method returns E_UNEXPECTED. Possibly the upstream filter is not serializing its streaming calls correctly.
If the scheduling algorithm determines that the sample should be dropped (see CBaseRenderer::ScheduleSample), the method returns VFW_E_SAMPLE_REJECTED. However, the input pin's IMemInputPin::Receive method does not pass this error code to the upstream filter, because dropping a sample is not an error.