Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MFCreateDXGISurfaceBuffer
Collapse the table of content
Expand the table of content

MFCreateDXGISurfaceBuffer function

Creates a media buffer to manage a Microsoft DirectX Graphics Infrastructure (DXGI) surface.

Syntax


HRESULT MFCreateDXGISurfaceBuffer(
  _In_  REFIID         riid,
  _In_  IUnknown       *punkSurface,
  _In_  UINT           uSubresourceIndex,
  _In_  BOOL           fBottomUpWhenLinear,
  _Out_ IMFMediaBuffer **ppBuffer
);

Parameters

riid [in]

Identifies the type of DXGI surface. This value must be IID_ID3D11Texture2D.

punkSurface [in]

A pointer to the IUnknown interface of the DXGI surface.

uSubresourceIndex [in]

The zero-based index of a subresource of the surface. The media buffer object is associated with this subresource.

fBottomUpWhenLinear [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 Direct3D.

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

ppBuffer [out]

Receives a pointer to the IMFMediaBuffer interface. The caller must release the buffer.

Return value

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

Remarks

The returned buffer object supports the following interfaces:

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