MFCreateVideoMediaTypeFromBitMapInfoHeaderEx function (mfapi.h)

Creates a video media type from a BITMAPINFOHEADER structure.

Syntax

HRESULT MFCreateVideoMediaTypeFromBitMapInfoHeaderEx(
  [in]  const BITMAPINFOHEADER *pbmihBitMapInfoHeader,
  [in]  UINT32                 cbBitMapInfoHeader,
        DWORD                  dwPixelAspectRatioX,
        DWORD                  dwPixelAspectRatioY,
        MFVideoInterlaceMode   InterlaceMode,
        QWORD                  VideoFlags,
        DWORD                  dwFramesPerSecondNumerator,
        DWORD                  dwFramesPerSecondDenominator,
        DWORD                  dwMaxBitRate,
  [out] IMFVideoMediaType      **ppIVideoMediaType
);

Parameters

[in] pbmihBitMapInfoHeader

A pointer to the BITMAPINFOHEADER structure to convert.

[in] cbBitMapInfoHeader

The size of the BITMAPINFOHEADER structure in bytes, including the size of any palette entries or color masks that follow the structure.

dwPixelAspectRatioX

The X dimension of the pixel aspect ratio.

dwPixelAspectRatioY

The Y dimension of the pixel aspect ratio.

InterlaceMode

A member of the MFVideoInterlaceMode enumeration, specifying how the video is interlaced.

VideoFlags

A bitwise OR of flags from the MFVideoFlags enumeration.

dwFramesPerSecondNumerator

The numerator of the frame rate in frames per second.

dwFramesPerSecondDenominator

The denominator of the frame rate in frames per second

dwMaxBitRate

The approximate data rate of the video stream, in bits per second. If the rate is unknown, set this parameter to zero.

[out] ppIVideoMediaType

Receives a pointer to the IMFVideoMediaType interface. The caller must release the interface.

Return value

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

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header mfapi.h
Library Evr.lib
DLL Mfplat.dll

See also

Media Foundation Functions