MFCreateVideoMediaTypeFromSubtype function (mfapi.h)
Creates a partial video media type with a specified subtype.
HRESULT MFCreateVideoMediaTypeFromSubtype(
[in] const GUID *pAMSubtype,
[out] IMFVideoMediaType **ppIVideoMediaType
);
[in] pAMSubtype
Pointer to a GUID that specifies the subtype. See Video Subtype GUIDs.
[out] ppIVideoMediaType
Receives a pointer to the IMFVideoMediaType interface. The caller must release the interface.
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
This function creates a media type and sets the major type equal to MFMediaType_Video and the subtype equal to the value specified in pAMSubtype.
You can get the same result with the following steps:
- Call MFCreateMediaType. This function returns a pointer to the IMFMediaType interface.
- Set the MF_MT_MAJOR_TYPE attribute to MFMediaType_Video.
- Set the MF_MT_SUBTYPE attribute to the subtype.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | mfapi.h |
Library | Evr.lib |
DLL | Mfplat.dll |