Defines a media subtype GUID from a FOURCC code, D3DFORMAT value, or audio format type.
void DEFINE_MEDIATYPE_GUID(
name,
format
)
name
Type:
The name of the GUID constant to be defined.
format
Type:
A FOURCC code, D3DFORMAT value, or audio format type.
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.
#include <initguid.h>
// Declares a GUID named MFVideoFormat_ABCD_Format.
DEFINE_MEDIATYPE_GUID( MFVideoFormat_ABCD_Format, FCC('ABCD') );
Header: Declared in mfapi.h.