SessionConfigurationInterop


interface SessionConfigurationInterop<T : SessionConfigurationInterop<T>>

Known direct subclasses

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

Summary

Public functions

T
@RequiresApi(value = 34)
setColorSpace(colorSpace: Int)

Sets the session color space.

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

Sets a session parameter used during session creation.

open T

Sets the callback to receive session state updates on a direct executor.

T

Sets the callback to receive session state updates.

T
@RequiresApi(value = 28)
setSessionType(sessionType: Int)

Sets the operating mode session type.

Public properties

open Int

Sets the session color space.

open SessionParameterTarget

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

open CameraCaptureSession.StateCallback

Sets the callback to receive session state updates on a direct executor.

open Int

Sets the operating mode session type.

Public functions

setColorSpace

Added in 1.7.0-alpha03
@RequiresApi(value = 34)
fun setColorSpace(colorSpace: Int): T

Sets the session color space.

Parameters
colorSpace: Int

color space

Returns
T

this SessionConfigurationInterop instance

setSessionParameter

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

Sets a session parameter used during session creation.

Parameters
key: CaptureRequest.Key<V>

session parameter key

value: V

parameter value

Returns
T

this SessionConfigurationInterop instance

setSessionStateCallback

Added in 1.7.0-alpha03
open fun setSessionStateCallback(callback: CameraCaptureSession.StateCallback): T

Sets the callback to receive session state updates on a direct executor.

Warning: The callback receives raw android.hardware.camera2.CameraCaptureSession instances. Calling state-altering methods on the session (such as android.hardware.camera2.CameraCaptureSession.close or android.hardware.camera2.CameraCaptureSession.abortCaptures) bypasses CameraX pipeline management and may cause state desynchronization or application crashes.

Parameters
callback: CameraCaptureSession.StateCallback

session state callback

Returns
T

this SessionConfigurationInterop instance

setSessionStateCallback

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

Sets the callback to receive session state updates.

Warning: The callback receives raw android.hardware.camera2.CameraCaptureSession instances. Calling state-altering methods on the session (such as android.hardware.camera2.CameraCaptureSession.close or android.hardware.camera2.CameraCaptureSession.abortCaptures) bypasses CameraX pipeline management and may cause state desynchronization or application crashes.

Parameters
executor: Executor

executor to run the callback on

callback: CameraCaptureSession.StateCallback

session state callback

Returns
T

this SessionConfigurationInterop instance

setSessionType

Added in 1.7.0-alpha03
@RequiresApi(value = 28)
fun setSessionType(sessionType: Int): T

Sets the operating mode session type.

Parameters
sessionType: Int

session type

Returns
T

this SessionConfigurationInterop instance

Public properties

colorSpace

Added in 1.7.0-alpha03
Deprecated in 1.7.0-alpha03
open var colorSpaceInt

Sets the session color space.

See also
setColorSpace

sessionParameter

Added in 1.7.0-alpha03
open val sessionParameterSessionParameterTarget

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

sessionStateCallback

Added in 1.7.0-alpha03
Deprecated in 1.7.0-alpha03
open var sessionStateCallbackCameraCaptureSession.StateCallback

Sets the callback to receive session state updates on a direct executor.

sessionType

Added in 1.7.0-alpha03
Deprecated in 1.7.0-alpha03
open var sessionTypeInt

Sets the operating mode session type.

See also
setSessionType