Media Type Functions
The Mtype.h header file in the DirectShow base classes provides helper functions for handling media types. These general-purpose functions create, copy and delete a task-allocated AM_MEDIA_TYPE structure. This is useful when using the IEnumMediaTypes interface, because the implementation allocates the structures that must be deleted later.
The functions are paired as follows:
- CreateMediaType is the opposite of DeleteMediaType.
- FreeMediaType is the opposite of CopyMediaType.
Programming element Description AreEqualVideoTypes Compares the format, height, and width of two video sources. CopyMediaType Copies a task-allocated AM_MEDIA_TYPE structure. CreateAudioMediaType Initializes a media type structure given a wave format structure. CreateMediaType Allocates and initializes an AM_MEDIA_TYPE structure. DeleteMediaType Deletes a task-allocated AM_MEDIA_TYPE structure. FreeMediaType Frees a task-allocated AM_MEDIA_TYPE structure from memory.
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.