Код: Выделить всё
Camera2CameraControl camera2CameraControl =
Camera2CameraControl.from(camera.getCameraControl());
CaptureRequestOptions captureRequestOptions =
new CaptureRequestOptions.Builder()
.setCaptureRequestOption(CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE, CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_ON)
.build();
camera2CameraControl.setCaptureRequestOptions(captureRequestOptions);
Camera2CameraControl camera2CameraControl =
Camera2CameraControl.from(camera.getCameraControl());
CaptureRequestOptions captureRequestOptions =
new CaptureRequestOptions.Builder()
.setCaptureRequestOption(CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE, CameraMetadata.LENS_OPTICAL_STABILIZATION_MODE_ON)
.build();
camera2CameraControl.setCaptureRequestOptions(captureRequestOptions);
Подробнее здесь: https://stackoverflow.com/questions/682 ... -camerax-v