IDirectXVideoDecoder::BeginFrame method

Starts the decoding operation.

Syntax


HRESULT BeginFrame(
  [in] IDirect3DSurface9 *pRenderTarget,
  [invoid              *pvPVPData
);

Parameters

pRenderTarget [in]

Pointer to the IDirect3DSurface9 interface of the render target where the decoded frame will be written.

pvPVPData [in]

Reserved; set to NULL.

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.

E_INVALIDARG

Invalid surface type. See Remarks.

 

Remarks

After this method is called, call IDirectXVideoDecoder::Execute to perform decoding operations. When all decoding operations have been executed, call IDirectXVideoDecoder::EndFrame.

Each call to BeginFrame must have a matching call to EndFrame, and BeginFrame calls cannot be nested.

DXVA 1.0 migration note: Unlike the IAMVideoAccelerator::BeginFrame method, which specifies the buffer as an index, this method takes a pointer directly to the uncompressed buffer.

The surface pointed to by pRenderTarget must be created by calling IDirectXVideoAccelerationService::CreateSurface with the value DXVA2_VideoDecoderRenderTarget for DxvaType.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Dxva2api.h

See also

IDirectXVideoDecoder
DirectX Video Acceleration 2.0

 

 

Show: