SessionConfigCamera2Interop


@CameraXDsl
interface SessionConfigCamera2Interop : CameraDeviceInterop, SessionConfigurationInterop, CameraCaptureSessionInterop


Configures Camera2 options on a androidx.camera.core.SessionConfig.

Provides setters for session parameters, operating mode session type, session color space, device and session state callbacks, capture request keys, and repeating capture callbacks.

Warning: Callbacks configured on this target receive raw android.hardware.camera2.CameraDevice and android.hardware.camera2.CameraCaptureSession instances. Directly invoking state-altering methods on these raw objects (such as android.hardware.camera2.CameraCaptureSession.close, android.hardware.camera2.CameraCaptureSession.abortCaptures, or android.hardware.camera2.CameraDevice.close) bypasses CameraX pipeline management and may cause state desynchronization, stream interruption, or application crashes.

Summary

Inherited functions

From androidx.camera.camera2.interop.CameraCaptureSessionInterop
SessionConfigCamera2Interop

Clears all CaptureRequest.Keys previously set on this target.

SessionConfigCamera2Interop

Clears a CaptureRequest.Key previously set on this target.

SessionConfigCamera2Interop
<V : Any?> setCaptureRequestOption(key: CaptureRequest.Key<V>, value: V)

Sets a CaptureRequest.Key and value on repeating and one-shot requests.

open SessionConfigCamera2Interop

Sets the callback to receive repeating capture updates on a direct executor.

SessionConfigCamera2Interop

Sets the callback to receive repeating capture updates.

SessionConfigCamera2Interop

Sets the repeating capture request template type.

From androidx.camera.camera2.interop.CameraDeviceInterop
open SessionConfigCamera2Interop

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

SessionConfigCamera2Interop
setDeviceStateCallback(
    executor: Executor,
    callback: CameraDevice.StateCallback
)

Sets the callback to receive camera device state updates.

From androidx.camera.camera2.interop.SessionConfigurationInterop
SessionConfigCamera2Interop
@RequiresApi(value = 34)
setColorSpace(colorSpace: Int)

Sets the session color space.

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

Sets a session parameter used during session creation.

open SessionConfigCamera2Interop

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

SessionConfigCamera2Interop

Sets the callback to receive session state updates.

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

Sets the operating mode session type.

Inherited properties

From androidx.camera.camera2.interop.CameraCaptureSessionInterop
open CaptureRequestOptionTarget

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

open CameraCaptureSession.CaptureCallback

Sets the callback to receive repeating capture updates on a direct executor.

open Int

Sets the repeating capture request template type.

From androidx.camera.camera2.interop.CameraDeviceInterop
open CameraDevice.StateCallback

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

From androidx.camera.camera2.interop.SessionConfigurationInterop
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.