IMFCaptureEngine::TakePhoto method (mfcaptureengine.h)
Captures a still image from the video stream.
Syntax
HRESULT TakePhoto();
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Before calling this method, configure the photo sink by calling IMFCaptureSink::AddStream. To get a pointer to the photo sink, call IMFCaptureEngine::GetSink.
This method is asynchronous. If the method returns a success code, the caller will receive an MF_CAPTURE_ENGINE_PHOTO_TAKEN event through the IMFCaptureEngineOnEventCallback::OnEvent method. The operation can fail asynchronously after the method succeeds. If so, the error code is conveyed through the OnEvent method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | mfcaptureengine.h |