DEFINE_MEDIATYPE_GUID macro

Defines a media subtype GUID from a FOURCC code, D3DFORMAT value, or audio format type.

Syntax

void DEFINE_MEDIATYPE_GUID(
          name,
          format
)  

Parameters

name
Type:  

The name of the GUID constant to be defined.

format
Type:  

A FOURCC code, D3DFORMAT value, or audio format type.

Return value

None.

Remarks

Media formats are often identified by a FOURCC code (such as ‘AYUV’), D3DFORMAT value (such as D3DFMT_X8R8G8B8), or audio format type (such as WAVE_FORMAT_PCM). The DEFINE_MEDIATYPE_GUID macro defines a new GUID constant from one of these values. The resulting GUID can be used as a media subtype.

This macro invokes the DEFINE_GUID macro. The resulting GUID constant is declared extern, so the declaration must have global scope.

Example

#include <initguid.h>

// Declares a GUID named MFVideoFormat_ABCD_Format.
DEFINE_MEDIATYPE_GUID( MFVideoFormat_ABCD_Format, FCC('ABCD') );  

Requirements

Header: Declared in mfapi.h.