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

The name of the GUID constant to be defined.

format

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

Return value

This macro does not return a value.

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 resuling GUID constant is declared extern, so the declaration must have global scope.

Examples


#include <initguid.h>

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


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfapi.h

See also

Media Foundation Macros
Media Type GUIDs
Media Types
MF_MT_SUBTYPE

 

 

Show: