CBaseRenderer.WaitForReceiveToComplete method

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The WaitForReceiveToComplete method waits for the CBaseRenderer::Receive method to complete.

Syntax

void WaitForReceiveToComplete();

Parameters

This method has no parameters.

Return value

This method does not return a value.

Remarks

The CBaseRenderer::Stop and CBaseRenderer::BeginFlush methods call this method to synchronize the state change with the Receive method.

Specifically, this method dispatches messages while it waits for the CBaseRenderer::m_bInReceive flag to become FALSE. The flag becomes TRUE in the CBaseRenderer::PrepareReceive method and switches back to FALSE after the Receive method calls the CBaseRenderer::PrepareRender method. The derived class can use PrepareRender to set the palette. Waiting for PrepareRender to complete ensures that palette-change messages are dispatched before the state change occurs. This avoids a potential deadlock.

Requirements

Requirement Value
Header
Renbase.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CBaseRenderer Class