Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

MFCreate2DMediaBuffer function

Creates a system-memory buffer object to hold 2D image data.

Syntax


HRESULT MFCreate2DMediaBuffer(
  _In_  DWORD          dwWidth,
  _In_  DWORD          dwHeight,
  _In_  DWORD          dwFourCC,
  _In_  BOOL           fBottomUp,
  _Out_ IMFMediaBuffer **ppBuffer
);

Parameters

dwWidth [in]

Width of the image, in pixels.

dwHeight [in]

Height of the image, in pixels.

dwFourCC [in]

A FOURCC code or D3DFORMAT value that specifies the video format. If you have a video subtype GUID, you can use the first DWORD of the subtype.

fBottomUp [in]

If TRUE, the buffer's IMF2DBuffer::ContiguousCopyTo method copies the buffer into a bottom-up format. The bottom-up format is compatible with GDI for uncompressed RGB images. If this parameter is FALSE, the ContiguousCopyTo method copies the buffer into a top-down format, which is compatible with DirectX.

For more information about top-down versus bottom-up images, see Image Stride.

ppBuffer [out]

Receives a pointer to the IMFMediaBuffer interface.

Return value

This function can return one of these values.

Return codeDescription
S_OK

Success.

MF_E_INVALIDMEDIATYPE

Unrecognized video format.

 

Remarks

The returned buffer object also exposes the IMF2DBuffer2 interface.

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft