ImageCaptureCamera2Interop


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

From androidx.camera.camera2.interop.OutputConfigurationInterop
abstract void
@RequiresApi(value = 31)
addSensorPixelModeUsed(int sensorPixelMode)

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

abstract long

The dynamic range profile.

abstract int
@RequiresApi(value = 33)
getMirrorMode()

The mirror mode.

abstract String

The physical camera ID.

abstract @NonNull Set<@NonNull Integer>

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.

abstract void
@RequiresApi(value = 33)
setDynamicRangeProfile(long value)

The dynamic range profile.

abstract void
@RequiresApi(value = 33)
setMirrorMode(int value)

The mirror mode.

abstract void
@RequiresApi(value = 28)
setPhysicalCameraId(String value)

The physical camera ID.

abstract void

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

abstract void
@RequiresApi(value = 33)
setStreamUseCase(long value)

The stream use case.

abstract void
setSurfaceGroupId(int value)

The surface group ID.

abstract void
@RequiresApi(value = 33)
setTimestampBase(int value)

The timestamp base.

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

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

@NonNull StillCaptureRequestOptionTarget

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

abstract int

The template type for still capture requests.

abstract void

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

abstract void

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

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

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

abstract void

The template type for still capture requests.