StillCaptureInterop


interface StillCaptureInterop

Known direct subclasses
ImageCaptureCamera2Interop

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


Configures Camera2 options for still capture requests.

Keys configured for still capture requests override corresponding keys set in repeating requests.

Summary

Public functions

Unit

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

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

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

Public properties

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.

Int

The template type for still capture requests.

Public functions

setStillCaptureCallback

Added in 1.7.0-rc01
fun setStillCaptureCallback(
    executor: Executor,
    callback: CameraCaptureSession.CaptureCallback
): Unit

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

Warning: The callback receives 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:

Parameters
executor: Executor

executor to run the callback on

callback: CameraCaptureSession.CaptureCallback

still capture callback

setStillCaptureRequestOption

Added in 1.7.0-rc01
fun <V : Any?> setStillCaptureRequestOption(key: CaptureRequest.Key<V>, value: V): Unit

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

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 key set here.

Parameters
key: CaptureRequest.Key<V>

capture request option key

value: V

option value

Public properties

stillCaptureRequest

Added in 1.7.0-rc01
open val stillCaptureRequest: StillCaptureRequestOptionTarget

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

stillCaptureRequestTemplateType

Added in 1.7.0-rc01
var stillCaptureRequestTemplateType: Int

The template type for still capture requests.