MFInitMediaTypeFromMPEG2VideoInfo function (mfapi.h)
Initializes a media type from a DirectShow MPEG2VIDEOINFO structure.
Syntax
HRESULT MFInitMediaTypeFromMPEG2VideoInfo(
IMFMediaType *pMFType,
const MPEG2VIDEOINFO *pMP2VI,
UINT32 cbBufSize,
const GUID *pSubtype
);
Parameters
pMFType
Pointer to the IMFMediaType interface of the media type to initialize. To create the uninitialized media type object, call MFCreateMediaType.
pMP2VI
Pointer to a MPEG2VIDEOINFO structure that describes the media type. The caller must fill in the structure members before calling this function.
cbBufSize
Size of the MPEG2VIDEOINFO structure, in bytes.
pSubtype
Pointer to a subtype GUID. This parameter can be NULL. If the subtype GUID is specified, the function uses it to set the media subtype. Otherwise, the function attempts to deduce the subtype from the biCompression field contained in the MPEG2VIDEOINFO structure.
Return value
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The function succeeded. |
Requirements
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 | Mfplat.lib |
DLL | Mfplat.dll |