Microsoft DirectX 9.0


The DecideBufferSize method sets the output pin's buffer requirements.


HRESULT DecideBufferSize(
    IMemAllocator *pAlloc,



Pointer to the IMemAllocator object used by the output pin.


Pointer to the requested allocator properties for count, size, and alignment, as specified by the ALLOCATOR_PROPERTIES structure.

Return Value

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

Value Description
S_OK Success
E_FAIL Failure


This method is called when the CTransInPlaceFilter class needs to provide a buffer size to the downstream filter. If the CTransInPlaceFilter filter is already connected upstream, it uses the allocator properties on the upstream pin connection. Otherwise, it sets the buffer size to 1 byte as a temporary place-holder value. When the upstream filter connects, the CTransInPlaceFilter class renegotiates the downstream allocator. For more information about the pin connection process in this class, see CTransInPlaceFilter Class.

See Also