Compartir a través de


CBaseOutputPin::DecideAllocator (Compact 2013)

3/26/2014

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

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CBaseOutputPin Class