Microsoft DirectX 8.1 (C++) |
Passes the media type from a filter to the allocator.
Syntax
void NotifyMediaType(
CMediaType *pMediaType
);
Parameters
pMediaType
Pointer to the media type the filter established.
Return Value
No return value.
Remarks
The buffers that the image allocator creates are based around CreateDIBSection, which must be told what sort of bitmap the filter requires it to create. The filter does this by calling this member function on the allocator. A filter will usually call this member function after agreeing on a media type during a pin connection. The media type passed to this member function is a pointer; the allocator stores this pointer (not a copy) of the media type it points to (for performance reasons, copying media types is relatively slow). Therefore, the filter that calls this member function should ensure that the media type is always valid until the media type is next set on the allocator (or is called with a NULL type).
See Also