IMSVidVideoRenderer::Capture
Microsoft DirectShow 9.0 |
IMSVidVideoRenderer::Capture
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( IPictureDisp** currentImage);
Parameters
ppcurrentImage
[out] Address of a variable that receives an IPictureDisp interface pointer.
Return Values
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.
Example Code
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: Dshow.h.
Library: Quartz.dll.
See Also