IVMRImageCompositor::CompositeImage method (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 CompositeImage method composites the current frames available in each input stream.

Syntax

HRESULT CompositeImage(
  [in] IUnknown             *pD3DDevice,
  [in] LPDIRECTDRAWSURFACE7 pddsRenderTarget,
  [in] AM_MEDIA_TYPE        *pmtRenderTarget,
  [in] REFERENCE_TIME       rtStart,
  [in] REFERENCE_TIME       rtEnd,
  [in] DWORD                dwClrBkGnd,
  [in] VMRVIDEOSTREAMINFO   *pVideoStreamInfo,
  [in] UINT                 cStreams
);

Parameters

[in] pD3DDevice

Pointer to the IUnknown interface of the Direct3D device. The compositor must cast this to a LPDIRECT3DDEVICE7 type.

[in] pddsRenderTarget

Specifies the DirectDraw surface that all drawing should be performed on.

[in] pmtRenderTarget

Specifies the media type of the DirectDraw surface.

[in] rtStart

Specifies the start time.

[in] rtEnd

Specifies the end time.

[in] dwClrBkGnd

Specifies the background color.

[in] pVideoStreamInfo

Pointer to an array of video stream info objects.

[in] cStreams

Specifies the number of streams to be mixed, which is equal to the size of the pVideoStreamInfo array.

Return value

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

Requirements

Requirement Value
Minimum supported client Windows XP with SP1 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IVMRImageCompositor Interface

Using the Video Mixing Renderer