ImageCaptureCamera2Interop


@CameraXDsl
interface 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 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 functions

From androidx.camera.camera2.interop.OutputConfigurationInterop
ImageCaptureCamera2Interop
@RequiresApi(value = 33)
setDynamicRangeProfile(dynamicRangeProfile: Long)

Sets the dynamic range profile.

ImageCaptureCamera2Interop
@RequiresApi(value = 33)
setMirrorMode(mirrorMode: Int)

Sets the mirror mode.

ImageCaptureCamera2Interop
@RequiresApi(value = 28)
setPhysicalCameraId(cameraId: String)

Sets the physical camera ID.

ImageCaptureCamera2Interop
@RequiresApi(value = 33)
setStreamUseCase(streamUseCase: Long)

Sets the stream use case.

ImageCaptureCamera2Interop
@RequiresApi(value = 24)
setSurfaceGroupId(groupId: Int)

Sets the surface group ID.

ImageCaptureCamera2Interop
@RequiresApi(value = 33)
setTimestampBase(timestampBase: Int)

Sets the timestamp base.

From androidx.camera.camera2.interop.StillCaptureInterop
open ImageCaptureCamera2Interop

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

ImageCaptureCamera2Interop

Sets the callback to receive still capture updates.

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

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

ImageCaptureCamera2Interop

Sets the template type for still capture requests.

Inherited properties

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

Sets the dynamic range profile.

open Int

Sets the mirror mode.

open String

Sets the physical camera ID.

open Long

Sets the stream use case.

open Int

Sets the surface group ID.

open Int

Sets the timestamp base.

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

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

open StillCaptureRequestOptionTarget

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

open Int

Sets the template type for still capture requests.