Added in API level 23

CameraConstrainedHighSpeedCaptureSession


abstract class CameraConstrainedHighSpeedCaptureSession : CameraCaptureSession
kotlin.Any
   ↳ android.hardware.camera2.CameraCaptureSession
   ↳ android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession

A constrained high speed capture session for a CameraDevice, used for capturing high speed images from the CameraDevice for high speed video recording use case.

A CameraConstrainedHighSpeedCaptureSession is created by providing a session configuration to android.hardware.camera2.CameraDevice#createCaptureSession(SessionConfiguration) with a type of android.hardware.camera2.params.SessionConfiguration#SESSION_HIGH_SPEED. The CameraCaptureSession returned from CameraCaptureSession.StateCallback can then be cast to a CameraConstrainedHighSpeedCaptureSession. Once created, the session is active until a new session is created by the camera device, or the camera device is closed.

An active high speed capture session is a specialized capture session that is only targeted at high speed video recording (>=120fps) use case if the camera device supports high speed video capability (i.e., CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES contains CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO). It only accepts request lists created via createHighSpeedRequestList, and the request list can only be submitted to this session via captureBurst, or setRepeatingBurst. See CameraDevice.createCaptureSession(android.hardware.camera2.params.SessionConfiguration) for more details of the limitations.

Creating a session is an expensive operation and can take several hundred milliseconds, since it requires configuring the camera device's internal pipelines and allocating memory buffers for sending images to the desired targets. Therefore the setup is done asynchronously, and CameraDevice.createConstrainedHighSpeedCaptureSession will send the ready-to-use CameraCaptureSession to the provided listener's CameraCaptureSession.StateCallback.onConfigured callback. If configuration cannot be completed, then the CameraCaptureSession.StateCallback.onConfigureFailed is called, and the session will not become active.

If a new session is created by the camera device, then the previous session is closed, and its associated onClosed callback will be invoked. All of the session methods will throw an IllegalStateException if called once the session is closed.

A closed session clears any repeating requests (as if stopRepeating had been called), but will still complete all of its in-progress capture requests as normal, before a newly created session takes over and reconfigures the camera device.

Summary

Public constructors

Public methods
abstract MutableList<CaptureRequest!>

Create a unmodifiable list of requests that is suitable for constrained high speed capture session streaming.

Inherited functions