CameraControlCamera2Interop


@CameraXDsl
abstract class CameraControlCamera2Interop : CameraCaptureSessionInterop


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

Provides setters for dynamic capture request key-value pairs, clearing request keys, template types, and repeating capture callbacks on active camera sessions.

Warning: Callbacks configured on this target (such as android.hardware.camera2.CameraCaptureSession.CaptureCallback) receive 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:

Summary

Inherited functions

From androidx.camera.camera2.interop.CameraCaptureSessionInterop
abstract Unit

Clears all CaptureRequest.Keys previously set on this target.

abstract Unit

Clears a CaptureRequest.Key previously set on this target.

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

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

abstract Unit

Sets the callback to receive repeating capture updates with an executor.

Inherited properties

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

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

abstract CameraCaptureSession.CaptureCallback?

The callback to receive repeating capture updates on a direct executor.

abstract Int

The repeating capture request template type (e.g., android.hardware.camera2.CameraDevice.TEMPLATE_PREVIEW).