Compartilhar via


IVMRDeinterlaceControl9::GetNumberOfDeinterlaceModes method (vmr9.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The GetNumberOfDeinterlaceModes method retrieves the deinterlacing modes available to the VMR for the specified video format.

Syntax

HRESULT GetNumberOfDeinterlaceModes(
  [in]      VMR9VideoDesc *lpVideoDescription,
  [in, out] LPDWORD       lpdwNumDeinterlaceModes,
  [out]     LPGUID        lpDeinterlaceModes
);

Parameters

[in] lpVideoDescription

Pointer to a VMR9VideoDesc structure that describes the video.

[in, out] lpdwNumDeinterlaceModes

Pointer to a DWORD value. On input, this value specifies the size of the array given in lpDeinterlaceModes. On output, it receives number of GUIDs the method copied into the array.

[out] lpDeinterlaceModes

Address of an array allocated by caller. The method fills the array with GUID values. To determine the size of the array that is needed, set this parameter to NULL and check the value returned in lpdwNumDeinterlaceModes.

Return value

Returns an HRESULT value. Possible values include the following:

Return code Description
E_POINTER
NULL pointer argument.
S_OK
Success
VFW_E_VMR_NOT_IN_MIXER_MODE
The VMR is not in mixer mode.
VFW_E_DDRAW_CAPS_NOT_SUITABLE
The video card does not support hardware deinterlacing.

Remarks

This method returns an array of GUIDs, where each GUID represents a deinterlacing mode that is supported in hardware by the graphics device driver. The array is sorted by quality, so the first entry represents the best quality, the second entry represents the next best quality, and so forth.

All drivers are required to support the following mode:

GUID Description
DXVA_DeinterlaceBobDevice Bob mode
 

Drivers can support additional modes and should define their own GUIDs to identify them. For each returned mode, call the IVMRDeinterlaceControl9::GetDeinterlaceModeCaps method to get information about that mode.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 R2 [desktop apps only]
Target Platform Windows
Header vmr9.h
Library Strmiids.lib

See also

Error and Success Codes

IVMRDeinterlaceControl9 Interface

Setting Deinterlace Preferences

Using the Video Mixing Renderer

Video Mixing Renderer Filter 9