|Microsoft DirectX 9.0|
The CImageAllocator class implements an allocator that manages GDI device-independent bitmaps (DIBs). This class derives from the CBaseAllocator class. It creates media samples that are implemented using the CImageSample class.
An allocator is shared by two connected pins, but is always owned by one of the filters in the connection. A filter that uses CImageAllocator must keep track of whether the allocator was provided by itself or by the other filter. If the allocator was provided by itself, the owning filter can rely on the fact that all media samples from the allocator are CImageSample objects. It can therefore use the CImageSample object to obtain information about the DIB, which is stored in a DIBDATA structure.
The owning filter should call NotifyMediaType whenever the media type changes.
Header: Declared in Winutil.h; include Streams.h.
Library: Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).
|Protected Member Variables||Description|
|m_pFilter||Pointer to the owning filter.|
|m_pMediaType||Pointer to the current media type.|
|Alloc||Allocates memory for the buffers.|
|CheckSizes||Checks allocator properties against the current media type.|
|CreateDIB||Creates a DIB.|
|CreateImageSample||Creates a media sample. Virtual.|
|Free||Releases all of the buffer memory.|
|NotifyMediaType||Informs the object of the current media type.|
|SetProperties||Specifies the number of buffers to allocate and the size of each buffer.|