IDXVAHD_Device::CreateVideoSurface method (dxvahd.h)

Creates one or more Microsoft Direct3D video surfaces.

Syntax

HRESULT CreateVideoSurface(
  [in]      UINT                Width,
  [in]      UINT                Height,
  [in]      D3DFORMAT           Format,
  [in]      D3DPOOL             Pool,
  [in]      DWORD               Usage,
  [in]      DXVAHD_SURFACE_TYPE Type,
  [in]      UINT                NumSurfaces,
  [out]     IDirect3DSurface9   **ppSurfaces,
  [in, out] HANDLE              *pSharedHandle
);

Parameters

[in] Width

The width of each surface, in pixels.

[in] Height

The height of each surface, in pixels.

[in] Format

The pixel format, specified as a D3DFORMAT value or FOURCC code. For more information, see Video FOURCCs.

[in] Pool

The memory pool in which the surface is created. This parameter must equal the InputPool member of the DXVAHD_VPDEVCAPS structure. Call the IDXVAHD_Device::GetVideoProcessorDeviceCaps method to get this value.

[in] Usage

Reserved. Set to 0.

[in] Type

The type of surface to create, specified as a member of the DXVAHD_SURFACE_TYPE enumeration.

[in] NumSurfaces

The number of surfaces to create.

[out] ppSurfaces

A pointer to an array of IDirect3DSurface9 pointers. The NumSurfaces parameter specifies the number of elements in the array. The method fills the array with pointers to the new video surfaces. The caller must release the pointers.

[in, out] pSharedHandle

Reserved. Set to NULL.

Return value

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

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header dxvahd.h

See also

DXVA-HD

IDXVAHD_Device