Compartilhar via


CTransInPlaceFilter::DecideBufferSize

 
Microsoft DirectShow 9.0

CTransInPlaceFilter::DecideBufferSize

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

Syntax

  HRESULT DecideBufferSize(
    IMemAllocator *pAlloc,
    ALLOCATOR_PROPERTIES *pProperties
);

Parameters

pAlloc

Pointer to the IMemAllocator object used by the output pin.

pProperties

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

Remarks

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.

Requirements

**  Header:** Declared in Transip.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also