IMFCaptureEngine::StartPreview method

Starts preview.

Syntax


HRESULT StartPreview();

Parameters

This method has no parameters.

Return value

This method can return one of these values.

Return codeDescription
S_OK

Success.

MF_E_INVALIDREQUEST

The preview sink was not initialized.

 

Remarks

Before calling this method, configure the preview sink by calling IMFCaptureSink::AddStream. To get a pointer to the preview sink, call IMFCaptureEngine::GetSink.

This method is asynchronous. If the method returns a success code, the caller will receive an MF_CAPTURE_ENGINE_PREVIEW_STARTED 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.

After the preview sink is configured, you can stop and start preview by calling IMFCaptureEngine::StopPreview and IMFCaptureEngine::StartPreview.

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: