SessionConfigCamera2Interop


@CameraXDsl
public interface SessionConfigCamera2Interop extends 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 methods

From androidx.camera.camera2.interop.CameraCaptureSessionInterop
abstract @NonNull SessionConfigCamera2Interop

Clears all CaptureRequest.Keys previously set on this target.

abstract @NonNull SessionConfigCamera2Interop

Clears a CaptureRequest.Key previously set on this target.

abstract @NonNull SessionConfigCamera2Interop
<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.

default @NonNull SessionConfigCamera2Interop

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

abstract @NonNull SessionConfigCamera2Interop

Sets the callback to receive repeating capture updates.

abstract @NonNull SessionConfigCamera2Interop

Sets the repeating capture request template type.

From androidx.camera.camera2.interop.CameraDeviceInterop
default @NonNull SessionConfigCamera2Interop

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

abstract @NonNull SessionConfigCamera2Interop

Sets the callback to receive camera device state updates.

From androidx.camera.camera2.interop.SessionConfigurationInterop
abstract @NonNull SessionConfigCamera2Interop
@RequiresApi(value = 34)
setColorSpace(int colorSpace)

Sets the session color space.

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

Sets a session parameter used during session creation.

default @NonNull SessionConfigCamera2Interop

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

abstract @NonNull SessionConfigCamera2Interop

Sets the callback to receive session state updates.

abstract @NonNull SessionConfigCamera2Interop
@RequiresApi(value = 28)
setSessionType(int sessionType)

Sets the operating mode session type.