CameraControlCamera2Interop


@CameraXDsl
public interface CameraControlCamera2Interop extends 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 methods on these raw objects (such as android.hardware.camera2.CameraCaptureSession.close or android.hardware.camera2.CameraCaptureSession.abortCaptures) 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 CameraControlCamera2Interop

Clears all CaptureRequest.Keys previously set on this target.

abstract @NonNull CameraControlCamera2Interop

Clears a CaptureRequest.Key previously set on this target.

abstract @NonNull CameraControlCamera2Interop
<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 CameraControlCamera2Interop

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

abstract @NonNull CameraControlCamera2Interop

Sets the callback to receive repeating capture updates.

abstract @NonNull CameraControlCamera2Interop

Sets the repeating capture request template type.