IDirect3DVideoDevice9::CreateSurface method
Creates a compressed surface for DirectX Video Acceleration (DXVA) decoding.
To get the surface requirements, call IDirect3DVideoDevice9::GetDXVACompressedBufferInfo and examine the returned DXVACompBufferInfo structures.
Syntax
HRESULT CreateSurface(
UINT Width,
UINT Height,
UINT BackBuffers,
D3DFORMAT Format,
D3DPOOL Pool,
DWORD Usage,
IDirect3DSurface9 **ppSurface,
HANDLE *pSharedHandle
);
Parameters
-
Width
-
The width of the surface, in pixels. Set this parameter equal to DXVACompBufferInfo.WidthToCreate.
-
Height
-
The height of the surface, in pixels. Set this parameter equal to DXVACompBufferInfo.HeightToCreate.
-
BackBuffers
-
The number of back buffers. This parameter can be zero.
-
Format
-
The pixel format, specified as a D3DFORMAT value. Set this parameter equal to DXVACompBufferInfo.Format.
-
Pool
-
The memory pool in which to create the surface, specified as a D3DPOOL value. Set this parameter equal to DXVACompBufferInfo.Pool.
-
Usage
-
A bitwise OR of one or more D3DUSAGE constants. Set this parameter equal to DXVACompBufferInfo.Usage.
-
ppSurface
-
Receives a pointer to the IDirect3DSurface9 interface. The caller must release the interface.
-
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 Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Header |
|
See also