VMRSurfaceAllocationFlags enumeration (strmif.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 VMRSurfaceAllocationFlags enumeration is used with the IVMRSurfaceAllocator::AllocateSurface method to specify surface creation parameters.

Syntax

typedef enum VMRSurfaceAllocationFlags {
  AMAP_PIXELFORMAT_VALID = 0x1,
  AMAP_3D_TARGET = 0x2,
  AMAP_ALLOW_SYSMEM = 0x4,
  AMAP_FORCE_SYSMEM = 0x8,
  AMAP_DIRECTED_FLIP = 0x10,
  AMAP_DXVA_TARGET = 0x20
} ;

Constants

 
AMAP_PIXELFORMAT_VALID
Value: 0x1
Indicates that the lpPxFmt field contains valid data that should be used to create the DirectDraw surface.
AMAP_3D_TARGET
Value: 0x2
Indicates that the DirectDraw surface created should also be a Direct3D render target that is created with the DDSCAPS_3DDEVICE flag set.
AMAP_ALLOW_SYSMEM
Value: 0x4
Indicates that if you can't allocate the DirectDraw surface in video memory you will try to allocate a system memory DirectDraw surface. (Note you should never allocate an AGP memory surface.)
AMAP_FORCE_SYSMEM
Value: 0x8
Force the surface to be created in system memory. Specify this if you will use GDI to process the image before it is rendered. The surface must match the current monitor display format (pixel depth).
AMAP_DIRECTED_FLIP
Value: 0x10
Means that when Flip is called you should Flip to the specified DirectDraw Surface passed as a parameter to the PresentImage method in the IVMRImagePresenter interface. Correct support for this flag is crucial in order to keep DXVA buffers seen by a video decoder in sync with the DXVA buffers seen by the graphics driver.
AMAP_DXVA_TARGET
Value: 0x20
Indicates that this surface will be used as a DXVA target.

Remarks

AMAP_3D_TARGET cannot be combined with AMAP_FORCE_SYSMEM or AMAP_ALLOW_SYSMEM because 3D surfaces cannot be created in system memory.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header strmif.h (include Dshow.h)

See also

DirectShow Enumerated Types

IVMRSurfaceAllocator::AllocateSurface