MFCreateDXGISurfaceBufferX

Creates a media buffer to manage a Microsoft DirectX Graphics Infrastructure (DXGI) surface, for Xbox One.

Syntax

HRESULT MFCreateDXGISurfaceBufferX(
         REFIID riid,
         IGraphicsUnknown *punkSurface,
         UINT uSubresourceIndex,
         BOOL fBottomUpWhenLinear,
         IMFMediaBuffer **ppBuffer
)  

Parameters

riid
Type: REFIID 

[in] Identifies the type of Microsoft DirectX Graphics Infrastructure (DXGI) surface. This value must be IID_ID3D11Texture2D.

punkSurface
Type: IGraphicsUnknown *

[in] A pointer to the IGraphicsUnknown interface of the Microsoft DirectX Graphics Infrastructure (DXGI) surface.

uSubresourceIndex
Type: UINT 

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

fBottomUpWhenLinear
Type: BOOL 

[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 Microsoft Direct3D. For more information about top-down versus bottom-up images, see Image Stride.

ppBuffer
Type: IMFMediaBuffer **

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

Return value

Type: HRESULT 

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

Refer to Media Foundation return codes.

Remarks

The returned buffer object supports the following interfaces:

Requirements

Header: Declared in mfapi.h.

Library: Use Mfplat.lib.