MFCreateVideoMediaTypeFromBitMapInfoHeaderEx function

Creates a video media type from a BITMAPINFOHEADER structure.

Syntax

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

Parameters

pbmihBitMapInfoHeader

A pointer to the BITMAPINFOHEADER structure to convert.

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.

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

   
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