IMemInputPin::ReceiveMultiple method (strmif.h)

[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 ReceiveMultiple method receives multiple samples in the stream.

Syntax

HRESULT ReceiveMultiple(
  [in]  IMediaSample **pSamples,
  [in]  long         nSamples,
  [out] long         *nSamplesProcessed
);

Parameters

[in] pSamples

Address of an array of IMediaSample interface pointers, of size nSamples.

[in] nSamples

Number of samples to process.

[out] nSamplesProcessed

Pointer to a variable that receives the number of samples that were processed.

Return value

Returns an HRESULT value. Possible values include those shown in the following table.

Return code Description
S_OK
Success.
S_FALSE
Pin is currently flushing; sample was rejected.
E_POINTER
NULL pointer argument.
VFW_E_INVALIDMEDIATYPE
Invalid media type.
VFW_E_RUNTIME_ERROR
A run-time error occurred.
VFW_E_WRONG_STATE
The pin is stopped.

Remarks

This method behaves like the IMemInputPin::Receive method, but receives an array of samples.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IMemInputPin Interface