共用方式為


IVMRSurfaceAllocatorEx9 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 IVMRSurfaceAllocatorEx9 interface provides a way for custom allocator-presenters to control where the Video Mixing Renderer Filter 9 (VMR-9) draws the composited image.

To use this interface, implement it on your allocator-presenter. At the start of each frame, the VMR-9 calls QueryInterface on the allocator-presenter for the IVMRSurfaceAllocatorEx9 interface. If the allocator-presenter returns the interface, the VMR-9 calls the IVMRSurfaceAllocatorEx9::GetSurfaceEx method instead of the usual IVMRSurfaceAllocator9::GetSurface method. This enables your allocator-presenter to specify the rectangle within the returned IDirect3DSurface9 where the composed video image will be written. This feature enables all of the video image scaling operations to be performed in a single stage, and is available in both RGB and YUV mixing modes.

Inheritance

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

Methods

The IVMRSurfaceAllocatorEx9 interface has these methods.

 
IVMRSurfaceAllocatorEx9::GetSurfaceEx

The GetSurfaceEx method retrieves a Direct3D surface and a destination rectangle.

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

IVMRSurfaceAllocator9

Using the Video Mixing Renderer