Freigeben über


MFCreateDXSurfaceBuffer Function

Creates a media buffer object that manages a Direct3D 9 surface.

Syntax

HRESULT MFCreateDXSurfaceBuffer(
  __in   REFIID riid,
  __in   IUnknown *punkSurface,
  __in   BOOL fBottomUpWhenLinear,
  __out  IMFMediaBuffer **ppBuffer
);

Parameter

  • riid [in]
    Identifies the type of Direct3D 9 surface. Currently this value must be IID_IDirect3DSurface9.

  • punkSurface [in]
    A pointer to the IUnknown interface of the DirectX surface.

  • 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 DirectX.

    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.

Rückgabewert

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Rückgabecode Beschreibung
S_OK

The method succeeded.

E_INVALIDARG

Invalid argument.

 

Hinweise

This function creates a media buffer object that holds a pointer to the Direct3D surface specified in punkSurface. Locking the buffer gives the caller access to the surface memory. When the buffer object is destroyed, it releases the surface. For more information about media buffers, see Media Buffers.

Hinweis  This function does not allocate the Direct3D surface itself.

The buffer object created by this function also exposes the IMF2DBuffer interface. For more information, see DirectX Surface Buffer.

This function does not support DXGI surfaces.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Mfapi.h

Bibliothek

Evr.lib

DLL

Evr.dll

Siehe auch

DirectX Surface Buffer

Media Foundation Functions

Media Buffers