MFInitVideoFormat_RGB function (mfapi.h)
[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.]
Initializes an MFVIDEOFORMAT structure for an uncompressed RGB video format.
Syntax
HRESULT MFInitVideoFormat_RGB(
[in] MFVIDEOFORMAT *pVideoFormat,
[in] DWORD dwWidth,
[in] DWORD dwHeight,
[in] DWORD D3Dfmt
);
Parameters
[in] pVideoFormat
A pointer to an MFVIDEOFORMAT structure. The functions fills in the structure members with the format information.
[in] dwWidth
The width of the video, in pixels.
[in] dwHeight
The height of the video, in pixels.
[in] D3Dfmt
A D3DFORMAT value that specifies the RGB format.
Return value
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This function fills in some reasonable default values for the specified RGB format.
Developers are encouraged to use media type attributes instead of using the MFVIDEOFORMAT structure. See Media Type Attributes.
In general, you should avoid calling this function. If you know all of the format details, you can fill in the MFVIDEOFORMAT structure without this function. If you do not know all of the format details, attributes are preferable to using the MFVIDEOFORMAT structure.
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 | Evr.lib |
DLL | Mfplat.dll |