Export (0) Print
Expand All

CBaseInputPin.ReceiveMultiple method

The ReceiveMultiple method receives an array of samples. This method implements the IMemInputPin::ReceiveMultiple method.

Syntax


HRESULT ReceiveMultiple(
  IMediaSample **pSamples,
  long nSamples,
  long *nSamplesProcessed
);

Parameters

pSamples

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

nSamples

Number of samples to process.

nSamplesProcessed

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

Return value

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

Return codeDescription
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 CBaseInputPin::Receive method, but receives an array of samples. In the base class, the method loops through the array and calls Receive with each sample. Override this function if your filter can process batches of samples more efficiently than processing them one at a time.

Requirements

Header

Amfilter.h (include Streams.h)

Library

Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CBaseInputPin Class

 

 

Community Additions

ADD
Show:
© 2014 Microsoft