DecideAllocator method selects a memory allocator.
Pointer to the input pin's IMemInputPin interface.
Address of a variable that receives a pointer to the allocator's IMemAllocator interface.
Returns S_OK if successful, or an HRESULT value indicating the cause of the error.
This method is called at the end of the pin connection process. It performs the following steps:
- Calls the IMemInputPin::GetAllocatorRequirements method to retrieve the input pin's buffer requirements, if any.
- Calls the IMemInputPin::GetAllocator method to request an allocator from the input pin. If the input pin does not provide an allocator, the output pin creates one by calling the CBaseOutputPin::InitAllocator class method.
- Calls the CBaseOutputPin::DecideBufferSize class method, which sets the allocator properties. This is a pure virtual method; the derived class must implement it.
- Calls the IMemInputPin::NotifyAllocator method, which notifies the input pin of the allocator being used.