IDirectXVideoDecoder::BeginFrame method (dxva2api.h)

Starts the decoding operation.

Syntax

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

Parameters

[in] pRenderTarget

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

[in] pvPVPData

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 code Description
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

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

IDirectXVideoDecoder