CameraSession
Represents a Camera Session.
A Camera Session has CameraSessionConnections to stream from an input device (CameraDevice) to outputs (CameraOutput). It is recommended to configure the session before starting it to avoid reconfiguration hiccups.
val session = VisionCamera.createCameraSession(enableMultiCam = false)
val (controller) = session.configure(
listOf(
CameraSessionConnection(
input = device,
outputs = listOf(
CameraOutputConfiguration(previewOutput),
CameraOutputConfiguration(photoOutput),
),
),
),
)
session.start()Properties
Whether this CameraSession is currently running.
Functions
Adds a listener called when the CameraSession encountered an error.
Adds a listener called when an interruption has ended and the Camera runs again.
Adds a listener called when the CameraSession was interrupted, for example when the phone overheated, or the user received a call.
Adds a listener called when the CameraSession started running.
Adds a listener called when the CameraSession stopped running.
Configures the CameraSession with the given connections, and returns one CameraController per CameraSessionConnection.
Starts the CameraSession.
Stops the CameraSession.