共用方式為


CameraCaptureSession.CaptureCallback.OnCaptureBufferLost Method

Definition

This method is called if a single buffer for a capture could not be sent to its destination surface.

[Android.Runtime.Register("onCaptureBufferLost", "(Landroid/hardware/camera2/CameraCaptureSession;Landroid/hardware/camera2/CaptureRequest;Landroid/view/Surface;J)V", "GetOnCaptureBufferLost_Landroid_hardware_camera2_CameraCaptureSession_Landroid_hardware_camera2_CaptureRequest_Landroid_view_Surface_JHandler", ApiSince=24)]
public virtual void OnCaptureBufferLost (Android.Hardware.Camera2.CameraCaptureSession session, Android.Hardware.Camera2.CaptureRequest request, Android.Views.Surface target, long frameNumber);
[<Android.Runtime.Register("onCaptureBufferLost", "(Landroid/hardware/camera2/CameraCaptureSession;Landroid/hardware/camera2/CaptureRequest;Landroid/view/Surface;J)V", "GetOnCaptureBufferLost_Landroid_hardware_camera2_CameraCaptureSession_Landroid_hardware_camera2_CaptureRequest_Landroid_view_Surface_JHandler", ApiSince=24)>]
abstract member OnCaptureBufferLost : Android.Hardware.Camera2.CameraCaptureSession * Android.Hardware.Camera2.CaptureRequest * Android.Views.Surface * int64 -> unit
override this.OnCaptureBufferLost : Android.Hardware.Camera2.CameraCaptureSession * Android.Hardware.Camera2.CaptureRequest * Android.Views.Surface * int64 -> unit

Parameters

session
CameraCaptureSession

The session returned by CameraDevice#createCaptureSession

request
CaptureRequest

The request that was given to the CameraDevice

target
Surface

The target Surface that the buffer will not be produced for

frameNumber
Int64

The frame number for the request

Attributes

Remarks

This method is called if a single buffer for a capture could not be sent to its destination surface.

If the whole capture failed, then #onCaptureFailed will be called instead. If some but not all buffers were captured but the result metadata will not be available, then onCaptureFailed will be invoked with CaptureFailure#wasImageCaptured returning true, along with one or more calls to #onCaptureBufferLost for the failed outputs.

Java documentation for android.hardware.camera2.CameraCaptureSession.CaptureCallback.onCaptureBufferLost(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.view.Surface, long).

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