Aracılığıyla paylaş


CameraCaptureSession.CaptureCallback.OnCaptureFailed Method

Definition

This method is called instead of #onCaptureCompleted when the camera device failed to produce a CaptureResult for the request.

[Android.Runtime.Register("onCaptureFailed", "(Landroid/hardware/camera2/CameraCaptureSession;Landroid/hardware/camera2/CaptureRequest;Landroid/hardware/camera2/CaptureFailure;)V", "GetOnCaptureFailed_Landroid_hardware_camera2_CameraCaptureSession_Landroid_hardware_camera2_CaptureRequest_Landroid_hardware_camera2_CaptureFailure_Handler")]
public virtual void OnCaptureFailed (Android.Hardware.Camera2.CameraCaptureSession session, Android.Hardware.Camera2.CaptureRequest request, Android.Hardware.Camera2.CaptureFailure failure);
[<Android.Runtime.Register("onCaptureFailed", "(Landroid/hardware/camera2/CameraCaptureSession;Landroid/hardware/camera2/CaptureRequest;Landroid/hardware/camera2/CaptureFailure;)V", "GetOnCaptureFailed_Landroid_hardware_camera2_CameraCaptureSession_Landroid_hardware_camera2_CaptureRequest_Landroid_hardware_camera2_CaptureFailure_Handler")>]
abstract member OnCaptureFailed : Android.Hardware.Camera2.CameraCaptureSession * Android.Hardware.Camera2.CaptureRequest * Android.Hardware.Camera2.CaptureFailure -> unit
override this.OnCaptureFailed : Android.Hardware.Camera2.CameraCaptureSession * Android.Hardware.Camera2.CaptureRequest * Android.Hardware.Camera2.CaptureFailure -> unit

Parameters

session
CameraCaptureSession

The session returned by CameraDevice#createCaptureSession

request
CaptureRequest

The request that was given to the CameraDevice

failure
CaptureFailure

The output failure from the capture, including the failure reason and the frame number.

Attributes

Remarks

This method is called instead of #onCaptureCompleted when the camera device failed to produce a CaptureResult for the request.

Other requests are unaffected, and some or all image buffers from the capture may have been pushed to their respective output streams.

If a logical multi-camera fails to generate capture result for one of its physical cameras, this method will be called with a CaptureFailure for that physical camera. In such cases, as long as the logical camera capture result is valid, #onCaptureCompleted will still be called.

The default implementation of this method does nothing.

Java documentation for android.hardware.camera2.CameraCaptureSession.CaptureCallback.onCaptureFailed(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureFailure).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to