Microsoft Windows CE 3.0  

CBaseOutputPin::DecideAllocator

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Negotiates the allocator to use.

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

Parameters

pPin
Pointer to the IPininterface of the connecting pin.
pAlloc
Pointer to the negotiated IMemAllocatorinterface.

Return Values

Returns NOERROR if successful; otherwise, returns an HRESULTvalue.

Remarks

This member function calls the CBaseOutputPin::DecideBufferSizemember function, which is not implemented by this base class. Override DecideBufferSizeto call IMemAllocator::SetProperties.

If the connected input pin fails a call to IMemInputPin::GetAllocator, this member function constructs a CMemAllocatorobject and calls CBaseOutputPin::DecideBufferSizeon that object. If the call to DecideBufferSizeis successful, this member function notifies the input pin of the selected allocator. This function is called by the base class implementation of the IPin::Connectmethod, which is responsible for locking the object's critical section.

Override this member function if you want to use your own allocator. The input pin gets the first choice for the allocator, and the output pin agrees or forces it to use another allocator.