CTransformInputPin.Receive method

The Receive method receives the next media sample in the stream. This method implements the IMemInputPin::Receive method.

Syntax


HRESULT Receive(
   IMediaSample *pSample
);

Parameters

pSample

Pointer to the sample's IMediaSample interface.

Return value

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

Return codeDescription
S_FALSE

Pin is currently flushing; sample was rejected.

S_OK

Success.

 

Remarks

This method calls the pin's CBaseInputPin::Receive method, which checks the pin's streaming state and checks for format changes in the media type. Then it calls the filter's CTransformFilter::Receive method, which processes the sample and delivers it downstream.

If the filter needs to access the sample after this method returns, it should hold a reference count by calling the IUnknown::AddRef method on the sample. For example, some decoder filters need the current sample in order to decode the next sample.

Requirements

Header

Transfrm.h (include Streams.h)

Library

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

 

 

Show: