ImageCaptureCamera2Interop


@CameraXDsl
abstract class ImageCaptureCamera2Interop : OutputConfigurationInterop, StillCaptureInterop


Configures Camera2 options on an androidx.camera.core.ImageCapture use case.

Provides setters for output stream options and still capture request settings (such as still capture request keys, template types, and capture callbacks). The capture request keys for one-shot still captures (such as androidx.camera.core.ImageCapture.takePicture) are determined by copying all repeating request keys (which may include keys added via androidx.camera.core.SessionConfig.Builder.setInterop or androidx.camera.core.CameraControl.applyInteropAsync) and then overriding them with the still capture request keys configured here.

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.OutputConfigurationInterop
abstract Unit
@RequiresApi(value = 31)
addSensorPixelModeUsed(sensorPixelMode: Int)

Adds a sensor pixel mode that this output configuration will be used in.

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

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

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

Sets a CaptureRequest.Key and value for still capture requests.

Inherited properties

From androidx.camera.camera2.interop.OutputConfigurationInterop
abstract Long

The dynamic range profile.

abstract Int

The mirror mode.

abstract String?

The physical camera ID.

abstract Set<Int>

The sensor pixel modes that this output configuration will be used in.

abstract Long

The stream use case.

abstract Int

The surface group ID.

abstract Int

The timestamp base.

From androidx.camera.camera2.interop.StillCaptureInterop
abstract CameraCaptureSession.CaptureCallback?

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

open StillCaptureRequestOptionTarget

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

abstract Int

The template type for still capture requests.