CRendererInputPin::Receive (Compact 2013)

3/26/2014

Returns the next block of data from the stream.

Syntax

HRESULT Receive(
  IMediaSample* pMediaSample 
);

Parameters

  • pMediaSample
    Media sample.

Return Value

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 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

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CRendererInputPin Class