CBaseOutputPin::DecideAllocator (Compact 2013)
3/26/2014
Negotiates the allocator to use.
Syntax
virtual HRESULT DecideAllocator(
IMemInputPin* pPin,
IMemAllocator** pAlloc
);
Parameters
- pPin
Pointer to the IPin Interface interface of the connecting pin.
- pAlloc
Pointer to the negotiated IMemAllocator Interface interface.
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
Header |
dshow.h, |
Library |
ole32.lib, |