IMFCaptureEngineOnEventCallback::OnEvent method (mfcaptureengine.h)

Called by the capture engine to notify the application of a capture event.

Syntax

HRESULT OnEvent(
  [in] IMFMediaEvent *pEvent
);

Parameters

[in] pEvent

A pointer to the IMFMediaEvent interface. Use this interface to get information about the event, as described in Remarks.

Return value

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

Remarks

To get the type of event, call IMFMediaEvent::GetExtendedType. This method returns one of the following GUIDs.

GUID Description
MF_CAPTURE_ENGINE_ALL_EFFECTS_REMOVED The IMFCaptureSource::RemoveAllEffects method completed.
MF_CAPTURE_ENGINE_CAMERA_STREAM_BLOCKED Video capture has been blocked by the driver.
MF_CAPTURE_ENGINE_CAMERA_STREAM_UNBLOCKED Video capture has been restored by the driver after having been blocked.
MF_CAPTURE_ENGINE_EFFECT_ADDED The IMFCaptureSource::AddEffect method completed.
MF_CAPTURE_ENGINE_EFFECT_REMOVED The IMFCaptureSource::RemoveEffect method completed.
MF_CAPTURE_ENGINE_ERROR An error occurred during capture.
MF_CAPTURE_ENGINE_INITIALIZED The IMFCaptureEngine::Initialize method completed.
MF_CAPTURE_ENGINE_PHOTO_TAKEN The IMFCaptureEngine::TakePhoto method completed.
MF_CAPTURE_ENGINE_PREVIEW_STARTED The IMFCaptureEngine::StartPreview method completed.
MF_CAPTURE_ENGINE_PREVIEW_STOPPED The IMFCaptureEngine::StopPreview method completed.
MF_CAPTURE_ENGINE_RECORD_STARTED The IMFCaptureEngine::StartRecord method completed.
MF_CAPTURE_ENGINE_RECORD_STOPPED The IMFCaptureEngine::StopRecord method completed.
MF_CAPTURE_SINK_PREPARED The IMFCaptureSink::Prepare method completed.
MF_CAPTURE_SOURCE_CURRENT_DEVICE_MEDIA_TYPE_SET The IMFCaptureSource::SetCurrentDeviceMediaType method completed.
 

This method may be called from a worker thread. The implementation should be thread-safe.

To get the status code for the event, call IMFMediaEvent::GetStatus. If the status code is an error code, it indicates that the requested operation failed.

In addition, the event object specified by pEvent might contain any of the following attributes.

To get event attributes, use the IMFAttributes interface, which IMFMediaEvent inherits.

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

IMFCaptureEngineOnEventCallback