Skip to content

Latest commit

 

History

History
136 lines (105 loc) · 5.08 KB

nf-strmif-ivmrsurfaceallocator-allocatesurface.md

File metadata and controls

136 lines (105 loc) · 5.08 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:strmif.IVMRSurfaceAllocator.AllocateSurface
IVMRSurfaceAllocator::AllocateSurface (strmif.h)
The AllocateSurface method allocates a DirectDraw surface.
AllocateSurface
AllocateSurface method [DirectShow]
AllocateSurface method [DirectShow]
IVMRSurfaceAllocator interface
IVMRSurfaceAllocator interface [DirectShow]
AllocateSurface method
IVMRSurfaceAllocator.AllocateSurface
IVMRSurfaceAllocator::AllocateSurface
IVMRSurfaceAllocatorAllocateSurface
dshow.ivmrsurfaceallocator_allocatesurface
strmif/IVMRSurfaceAllocator::AllocateSurface
dshow\ivmrsurfaceallocator_allocatesurface.htm
dshow
6783df91-c92f-45d0-b299-16cdbc4bb630
4/26/2023
AllocateSurface, AllocateSurface method [DirectShow], AllocateSurface method [DirectShow],IVMRSurfaceAllocator interface, IVMRSurfaceAllocator interface [DirectShow],AllocateSurface method, IVMRSurfaceAllocator.AllocateSurface, IVMRSurfaceAllocator::AllocateSurface, IVMRSurfaceAllocatorAllocateSurface, dshow.ivmrsurfaceallocator_allocatesurface, strmif/IVMRSurfaceAllocator::AllocateSurface
strmif.h
Dshow.h
Windows
Windows XP with SP1 [desktop apps only]
Windows Server 2003 [desktop apps only]
Strmiids.lib
Windows
19H1
IVMRSurfaceAllocator::AllocateSurface
strmif/IVMRSurfaceAllocator::AllocateSurface
c++
APIRef
kbSyntax
COM
Strmiids.lib
Strmiids.dll
IVMRSurfaceAllocator.AllocateSurface

IVMRSurfaceAllocator::AllocateSurface

-description

[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 AllocateSurface method allocates a DirectDraw surface.

-parameters

-param dwUserID [in]

An application-defined DWORD_PTR cookie that uniquely identifies this instance of the VMR for use in scenarios when one instance of the allocator-presenter is used with multiple VMR instances.

-param lpAllocInfo [in]

Specifies the VMRALLOCATIONINFO structure. See Remarks.

-param lpdwActualBuffers [in]

[out] On input this parameter is used to request the number of buffers desired. On output it receives the actual number of buffers created.

-param lplpSurface [out]

Address of a pointer that receives the Direct3D surface.

-returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Return code Description
E_POINTER
One of the pointers is invalid.
E_INVALIDARG
In dwFlags, the AMAP_3D_TARGET was combined with AMAP_FORCE_SYSMEM or AMAP_ALLOW_SYSMEM.
E_FAIL
One or more members of the BITMAPINFOHEADER structure specified by lpAllocInfo->lpHdr is incorrect.

-remarks

Before calling AllocateSurface explicitly, a client application should call IVMRSurfaceAllocator::FreeSurface to be sure that the DirectDraw decoding surface front buffer is NULL. If it is not NULL at the time an application calls AllocateSurface, the debug version of quartz.dll will cause an assertion.

When implementing this method in a custom allocator-presenter, you must examine the value of lpAllocInfo->lpHdr->biBitCount. If biBitCount is zero, then you must set it to the pixel depth for the current display. If BiBitCount is left at zero, the surface allocation will fail and a new (default) VMR will be created.

-see-also

Error and Success Codes

IVMRSurfaceAllocator Interface

Using the Video Mixing Renderer