IDirectXVideoDecoderService::CreateVideoDecoder method

Creates a video decoder device.

Syntax

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

Parameters

Guid

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

pVideoDesc

Pointer to a DXVA2_VideoDesc structure that describes the video content.

pConfig

Pointer to a DXVA2_ConfigPictureDecode structure that specifies the decoder configuration.

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.

NumRenderTargets

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

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

   
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