CameraCaptureSessionInterop


public interface CameraCaptureSessionInterop


Configures Camera2 android.hardware.camera2.CameraCaptureSession options.

Summary

Public methods

abstract void

Clears all CaptureRequest.Keys previously set on this target.

abstract void

Clears a CaptureRequest.Key previously set on this target.

default @NonNull CaptureRequestOptionTarget

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

abstract CameraCaptureSession.CaptureCallback

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

abstract int

The repeating capture request template type (e.g., android.hardware.camera2.CameraDevice.TEMPLATE_PREVIEW).

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

Sets a CaptureRequest.Key and value on repeating and one-shot requests.

abstract void

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

abstract void

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

abstract void

The repeating capture request template type (e.g., android.hardware.camera2.CameraDevice.TEMPLATE_PREVIEW).

Public methods

clearAllCaptureRequestOptions

Added in 1.7.0-rc01
abstract void clearAllCaptureRequestOptions()

Clears all CaptureRequest.Keys previously set on this target.

clearCaptureRequestOption

Added in 1.7.0-rc01
abstract void clearCaptureRequestOption(@NonNull CaptureRequest.Key<@NonNull ?> key)

Clears a CaptureRequest.Key previously set on this target.

Parameters
@NonNull CaptureRequest.Key<@NonNull ?> key

capture request option key

getCaptureRequest

Added in 1.7.0-rc01
default @NonNull CaptureRequestOptionTarget getCaptureRequest()

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

getRepeatingCaptureRequestTemplate

Added in 1.7.0-rc01
abstract int getRepeatingCaptureRequestTemplate()

The repeating capture request template type (e.g., android.hardware.camera2.CameraDevice.TEMPLATE_PREVIEW).

setCaptureRequestOption

Added in 1.7.0-rc01
abstract void <V extends Object> setCaptureRequestOption(
    @NonNull CaptureRequest.Key<@NonNull V> key,
    @NonNull V value
)

Sets a CaptureRequest.Key and value on repeating and one-shot requests.

Parameters
@NonNull CaptureRequest.Key<@NonNull V> key

capture request option key

@NonNull V value

option value

setRepeatingCaptureCallback

Added in 1.7.0-rc01
abstract void setRepeatingCaptureCallback(
    CameraCaptureSession.CaptureCallback value
)

The callback to receive repeating capture updates on a direct 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:

setRepeatingCaptureCallback

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

Sets the callback to receive repeating 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

repeating capture callback

setRepeatingCaptureRequestTemplate

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

The repeating capture request template type (e.g., android.hardware.camera2.CameraDevice.TEMPLATE_PREVIEW).