Share via


CBaseOutputPin::DecideAllocator

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Negotiates the allocator to use.

Syntax

virtual HRESULT DecideAllocator(
  IMemInputPin* pPin,
  IMemAllocator** pAlloc
);

Parameters

Return Value

Returns NOERROR if successful; otherwise, returns an HRESULT value.

Remarks

This member function calls the CBaseOutputPin::DecideBufferSize member function, which is not implemented by this base class.

To call IMemAllocator::SetProperties, override CBaseOutputPin::DecideBufferSize.

If the connected input pin fails a call to IMemInputPin::GetAllocator, this member function constructs a CMemAllocator Class object and calls CBaseOutputPin::DecideBufferSize on that object.

If the call to CBaseOutputPin::DecideBufferSize succeeds, this member function notifies the input pin of the selected allocator.

This function is called by the base class implementation of the IPin::Connect method, which is responsible for locking the object's critical section.

To use your own allocator, override this member function.

The input pin gets the first choice for the allocator, and the output pin agrees or forces it to use another allocator.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment, Version 2.12 requires DXPAK 1.0 or later