SessionConfigCamera2Interop


@CameraXDsl
public abstract class SessionConfigCamera2Interop implements 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, 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 methods

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

Clears all CaptureRequest.Keys previously set on this target.

abstract void

Clears a CaptureRequest.Key previously set on this target.

@NonNull 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).

abstract void
<V extends Object> setCaptureRequestOption(
    @NonNull CaptureRequest.Key<@NonNull V> key,
    @NonNull V value
)

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

abstract void

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

abstract void

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

abstract void

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

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

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

abstract void

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

abstract void

Sets the callback to receive camera device state updates with an executor.

From androidx.camera.camera2.interop.SessionConfigurationInterop
abstract ColorSpace.Named
@RequiresApi(value = 34)
getColorSpace()

The session color space.

@NonNull SessionParameterTarget

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

abstract CameraCaptureSession.StateCallback

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

abstract int
@RequiresApi(value = 28)
getSessionType()

The operating mode session type.

abstract void

The session color space.

abstract void
@RequiresApi(value = 28)
<V extends Object> setSessionParameter(
    @NonNull CaptureRequest.Key<@NonNull V> key,
    @NonNull V value
)

Sets a session parameter used during session creation.

abstract void

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

abstract void

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

abstract void
@RequiresApi(value = 28)
setSessionType(int value)

The operating mode session type.