Freigeben über


IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper

 
Microsoft DirectShow 9.0

IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper

The AllocateSurfaceHelper method allocates a Direct3D surface based on application-specified parameters.

If you are implementing a custom allocator-presenter for the VMR-9, you can use this method to allocate the surfaces.

Syntax

  HRESULT AllocateSurfaceHelper(
  VMR9AllocationInfo*  lpAllocInfo,
  DWORD*  lpNumBuffers,
  IDirect3DSurface9**  lplpSurface
);

Parameters

lpAllocInfo

[in]  Pointer to a VMR9AllocationInfo structure that describes the surfaces to create.

lpNumBuffers

[in, out]  On input, this parameter specifies the number of surfaces to create. On output, this parameter contains the number of surfaces that the method created.

lplpSurface

[out]  Address of an array of IDirect3DSurface9 interface pointers. The size of the array must equal the value in lpNumBuffers. The method fills the array with valid IDirect3DSurface9 pointers for each Direct3D surface that it creates. The caller must release the interface pointers. (Do not put any valid pointers into the array before you call this method, because the method will overwrite them, causing a memory leak.)

Return Values

The method returns an HRESULT. Possible values include those in the following table.

Value Description
S_OK The method succeeded.

Requirements

Header: Include D3d9.h, Vmr9.h.

Library: Use Strmiids.lib.

See Also