IDirectXVideoDecoderService::CreateVideoDecoder method

Creates a video decoder device.

Syntax


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

Parameters

Guid [in]

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

pVideoDesc [in]

Pointer to a DXVA2_VideoDesc structure that describes the video content.

pConfig [in]

Pointer to a DXVA2_ConfigPictureDecode structure that specifies the decoder configuration.

ppDecoderRenderTargets [in]

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.

NumSurfaces [in]

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

ppDecode [out]

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 codeDescription
S_OK

The method succeeded.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Dxva2api.h

See also

IDirectXVideoDecoderService
DirectX Video Acceleration 2.0

 

 

Show: