CameraDeviceInterop
interface CameraDeviceInterop<T : CameraDeviceInterop<T>>
SessionConfigCamera2Interop |
Configures Camera2 options on a |
Configures Camera2 android.hardware.camera2.CameraDevice options.
Summary
Public functions |
|
|---|---|
open T |
setDeviceStateCallback(callback: CameraDevice.StateCallback)Sets the callback to receive camera device state updates on a direct executor. |
T |
setDeviceStateCallback(Sets the callback to receive camera device state updates. |
Public properties |
|
|---|---|
open CameraDevice.StateCallback |
Sets the callback to receive camera device state updates on a direct executor. |
Public functions
setDeviceStateCallback
open fun setDeviceStateCallback(callback: CameraDevice.StateCallback): T
Sets the callback to receive camera device state updates on a direct executor.
Warning: The callback receives raw android.hardware.camera2.CameraDevice instances. Calling android.hardware.camera2.CameraDevice.close directly on the device bypasses CameraX pipeline management and may cause state desynchronization or application crashes.
| Parameters | |
|---|---|
callback: CameraDevice.StateCallback |
device state callback |
| Returns | |
|---|---|
T |
this |
setDeviceStateCallback
fun setDeviceStateCallback(
executor: Executor,
callback: CameraDevice.StateCallback
): T
Sets the callback to receive camera device state updates.
Warning: The callback receives raw android.hardware.camera2.CameraDevice instances. Calling android.hardware.camera2.CameraDevice.close directly on the device bypasses CameraX pipeline management and may cause state desynchronization or application crashes.
| Parameters | |
|---|---|
executor: Executor |
executor to run the callback on |
callback: CameraDevice.StateCallback |
device state callback |
| Returns | |
|---|---|
T |
this |
Public properties
deviceStateCallback
open var deviceStateCallback: CameraDevice.StateCallback
Sets the callback to receive camera device state updates on a direct executor.
| See also | |
|---|---|
setDeviceStateCallback |