IMFCaptureEngine::StopRecord method (mfcaptureengine.h)

Stops recording.

Syntax

HRESULT StopRecord(
  [in] BOOL bFinalize,
  [in] BOOL bFlushUnprocessedSamples
);

Parameters

[in] bFinalize

A Boolean value that specifies whether to finalize the output file. To create a valid output file, specify TRUE. Specify FALSE only if you want to interrupt the recording and discard the output file. If the value is FALSE, the operation completes more quickly, but the file will not be playable.

[in] bFlushUnprocessedSamples

A Boolean value that specifies if the unprocessed samples waiting to be encoded should be flushed.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

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

See also

IMFCaptureEngine