Share via


ISurfaceManager::AllocSurfaceSize

The AllocSurfaceSize method allocates a new ISurface of a specific size. ISurface wraps an IDirect3DSurface9 interface. However, the recommended way to allocate a surface is described in the IMediaTransform::Process documentation.

Syntax

HRESULT AllocSurfaceSize(
  FORMAT_TYPE  type,
  VIDEO_SIZE*  pSize,
  ISurface**  ppBuffer
);

Parameters

type

[in]  A FORMAT_TYPE value that specifies the type of surface to create.

pSize

A VIDEO_SIZE structure that specifies the size of the surface to allocate.

ppBuffer

[out]  Pointer to an ISurface interface pointer that wraps a Direct3D video surface. The caller must release this interface when done with it.

Return Values

The method returns an HRESULT of S_OK for success, or a standard COM error code for failure.

Remarks

If you do not know the exact size of the surface to allocate, use AllocSurface.

Requirements

Client: Windows Vista

Header: Include gputransformplugin.h and GPUPipelineTime.h.

Library: Use GPUPipelineVC7.lib (for Visual Studio .NET) or GPUPipelineVC8.lib (for Visual Studio 2005).

See Also