Java Code Examples for android.hardware.camera2.CaptureResult#CONTROL_AE_STATE_INACTIVE

The following examples show how to use android.hardware.camera2.CaptureResult#CONTROL_AE_STATE_INACTIVE . 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: AcceptableZslImageFilter.java    From Camera2 with Apache License 2.0 6 votes vote down vote up
private boolean isAEAcceptable(TotalCaptureResultProxy metadata)
{
    Integer aeState = metadata.get(CaptureResult.CONTROL_AE_STATE);
    if (aeState == null)
    {
        return true;
    } else
    {
        switch (aeState)
        {
            case CaptureResult.CONTROL_AE_STATE_INACTIVE:
            case CaptureResult.CONTROL_AE_STATE_LOCKED:
            case CaptureResult.CONTROL_AE_STATE_CONVERGED:
                return true;
            default:
                return false;
        }
    }
}
 
Example 2
Source File: Camera2Helper.java    From DeviceConnect-Android with MIT License 6 votes vote down vote up
/**
 * Auto-Exposure の状態を文字列に変換します。
 *
 * @param asState Auto Exposure の状態
 * @return 文字列
 */
static String debugAEState(Integer asState) {
    if (asState == null) {
        return "NULL";
    }

    switch (asState) {
        default:
            return "UNKNOWN";
        case CaptureResult.CONTROL_AE_STATE_CONVERGED:
            return "CaptureResult.CONTROL_AE_STATE_CONVERGED";
        case CaptureResult.CONTROL_AE_STATE_FLASH_REQUIRED:
            return "CaptureResult.CONTROL_AE_STATE_FLASH_REQUIRED";
        case CaptureResult.CONTROL_AE_STATE_INACTIVE:
            return "CaptureResult.CONTROL_AE_STATE_INACTIVE";
        case CaptureResult.CONTROL_AE_STATE_LOCKED:
            return "CaptureResult.CONTROL_AE_STATE_LOCKED";
        case CaptureResult.CONTROL_AE_STATE_PRECAPTURE:
            return "CaptureResult.CONTROL_AE_STATE_PRECAPTURE";
        case CaptureResult.CONTROL_AE_STATE_SEARCHING:
            return "CaptureResult.CONTROL_AE_STATE_SEARCHING";
    }
}
 
Example 3
Source File: AndroidCamera2AgentImpl.java    From Camera2 with Apache License 2.0 5 votes vote down vote up
private void changeState(int newState) {
    if (mCameraState.getState() != newState) {
        mCameraState.setState(newState);
        if (newState < AndroidCamera2StateHolder.CAMERA_PREVIEW_ACTIVE) {
            mCurrentAeState = CaptureResult.CONTROL_AE_STATE_INACTIVE;
            mCameraResultStateCallback.resetState();
        }
    }
}