SessionConfigurationInterop


interface SessionConfigurationInterop

Known direct subclasses

Configures Camera2 android.hardware.camera2.params.SessionConfiguration options.

Summary

Public functions

Unit
@RequiresApi(value = 28)
<V : Any?> setSessionParameter(key: CaptureRequest.Key<V>, value: V)

Sets a session parameter used during session creation.

Unit

Sets the callback to receive session state updates with an executor.

Public properties

ColorSpace.Named?

The session color space.

open SessionParameterTarget

Helper target property supporting sessionParameter[key] = value indexing operator syntax.

CameraCaptureSession.StateCallback?

The callback to receive session state updates on a direct executor.

Int

The operating mode session type.

Public functions

setSessionParameter

Added in 1.7.0-rc01
@RequiresApi(value = 28)
fun <V : Any?> setSessionParameter(key: CaptureRequest.Key<V>, value: V): Unit

Sets a session parameter used during session creation.

Parameters
key: CaptureRequest.Key<V>

session parameter key

value: V

parameter value

setSessionStateCallback

Added in 1.7.0-rc01
fun setSessionStateCallback(
    executor: Executor,
    callback: CameraCaptureSession.StateCallback
): Unit

Sets the callback to receive session state updates with an executor.

Warning: The callback receives raw android.hardware.camera2.CameraCaptureSession instances. Directly invoking state-altering, lifecycle, or request-submitting methods on these raw objects bypasses CameraX pipeline management and causes state desynchronization, stream freezing, or crashes. Do not invoke:

Parameters
executor: Executor

executor to run the callback on

callback: CameraCaptureSession.StateCallback

session state callback

Public properties

colorSpace

Added in 1.7.0-rc01
var colorSpace: ColorSpace.Named?

The session color space.

sessionParameter

Added in 1.7.0-rc01
open val sessionParameter: SessionParameterTarget

Helper target property supporting sessionParameter[key] = value indexing operator syntax.

sessionType

Added in 1.7.0-rc01
var sessionType: Int

The operating mode session type.