Java Code Examples for android.hardware.camera2.CaptureRequest#CONTROL_AF_MODE_CONTINUOUS_VIDEO

The following examples show how to use android.hardware.camera2.CaptureRequest#CONTROL_AF_MODE_CONTINUOUS_VIDEO . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CameraInfo.java    From MobileInfo with Apache License 2.0 6 votes vote down vote up
private static String getAfAvailableModes(int afAvailableModes) {
    switch (afAvailableModes) {
        case CaptureRequest.CONTROL_AF_MODE_OFF:
            return "OFF";
        case CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE:
            return "CONTINUOUS_PICTURE";
        case CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_VIDEO:
            return "CONTINUOUS_VIDEO";
        case CaptureRequest.CONTROL_AF_MODE_EDOF:
            return "EDOF";
        case CaptureRequest.CONTROL_AF_MODE_MACRO:
            return "MACRO";
        case CaptureRequest.CONTROL_AF_MODE_AUTO:
            return "AUTO";

        default:
            return UNKNOWN + "-" + afAvailableModes;

    }
}
 
Example 2
Source File: Camera2Session.java    From webrtc_android with MIT License 5 votes vote down vote up
private void chooseFocusMode(CaptureRequest.Builder captureRequestBuilder) {
    final int[] availableFocusModes =
            cameraCharacteristics.get(CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES);
    for (int mode : availableFocusModes) {
        if (mode == CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_VIDEO) {
            captureRequestBuilder.set(
                    CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_VIDEO);
            Logging.d(TAG, "Using continuous video auto-focus.");
            return;
        }
    }
    Logging.d(TAG, "Auto-focus is not available.");
}
 
Example 3
Source File: Camera2Session.java    From VideoCRE with MIT License 5 votes vote down vote up
private void chooseFocusMode(CaptureRequest.Builder captureRequestBuilder) {
  final int[] availableFocusModes =
      cameraCharacteristics.get(CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES);
  for (int mode : availableFocusModes) {
    if (mode == CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_VIDEO) {
      captureRequestBuilder.set(
          CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_VIDEO);
      Logging.d(TAG, "Using continuous video auto-focus.");
      return;
    }
  }
  Logging.d(TAG, "Auto-focus is not available.");
}