Microsoft DirectX 8.1 (C++) |
This topic applies to Windows XP Home Edition and Windows XP Professional only.
The Capture method captures the video frame that is currently being rendered by the Video Mixing Renderer (VMR).
Syntax
HRESULT Capture(
IPictureDisp** ppcurrentImage
);
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);
// Capture the image.
CComPtr<IPictureDisp> pPic;
hr = pVideo->Capture(&pPic);
See Also