IMFCameraOcclusionStateMonitor interface (mfidl.h)
Monitors the occlusion state of a camera device.
Inheritance
The IMFCameraOcclusionStateMonitor interface inherits from the IUnknown interface.
Methods
The IMFCameraOcclusionStateMonitor interface has these methods.
IMFCameraOcclusionStateMonitor::GetSupportedStates Gets the occlusion states supported by the current device. |
IMFCameraOcclusionStateMonitor::Start Starts the camera occlusion state monitor. |
IMFCameraOcclusionStateMonitor::Stop Stops the camera occlusion state monitor. |
Remarks
Many devices provide mechanisms, such as a mechanical shutter, that allow the user to occlude the camera device for privacy. Other devices may occlude the camera in certain postures. This interface allows applications to receive notifications when the occlusion state of the camera changes so they can disable or modify their camera capture behavior when the camera is occluded. Note that some devices may have a mechanical camera shutter without a mechanism for sensing or reporting the state of the shutter, and therefore the camera occlusion APIs are unable to provide occlusion information on these devices. Also, some devices may not have a dedicated camera shutter but will still update the occlusion status of the camera based on whether the device lid is open or closed.
Create an instance of this interface by calling MFCreateCameraOcclusionStateMonitor, passing in an implementation of IMFCameraOcclusionStateReportCallback. After the monitor is started, the IMFCameraOcclusionStateReportCallback::OnOcclusionStateReport callback is passed an instance of IMFCameraOcclusionStateReport on which you can call GetOcclusionState to get the new camera occlusion state.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Build 22000 |
Minimum supported server | Windows Build 22000 |
Header | mfidl.h |
See also
MFCreateCameraOcclusionStateMonitor IMFCameraOcclusionStateReportCallback IMFCameraOcclusionStateReport