IDirectXVideoMemoryConfiguration::SetSurfaceType method (dxva2api.h)

Sets the video surface type that a decoder will use for DirectX Video Acceleration (DVXA) 2.0.

Syntax

HRESULT SetSurfaceType(
  [in] DXVA2_SurfaceType dwType
);

Parameters

[in] dwType

Member of the DXVA2_SurfaceType enumeration specifying the surface type. Currently, the only supported value is DXVA2_SurfaceType_DecoderRenderTarget.

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.
ERROR_UNSUPPORTED_TYPE
The renderer does not support the specified surface type.

Remarks

By calling this method, the caller agrees to create surfaces of the type specified in the dwType parameter.

In DirectShow, during pin connection, a video decoder that supports DVXA 2.0 should call SetSurface with the value DXVA2_SurfaceType_DecoderRenderTarget. This notifies the video renderer that the decoder will provide the allocator and will create the Direct3D surfaces for decoding. For more information, see Supporting DXVA 2.0 in DirectShow.

The only way to undo the setting is to break the pin connection.

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

IDirectXVideoMemoryConfiguration

Supporting DXVA 2.0 in DirectShow