IMFCaptureEngine::TakePhoto method

Captures a still image from the video stream.

Syntax


HRESULT TakePhoto();

Parameters

This method has no parameters.

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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Mfcaptureengine.h

See also

IMFCaptureEngine

 

 

Show: