pub enum CaptureError {
AccessDenied,
AccessLost,
RefreshFailure,
Timeout,
Fail(Error),
}Expand description
Errors that can occur during screen capture operations.
Variants§
AccessDenied
Access to the output duplication was denied.
This typically occurs when attempting to capture protected content, such as fullscreen video with DRM protection.
Recovery: Check if protected content is being displayed.
AccessLost
Access to the duplicated output was lost.
This occurs when the display configuration changes, such as:
- Switching between windowed and fullscreen mode
- Changing display resolution
- Connecting/disconnecting monitors
- Graphics driver updates
Recovery: Recreate the DXGIManager instance.
RefreshFailure
Failed to refresh the output duplication after a previous error.
Recovery: Recreate the DXGIManager instance or wait before retrying.
Timeout
The capture operation timed out.
This is a normal occurrence indicating that no new frame was available within the specified timeout period.
Recovery: This is not an error condition. Simply retry the capture.
Fail(Error)
A general or unexpected failure occurred.
Recovery: Log the error message and consider recreating the DXGIManager.