Freigeben über


Working with MFT Media Types

A media type is a way to describe the format of a media stream. In Media Foundation, media types are represented by the IMFMediaType interface. This interface inherits the IMFAttributes interface. The details of a media type are specified as attributes.

To create a new media type, call the MFCreateMediaType function. This function returns a pointer to the IMFMediaType interface. The media type initially has no attributes.

The Media Foundation SDK provides several helper functions for initializing Media Types from format structures. For example the function MFInitMediaTypeFromVideoInfoHeader initializes a video type from a VIDEOINFOHEADER structure, and the function MFInitMediaTypeFromWaveFormatEx initializes a video type from a WAVEFORMATEX or WAVEFORMATEXTENSIBLE structure.

The format types that are used by the codecs are generally limited to those described by the VIDEOINFOHEADER and WAVEFORMATEX structures.

More information on creating and accessing Media Foundation media types is available in the Media Foundation SDK documentation.

See Also

Working with Codec MFTs

 

 

Send comments about this topic to Microsoft

Build date: 4/7/2010