IDirectXVideoDecoderService::CreateVideoDecoder 方法 (dxva2api.h)

建立視訊解碼器裝置。

語法

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

參數

[in] Guid

GUID,指定要建立的解碼器裝置。 若要取得可用的裝置 GUID,請呼叫 IDirectXVideoDecoderService::GetDecoderDeviceGuids

[in] pVideoDesc

描述影片內容的 DXVA2_VideoDesc 結構的指標。

[in] pConfig

指定解碼器組態 之DXVA2_ConfigPictureDecode 結構的指標。

[in] ppDecoderRenderTargets

IDirect3DSurface9指標陣列的指標,其中包含解碼器轉譯目標的指標。 若要建立這些表面,請呼叫 IDirectXVideoAccelerationService::CreateSurface。 為 DxvaType 參數指定DXVA2_VideoDecoderRenderTarget。

[in] NumRenderTargets

ppDecoderRenderTargets陣列的大小。 此值不得為零。

[out] ppDecode

接收解碼器 IDirectXVideoDecoder 介面的指標。 呼叫端必須釋放 介面。

傳回值

方法會傳回 HRESULT。 可能的值包括 (但不限於) 下表中的這些值。

傳回碼 描述
S_OK
此方法已成功。

需求

   
最低支援的用戶端 Windows Vista [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2008 [僅限傳統型應用程式]
目標平台 Windows
標頭 dxva2api.h

另請參閱

DirectX 視訊加速 2.0

IDirectXVideoDecoderService