IDirectXVideoDecoderService::CreateVideoDecoder method (dxva2api.h)

Creates a video decoder device.

Syntax

HRESULT CreateVideoDecoder(
  [in]  REFGUID                         Guid,
  [in]  const DXVA2_VideoDesc           *pVideoDesc,
  [in]  const DXVA2_ConfigPictureDecode *pConfig,
  [in]  IDirect3DSurface9               **ppDecoderRenderTargets,
  [in]  UINT                            NumRenderTargets,
  [out] IDirectXVideoDecoder            **ppDecode
);

Parameters

[in] Guid

GUID that specifies the decoder device to create. To get the available device GUIDs, call IDirectXVideoDecoderService::GetDecoderDeviceGuids.

[in] pVideoDesc

Pointer to a DXVA2_VideoDesc structure that describes the video content.

[in] pConfig

Pointer to a DXVA2_ConfigPictureDecode structure that specifies the decoder configuration.

[in] ppDecoderRenderTargets

Pointer to an array of IDirect3DSurface9 pointers containing pointers to the decoder render targets. To create these surfaces, call IDirectXVideoAccelerationService::CreateSurface. Specify DXVA2_VideoDecoderRenderTarget for the DxvaType parameter.

[in] NumRenderTargets

Size of the ppDecoderRenderTargets array. This value cannot be zero.

[out] ppDecode

Receives a pointer to the decoder's IDirectXVideoDecoder interface. The caller must release the interface.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header dxva2api.h

See also

DirectX Video Acceleration 2.0

IDirectXVideoDecoderService