IMFVirtualCamera::CreateSyncSemaphore method (mfvirtualcamera.h)
A wrapper around the IKsControl::KsEvent method, which enables or disables an semaphore.
HRESULT CreateSyncSemaphore( REFGUID kseventSet, ULONG kseventId, ULONG kseventFlags, HANDLE semaphoreHandle, LONG semaphoreAdjustment, IMFCameraSyncObject **cameraSyncObject );
A GUID representing the KSEVENT.Set field.
A ULONG representing the KSEVENT.Id field.
A set of bit-wise or-ed flags representing the KSEVENT.Flags field.
A handle representing the KSEVENTDATA.SemaphoreHandle.Semaphore field.
An adjustment value representing the KSEVENTDATA.SemaphoreHandle.Adjustment field.
An output parameter that receives an IMFSyncObject interface. The caller is responsible for releasing this object.
Returns an HRESULT value, including but not limited to the following values:
This method allows the caller to create a semaphore 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.
|Minimum supported client||Windows Build 22000|