StillCaptureInterop


public 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 methods

abstract CameraCaptureSession.CaptureCallback

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

default @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.

Public methods

getStillCaptureRequest

Added in 1.7.0-rc01
default @NonNull StillCaptureRequestOptionTarget getStillCaptureRequest()

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

getStillCaptureRequestTemplateType

Added in 1.7.0-rc01
abstract int getStillCaptureRequestTemplateType()

The template type for still capture requests.

setStillCaptureCallback

Added in 1.7.0-rc01
abstract void setStillCaptureCallback(
    @NonNull Executor executor,
    @NonNull CameraCaptureSession.CaptureCallback callback
)

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
@NonNull Executor executor

executor to run the callback on

@NonNull CameraCaptureSession.CaptureCallback callback

still capture callback

setStillCaptureRequestOption

Added in 1.7.0-rc01
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.

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
@NonNull CaptureRequest.Key<@NonNull V> key

capture request option key

@NonNull V value

option value

setStillCaptureRequestTemplateType

Added in 1.7.0-rc01
abstract void setStillCaptureRequestTemplateType(int value)

The template type for still capture requests.