MFCreateMFVideoFormatFromMFMediaType function

[This API is not supported and may be altered or unavailable in the future. Applications should avoid using the MFVIDEOFORMAT structure, and use media type attributes instead. For more information, see Video Media Types.]

Creates an MFVIDEOFORMAT structure from a video media type.


HRESULT MFCreateMFVideoFormatFromMFMediaType(
  IMFMediaType  *pMFType,
  UINT32        *pcbSize



Pointer to the IMFMediaType interface of a video media type.


Receives a pointer to an MFVIDEOFORMAT structure. The caller must release the memory allocated for the structure by calling CoTaskMemFree.


Receives the size of the MFVIDEOFORMAT structure.

Return Value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header mfapi.h
Library Mfplat.lib
DLL Mfplat.dll

See Also

Media Foundation Functions

Media Type Conversions

Media Types

Video Media Types