共用方式為


IVMRSurfaceAllocator9 interface (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 IVMRSurfaceAllocator9 interface is implemented by the default allocator-presenter for the Video Mixing Renderer Filter 9 (VMR-9). It must also be implemented by any plug-in allocator-presenter object that an application provides to the VMR-9. The VMR-9 uses the methods on this interface to allocate, prepare and free Direct3D surfaces. Applications do not use this interface.

Inheritance

The IVMRSurfaceAllocator9 interface inherits from the IUnknown interface. IVMRSurfaceAllocator9 also has these types of members:

Methods

The IVMRSurfaceAllocator9 interface has these methods.

 
IVMRSurfaceAllocator9::AdviseNotify

The AdviseNotify method provides the allocator-presenter with the VMR-9 filter's interface for notification callbacks.
IVMRSurfaceAllocator9::GetSurface

The GetSurface method gets a Direct3D surface from the allocator-presenter.
IVMRSurfaceAllocator9::InitializeDevice

The InitializeDevice method is called by the Video Mixing Renderer 9 (VMR-9) when it needs the allocator-presenter to allocate surfaces.
IVMRSurfaceAllocator9::TerminateDevice

The TerminateDevice method releases the Direct3D device.

Remarks

Include DShow.h and D3d9.h before Vmr9.h.

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

See also

Supplying a Custom Allocator-Presenter for VMR-9

Using the Video Mixing Renderer