IMSVidVideoRenderer::Capture Method

This topic applies to Windows XP or later.
The Capture method captures the video frame that is currently being rendered by the Video Mixing Renderer (VMR).

Syntax

HRESULT Capture(
  [out]  IPictureDisp **ppcurrentImage
);

Parameters

  • ppcurrentImage [out]
    Address of a variable that receives an IPictureDisp interface pointer.

Return Value

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

Remarks

The returned IPictureDisp interface has an outstanding reference count. The caller must release the interface.

For information about the IPictureDisp interface, see the Microsoft Platform SDK documentation.

Examples

CComPtr<IMSVidCtl> m_pVideoControl; // Pointer to the Video Control.

/* Build and run the filter graph (not shown). */

// Find the video renderer
CComPtr<IMSVidVideoRenderer> pVideo;
hr = m_pVideoControl->get_VideoRendererActive(&pVideo);
if (SUCCEEDED(hr))
{
    // Capture the image.
    CComPtr<IPictureDisp> pPic;
    hr = pVideo->Capture(&pPic);
}

Requirements

Header Declared in Dshow.h.
DLL Requires Quartz.dll.

See Also

IMSVidVideoRenderer Interface
Using the Video Mixing Renderer

Send comments about this topic to Microsoft

Build date: 12/4/2008