ImageCaptureCamera2Interop


@CameraXDsl
public interface ImageCaptureCamera2Interop extends 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 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.OutputConfigurationInterop
abstract @NonNull ImageCaptureCamera2Interop
@RequiresApi(value = 33)
setDynamicRangeProfile(long dynamicRangeProfile)

Sets the dynamic range profile.

abstract @NonNull ImageCaptureCamera2Interop
@RequiresApi(value = 33)
setMirrorMode(int mirrorMode)

Sets the mirror mode.

abstract @NonNull ImageCaptureCamera2Interop
@RequiresApi(value = 28)
setPhysicalCameraId(@NonNull String cameraId)

Sets the physical camera ID.

abstract @NonNull ImageCaptureCamera2Interop
@RequiresApi(value = 33)
setStreamUseCase(long streamUseCase)

Sets the stream use case.

abstract @NonNull ImageCaptureCamera2Interop
@RequiresApi(value = 24)
setSurfaceGroupId(int groupId)

Sets the surface group ID.

abstract @NonNull ImageCaptureCamera2Interop
@RequiresApi(value = 33)
setTimestampBase(int timestampBase)

Sets the timestamp base.

From androidx.camera.camera2.interop.StillCaptureInterop
default @NonNull ImageCaptureCamera2Interop

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

abstract @NonNull ImageCaptureCamera2Interop

Sets the callback to receive still capture updates.

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

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

abstract @NonNull ImageCaptureCamera2Interop

Sets the template type for still capture requests.