Creates a DirectX Video Acceleration (DXVA) video processor or DXVA decoder render target.
HRESULT CreateSurface( UINT Width, UINT Height, UINT BackBuffers, D3DFORMAT Format, D3DPOOL Pool, DWORD Usage, DWORD DxvaType, IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle );
The width of the surface, in pixels.
The height of the surface, in pixels.
The number of back buffers. The method creates BackBuffers + 1 surfaces.
The pixel format, specified as a D3DFORMAT value or FOURCC code. For more information, see the Direct3D documentation.
The memory pool in which to create the surface, specified as a D3DPOOL value. For more information, see the Direct3D documentation. Decoders should generally use the value D3DPOOL_DEFAULT.
Reserved. Set this value to zero.
The type of surface to create. Use one of the following values.
||Video decoder render target.|
||Video processor render target. Used for IDirectXVideoProcessor::VideoProcessBlt operations.|
||Software render target. This surface type is for use with software DXVA devices.|
The address of an array of IDirect3DSurface9 pointers allocated by the caller. The size of the array must be 1 + BackBuffers (enough for the back buffers plus one front buffer). The method fills the array with IDirect3DSurface9 pointers. The caller must release all of the interface pointers. In addition, the front buffer holds a reference count on each of the back buffers. Therefore, the back buffers are never deleted until the front buffer is deleted.
A pointer to a handle that is used to share the surfaces between Direct3D devices. Set this parameter to NULL.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
||The method succeeded.|
||The DirectX Video Acceleration Manager is not initialized.|
||NULL pointer argument.|
If the method returns E_FAIL, try calling IDirect3DDeviceManager9::ResetDevice to reset the DirectX Video Acceleration Manager.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|