导入包import android.hardware.camera2.*;
有两个缩略词AE(auto-exposure (AE)),AF(auto-focus (AF) modes)
重要的类和接口
CameraManager
方法:openCamera
getCameraCharacteristics
getCameraIdList
Activity activity = getActivity();
CameraManager manager = (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE);
CameraDevice
方法
createCaptureRequest
createCaptureSession
CameraCaptureSession
方法
capture
setRepeatingRequest
stopRepeating
abortCaptures
类成员
CaptureCallback
CaptureRequest
主要使用的静态成员
CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER
CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_START
CaptureRequest.CONTROL_AE_STATE_FLASH_REQUIRED
CaptureRequest.CONTROL_AF_TRIGGER
CaptureRequest.CONTROL_AF_MODE
CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE
类成员
Builder
CameraCharacteristics
主要使用的静态成员
CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP
CameraCharacteristics.LENS_FACING
CameraCharacteristics.LENS_FACING_FRONT
CameraCharacteristics.SENSOR_ORIENTATION
CameraCharacteristics.FLASH_INFO_AVAILABLE
初始化类对象
CameraCharacteristics characteristics
= manager.getCameraCharacteristics(cameraId);