CameraController

Encapsulates device controller and session controller.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val isAvailableFlow: StateFlow<Boolean>

Functions

Link copied to clipboard
suspend fun addOutput(output: Surface)

Adds an output to the current capture session.

Link copied to clipboard
suspend fun addTarget(output: Surface): Boolean

Adds a target to the current capture session.

Link copied to clipboard
suspend fun addTargets(targets: List<Surface>): Boolean

Adds targets to the current capture session.

Link copied to clipboard
suspend fun createSessionController(outputs: List<Surface>, dynamicRange: Long)

Creates a new capture session with the given outputs.

Link copied to clipboard

Gets a setting from the current capture request.

Link copied to clipboard
Link copied to clipboard
fun release()
Link copied to clipboard
suspend fun removeOutput(output: Surface)

Removes an output from the current capture session.

Link copied to clipboard
suspend fun removeTarget(output: Surface): Unit?

Removes a target from the current capture session.

Link copied to clipboard
suspend fun replaceOutput(previousOutput: Surface, newOutput: Surface)

Replaces an output in the current capture session.

Link copied to clipboard
fun setBurstSession(cameraCaptureCallback: CameraCaptureSession.CaptureCallback = captureCallback)
Link copied to clipboard
suspend fun setDynamicRange(dynamicRange: Long): CameraSessionController?

Sets the dynamic range of the camera.

Link copied to clipboard
fun setRepeatingSession(cameraCaptureCallback: CameraCaptureSession.CaptureCallback = captureCallback)

Sets a repeating session with the current capture request.

Link copied to clipboard
fun <T> setSetting(key: CaptureRequest.Key<T>, value: T)

Sets a setting to the current capture request.

Link copied to clipboard