Example usage for android.hardware.camera2 CameraMetadata CONTROL_MODE_OFF

List of usage examples for android.hardware.camera2 CameraMetadata CONTROL_MODE_OFF

Introduction

In this page you can find the example usage for android.hardware.camera2 CameraMetadata CONTROL_MODE_OFF.

Prototype

int CONTROL_MODE_OFF

To view the source code for android.hardware.camera2 CameraMetadata CONTROL_MODE_OFF.

Click Source Link

Document

Full application control of pipeline.

All control by the device's metering and focusing (3A) routines is disabled, and no other settings in android.control.* have any effect, except that CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent may be used by the camera device to select post-processing values for processing blocks that do not allow for manual control, or are not exposed by the camera API.

However, the camera device's 3A routines may continue to collect statistics and update their internal state so that when control is switched to AUTO mode, good control values can be immediately applied.

Usage

From source file:com.example.android.camera2basic.Camera2BasicFragment.java

private void initPreviewBuilder() {
    mPreviewRequestBuilder.set(CaptureRequest.CONTROL_MODE, CameraMetadata.CONTROL_MODE_OFF);

    mPreviewRequestBuilder.set(CaptureRequest.LENS_FOCUS_DISTANCE, valueAF);
    mPreviewRequestBuilder.set(CaptureRequest.SENSOR_EXPOSURE_TIME, valueAETime);
    mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_EXPOSURE_COMPENSATION, valueAE);
    mPreviewRequestBuilder.set(CaptureRequest.SENSOR_SENSITIVITY, valueISO);
}