Share via


CRendererInputPin::Receive

Returns the next block of data from the stream.

HRESULT Receive(
  IMediaSample* pMediaSample 
);

Parameters

  • pMediaSample
    Media sample.

Return Values

Returns an HRESULT value.

Remarks

This member function implements the IMemInputPin::Receive method, and it overrides the CBaseInputPin::Receive member function, which it calls to verify formats.

This is a blocking synchronous member function. It blocks and waits until it is time for the sample to be rendered. It calls CBaseRenderer::Receive, which actually does the blocking. Because only one sample is ever outstanding, this member function checks the media type and calls CRendererInputPin::SetMediaType to change the pin's media type if the sample's type has changed.

Call the IUnknown::AddRef method if you must hold the returned data block beyond the completion of the CRendererInputPin::Receive member function. If you call AddRef, be sure to call the IUnknown::Release method upon completion of AddRef.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.

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

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.