Camera2CameraControl

public final class Camera2CameraControl
extends Object

java.lang.Object
   ↳ androidx.camera.camera2.interop.Camera2CameraControl


An class that provides ability to interoperate with the android.hardware.camera2 APIs.

Camera2 specific controls, like capture request options, can be applied through this class. A Camera2CameraControl can be created from a general CameraControl which is associated to a camera. Then the controls will affect all use cases that are using that camera.

If any option applied by Camera2CameraControl conflicts with the options required by CameraX internally. The options from Camera2CameraControl will override, which may result in unexpected behavior depends on the options being applied.

Summary

Public methods

ListenableFuture<Void> addCaptureRequestOptions(CaptureRequestOptions bundle)

Adds a CaptureRequestOptions updates the session with the options it contains.

ListenableFuture<Void> clearCaptureRequestOptions()

Clears all capture request options that is currently applied by the Camera2CameraControl.

static Camera2CameraControl from(CameraControl cameraControl)

Gets the Camera2CameraControl from a CameraControl.

CaptureRequestOptions getCaptureRequestOptions()

Gets all the capture request options that is currently applied by the Camera2CameraControl.

ListenableFuture<Void> setCaptureRequestOptions(CaptureRequestOptions bundle)

Sets a CaptureRequestOptions and updates the session with the options it contains.

Inherited methods