Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IMemAllocator Interface

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This interface allocates IMediaSample blocks to be used for data transfer between pins.

The blocks can be provided by the input pin, output pin, or a third party.

Release the IMediaSample object by calling the IUnknown::Release method.

Implement this interface if you are providing a buffer for media samples.

This is typically done by filters that originate, copy, or provide a destination for the media stream. For example, a source filter provides an allocator corresponding to the incoming media, and a renderer filter provides an allocator corresponding to the hardware memory (DirectX®, for example).

Intermediate transform filters can create their own allocator if copying samples and not writing directly to the renderer's allocator.

Use the CBaseAllocator class to implement the IMemAllocator interface.

Filters use this interface when retrieving or sending media samples.

The allocator used might belong to a filter further upstream or downstream than the next filter, because many filters can pass the allocators through and modify the data in place.

The following table shows the methods that appear in the Vtable beneath the standard COM methods inherited from IUnknown.

Method Description

SetProperties

Specifies a desired number of blocks, size of the blocks, and block alignment figure. This method returns the actual values for the same.

GetProperties

Determines the size, number, and alignment of blocks.

Commit

Commits the memory for the specified buffers.

Decommit

Releases the memory for the specified buffers.

GetBuffer

Retrieves a container for a sample.

ReleaseBuffer

Releases a container for a sample.

Windows Embedded CEWindows CE 2.12 and later
Windows MobilePocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later
NoteMicrosoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.