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.

Note  Prior to Windows 7, this function was exported from evr.dll. Starting in Windows 7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows 7.
 

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

See also

Media Foundation Functions

Media Types

Uncompressed Video Media Types

Video Media Types