IMFCaptureEngineOnEventCallback::OnEvent method

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

Syntax


HRESULT OnEvent(
  [in]  IMFMediaEvent *pEvent
);

Parameters

pEvent [in]

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.

GUIDDescription
MF_CAPTURE_ENGINE_ALL_EFFECTS_REMOVEDThe IMFCaptureSource::RemoveAllEffects method completed.
MF_CAPTURE_ENGINE_EFFECT_ADDEDThe IMFCaptureSource::AddEffect method completed.
MF_CAPTURE_ENGINE_EFFECT_REMOVEDThe IMFCaptureSource::RemoveEffect method completed.
MF_CAPTURE_ENGINE_ERRORAn error occurred during capture.
MF_CAPTURE_ENGINE_INITIALIZEDThe IMFCaptureEngine::Initialize method completed.
MF_CAPTURE_ENGINE_PHOTO_TAKENThe IMFCaptureEngine::TakePhoto method completed.
MF_CAPTURE_ENGINE_PREVIEW_STARTEDThe IMFCaptureEngine::StartPreview method completed.
MF_CAPTURE_ENGINE_PREVIEW_STOPPEDThe IMFCaptureEngine::StopPreview method completed.
MF_CAPTURE_ENGINE_RECORD_STARTEDThe IMFCaptureEngine::StartRecord method completed.
MF_CAPTURE_ENGINE_RECORD_STOPPEDThe IMFCaptureEngine::StopRecord method completed.
MF_CAPTURE_SINK_PREPAREDThe IMFCaptureSink::Prepare method completed.
MF_CAPTURE_SOURCE_CURRENT_DEVICE_MEDIA_TYPE_SETThe 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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Mfcaptureengine.h

See also

IMFCaptureEngineOnEventCallback

 

 

Community Additions

ADD
Show:
© 2014 Microsoft