IAsyncReader::RequestAllocator method (strmif.h)
RequestAllocator method requests an allocator during the pin connection.
HRESULT RequestAllocator( IMemAllocator *pPreferred, ALLOCATOR_PROPERTIES *pProps, IMemAllocator **ppActual );
Pointer to the IMemAllocator interface on the input pin's preferred allocator, or NULL.
Specifies the address of an ALLOCATOR_PROPERTIES structure, allocated by the caller. The caller should fill in any allocator properties that the input pin requires, and set the remaining members to zero.
Address of a variable that receives an IMemAllocator interface pointer.
Returns an HRESULT value. Possible values include the following.
||Failure to initialize an allocator.|
||An invalid alignment was specified.|
||Allocator was returned.|
The downstream input pin should call this method during the connection process. If the pin has a preferred allocator, specify it in the pPreferred parameter. Specify any buffer requirements, such as buffer size or alignment, in the pProps parameter. The output pin chooses the allocator and returns a pointer to it in the ppActual parameter.
The output pin is not required to honor the input pin's requests. If the input pin has any absolute requirements, it should call the IMemAllocator::GetProperties method on the returned allocator. It can fail the connect if the allocator properties are not suitable. Once the connection is established, the input pin must use the allocator chosen by the output pin.
The input pin is responsible for committing and decommitting the allocator.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||strmif.h (include Dshow.h)|