CameraCaptureSession.StateCallback.OnCaptureQueueEmpty Method

Definition

This method is called when camera device's input capture queue becomes empty, and is ready to accept the next request.

[Android.Runtime.Register("onCaptureQueueEmpty", "(Landroid/hardware/camera2/CameraCaptureSession;)V", "GetOnCaptureQueueEmpty_Landroid_hardware_camera2_CameraCaptureSession_Handler", ApiSince=26)]
public virtual void OnCaptureQueueEmpty (Android.Hardware.Camera2.CameraCaptureSession session);
[<Android.Runtime.Register("onCaptureQueueEmpty", "(Landroid/hardware/camera2/CameraCaptureSession;)V", "GetOnCaptureQueueEmpty_Landroid_hardware_camera2_CameraCaptureSession_Handler", ApiSince=26)>]
abstract member OnCaptureQueueEmpty : Android.Hardware.Camera2.CameraCaptureSession -> unit
override this.OnCaptureQueueEmpty : Android.Hardware.Camera2.CameraCaptureSession -> unit

Parameters

session
CameraCaptureSession

The session returned by #onConfigured

Attributes

Remarks

This method is called when camera device's input capture queue becomes empty, and is ready to accept the next request.

Pending capture requests exist in one of two queues: the in-flight queue where requests are already in different stages of processing pipeline, and an input queue where requests wait to enter the in-flight queue. The input queue is needed because more requests may be submitted than the current camera device pipeline depth.

This callback is fired when the input queue becomes empty, and the camera device may have to fall back to the repeating request if set, or completely skip the next frame from the sensor. This can cause glitches to camera preview output, for example. This callback will only fire after requests queued by capture() or captureBurst(), not after a repeating request or burst enters the in-flight queue. For example, in the common case of a repeating request and a single-shot JPEG capture, this callback only fires when the JPEG request has entered the in-flight queue for capture.

By only sending a new #capture or #captureBurst when the input queue is empty, pipeline latency can be minimized.

This callback is not fired when the session is first created. It is different from #onReady, which is fired when all requests in both queues have been processed.

Java documentation for android.hardware.camera2.CameraCaptureSession.StateCallback.onCaptureQueueEmpty(android.hardware.camera2.CameraCaptureSession).

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