CBaseRenderer::PrepareReceive (Windows CE 5.0)

Send Feedback

Ensures that a sample can be rendered.

virtual HRESULT PrepareReceive(IMediaSample* pMediaSample);

Parameters

  • pMediaSample
    Media sample.

Return Values

Returns NOERROR if successful, VFW_E_SAMPLE_REJECTED if the delivered sample is later than the sample's timestamp, or E_UNEXPECTED if a renderable sample is available.

Remarks

This member function is called when the upstream filter delivers a sample.

If the upstream filter is running (streaming), the sample is scheduled with the reference clock.

If the upstream filter is not streaming, a sample in paused mode has been received, so any state transition can be completed.

On leaving this function, everything is unlocked so an application thread can get in and change the state to stopped. In this case, it also signals the thread event so the wait call is stopped.

This function is typically called from the IMemInputPin::Receive method on the renderer's input pin.

Although PrepareReceive returns VFW_E_SAMPLE_REJECTED if the sample is delivered too late to be useful, the IMemInputPin::Receive method should not pass the VFW_E_SAMPLE_REJECTED error on to the upstream filter in this case.

Instead, IMemInputPin::Receive should return NOERROR, because no error occurred.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements.

For more information, see Setting Up the Build Environment.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.