CPullPin.DecideAllocator method

[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 DecideAllocator method negotiates an allocator with the output pin.

Syntax

virtual HRESULT DecideAllocator(
   IMemAllocator        *pAlloc,
   ALLOCATOR_PROPERTIES *pProps
);

Parameters

pAlloc

Pointer to the IMemAllocator interface of the input pin's preferred allocator, or NULL.

pProps

Pointer to an optional ALLOCATOR_PROPERTIES structure that contains the input pin's buffer requirements.

Return value

Returns S_OK if successful, or an error code otherwise.

Remarks

This method calls the IAsyncReader::RequestAllocator method to negotiate an allocator. It passes the pAlloc parameter directly to the RequestAllocator method. It passes the pProps parameter to RequestAllocator if pProps is non-NULL; otherwise, it creates an ALLOCATOR_PROPERTIES structure with a default request of three 64K buffers.

Requirements

Requirement Value
Header
Pullpin.h
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CPullPin Class

CPullPin::Connect