IMFVirtualCamera::CreateSyncEvent method (mfvirtualcamera.h)
A wrapper around the IKsControl::KsEvent method, which enables or disables an event.
Syntax
HRESULT CreateSyncEvent(
REFGUID kseventSet,
ULONG kseventId,
ULONG kseventFlags,
HANDLE eventHandle,
IMFCameraSyncObject **cameraSyncObject
);
Parameters
kseventSet
A GUID representing the KSEVENT.Set field.
kseventId
A ULONG representing the KSEVENT.Id field.
kseventFlags
A set of bit-wise or-ed flags representing the KSEVENT.Flags field.
eventHandle
A Handle representing the KSEVENTDATA.EventHandle.Event field.
cameraSyncObject
An output parameter that receives an IMFSyncObject interface. The caller is responsible for releasing this object.
Return value
Returns an HRESULT value, including but not limited to the following values:
Error code | Description |
---|---|
S_OK | Succeeded |
Remarks
This method allows the caller to create a event object between the caller and the virtual camera for synchronization. The virtual camera implementation will receive a call to IKsControl::KsEvent when this API is called. The resulting IMFCameraSyncObject can be used to block on the event from the virtual camera.
When the IMFCameraSyncObject is obtained, the caller may choose to use the IMFCameraSyncObject::WaitOnSignal method or call WaitForSingleObject or WaitForMultipleObjects on the HANDLE that was provided to the CreateSyncObject method. The caller must not wait on both, as the signal on the event may only be set once by the driver.
The caller must call IMFCameraSyncObject::Shutdown when the synchronization object is no longer needed regardless of whether the wait operation succeeded or not.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Build 22000 |
Header | mfvirtualcamera.h |
Library | mfsensorgroup.lib |
DLL | mfsensorgroup.dll |