다음을 통해 공유


IVMRImagePresenter9::PresentImage 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 PresentImage method is called at precisely the moment this video frame should be presented.

Syntax

HRESULT PresentImage(
  [in] DWORD_PTR            dwUserID,
  [in] VMR9PresentationInfo *lpPresInfo
);

Parameters

[in] dwUserID

An application-defined DWORD_PTR that uniquely identifies this instance of the VMR in scenarios when multiple instances of the VMR are being used with a single instance of an allocator-presenter. See Remarks.

[in] lpPresInfo

Specifies a VMR9PresentationInfo structure that contains information about the video frame.

Return value

The method returns an HRESULT. Possible values include those in the following table.

Return code Description
S_OK
The method succeeded.

Remarks

PresentImage can be called when the filter is in either a running or a paused state. StartPresenting and StopPresenting can be called only in a running state. Therefore, if the graph is paused before it is run, PresentImage will be called before StartPresenting.

Applications can create custom blending effects by using a single instance of an allocator-presenter with multiple instances of the VMR either in a single filter graph or in multiple filter graphs. Using the allocator presenter in this way enables applications to blend streams from different filter graphs, or blend different streams within the same filter graph. If you are using a single instance of the VMR, set this value to zero.

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
Library Strmiids.lib

See also

IVMRImagePresenter9 Interface

Using the Video Mixing Renderer