Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eca6c439 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh
Browse files

CameraNDK: hide some capabilities in NDK

Codegen update. Hide capabilities not yet supported by NDK.

Bug: 27102995
Change-Id: I817980491bb3f7636f25e8734b179ffaa2a00365
parent 93e5235e
Loading
Loading
Loading
Loading
+0 −191
Original line number Diff line number Diff line
@@ -2051,52 +2051,6 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
     */
    ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_RAW                       = 3,

    /*
     * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p>
     * <ul>
     * <li>One input stream is supported, that is, <code>ACAMERA_REQUEST_MAX_NUM_INPUT_STREAMS == 1</code>.</li>
     * <li>{@link android.graphics.ImageFormat#PRIVATE} is supported as an output/input format,
     *   that is, {@link android.graphics.ImageFormat#PRIVATE} is included in the lists of
     *   formats returned by {@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}.</li>
     * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput}
     *   returns non empty int[] for each supported input format returned by {@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}.</li>
     * <li>Each size returned by {@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getInputSizes
     *   getInputSizes(ImageFormat.PRIVATE)} is also included in {@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes
     *   getOutputSizes(ImageFormat.PRIVATE)}</li>
     * <li>Using {@link android.graphics.ImageFormat#PRIVATE} does not cause a frame rate drop
     *   relative to the sensor's maximum capture rate (at that resolution).</li>
     * <li>{@link android.graphics.ImageFormat#PRIVATE} will be reprocessable into both
     *   {@link android.graphics.ImageFormat#YUV_420_888} and
     *   {@link android.graphics.ImageFormat#JPEG} formats.</li>
     * <li>The maximum available resolution for PRIVATE streams
     *   (both input/output) will match the maximum available
     *   resolution of JPEG streams.</li>
     * <li>Static metadata android.reprocess.maxCaptureStall.</li>
     * <li>Only below controls are effective for reprocessing requests and
     *   will be present in capture results, other controls in reprocess
     *   requests will be ignored by the camera device.<ul>
     * <li>ACAMERA_JPEG_*</li>
     * <li>ACAMERA_NOISE_REDUCTION_MODE</li>
     * <li>ACAMERA_EDGE_MODE</li>
     * </ul>
     * </li>
     * <li>ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES and
     *   ACAMERA_EDGE_AVAILABLE_EDGE_MODES will both list ZERO_SHUTTER_LAG as a supported mode.</li>
     * </ul>
     *
     * @see ACAMERA_EDGE_AVAILABLE_EDGE_MODES
     * @see ACAMERA_EDGE_MODE
     * @see ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
     * @see ACAMERA_NOISE_REDUCTION_MODE
     * @see ACAMERA_REQUEST_MAX_NUM_INPUT_STREAMS
     */
    ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING      = 4,

    /*
     * <p>The camera device supports accurately reporting the sensor settings for many of
     * the sensor controls while the built-in 3A algorithm is running.  This allows
@@ -2166,57 +2120,6 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
     */
    ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE             = 6,

    /*
     * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as
     * PRIVATE_REPROCESSING, This capability requires the camera device to support the
     * following:</p>
     * <ul>
     * <li>One input stream is supported, that is, <code>ACAMERA_REQUEST_MAX_NUM_INPUT_STREAMS == 1</code>.</li>
     * <li>{@link android.graphics.ImageFormat#YUV_420_888} is supported as an output/input format, that is,
     *   YUV_420_888 is included in the lists of formats returned by
     *   {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and
     *   {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}.</li>
     * <li>{@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput}
     *   returns non-empty int[] for each supported input format returned by {@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}.</li>
     * <li>Each size returned by {@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getInputSizes
     *   getInputSizes(YUV_420_888)} is also included in {@link
     *   android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes
     *   getOutputSizes(YUV_420_888)}</li>
     * <li>Using {@link android.graphics.ImageFormat#YUV_420_888} does not cause a frame rate drop
     *   relative to the sensor's maximum capture rate (at that resolution).</li>
     * <li>{@link android.graphics.ImageFormat#YUV_420_888} will be reprocessable into both
     *   {@link android.graphics.ImageFormat#YUV_420_888} and {@link
     *   android.graphics.ImageFormat#JPEG} formats.</li>
     * <li>The maximum available resolution for {@link
     *   android.graphics.ImageFormat#YUV_420_888} streams (both input/output) will match the
     *   maximum available resolution of {@link android.graphics.ImageFormat#JPEG} streams.</li>
     * <li>Static metadata android.reprocess.maxCaptureStall.</li>
     * <li>Only the below controls are effective for reprocessing requests and will be present
     *   in capture results. The reprocess requests are from the original capture results that
     *   are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888}
     *   output buffers.  All other controls in the reprocess requests will be ignored by the
     *   camera device.<ul>
     * <li>ACAMERA_JPEG_*</li>
     * <li>ACAMERA_NOISE_REDUCTION_MODE</li>
     * <li>ACAMERA_EDGE_MODE</li>
     * <li>android.reprocess.effectiveExposureFactor</li>
     * </ul>
     * </li>
     * <li>ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES and
     *   ACAMERA_EDGE_AVAILABLE_EDGE_MODES will both list ZERO_SHUTTER_LAG as a supported mode.</li>
     * </ul>
     *
     * @see ACAMERA_EDGE_AVAILABLE_EDGE_MODES
     * @see ACAMERA_EDGE_MODE
     * @see ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
     * @see ACAMERA_NOISE_REDUCTION_MODE
     * @see ACAMERA_REQUEST_MAX_NUM_INPUT_STREAMS
     */
    ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING          = 7,

    /*
     * <p>The camera device can produce depth measurements from its field of view.</p>
     * <p>This capability requires the camera device to support the following:</p>
@@ -2257,100 +2160,6 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
     */
    ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT              = 8,

    /*
     * <p>The device supports constrained high speed video recording (frame rate &gt;=120fps)
     * use case. The camera device will support high speed capture session created by
     * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}, which
     * only accepts high speed request lists created by
     * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}.</p>
     * <p>A camera device can still support high speed video streaming by advertising the high speed
     * FPS ranges in ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES. For this case, all normal
     * capture request per frame control and synchronization requirements will apply to
     * the high speed fps ranges, the same as all other fps ranges. This capability describes
     * the capability of a specialized operating mode with many limitations (see below), which
     * is only targeted at high speed video recording.</p>
     * <p>The supported high speed video sizes and fps ranges are specified in
     * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges}.
     * To get desired output frame rates, the application is only allowed to select video size
     * and FPS range combinations provided by
     * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes}.
     * The fps range can be controlled via ACAMERA_CONTROL_AE_TARGET_FPS_RANGE.</p>
     * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to
     * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
     * controls will be overridden to be FAST. Therefore, no manual control of capture
     * and post-processing parameters is possible. All other controls operate the
     * same as when ACAMERA_CONTROL_MODE == AUTO. This means that all other
     * ACAMERA_CONTROL_* fields continue to work, such as</p>
     * <ul>
     * <li>ACAMERA_CONTROL_AE_TARGET_FPS_RANGE</li>
     * <li>ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION</li>
     * <li>ACAMERA_CONTROL_AE_LOCK</li>
     * <li>ACAMERA_CONTROL_AWB_LOCK</li>
     * <li>ACAMERA_CONTROL_EFFECT_MODE</li>
     * <li>ACAMERA_CONTROL_AE_REGIONS</li>
     * <li>ACAMERA_CONTROL_AF_REGIONS</li>
     * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
     * <li>ACAMERA_CONTROL_AF_TRIGGER</li>
     * <li>ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER</li>
     * </ul>
     * <p>Outside of ACAMERA_CONTROL_*, the following controls will work:</p>
     * <ul>
     * <li>ACAMERA_FLASH_MODE (TORCH mode only, automatic flash for still capture will not
     * work since aeMode is ON)</li>
     * <li>ACAMERA_LENS_OPTICAL_STABILIZATION_MODE (if it is supported)</li>
     * <li>ACAMERA_SCALER_CROP_REGION</li>
     * <li>ACAMERA_STATISTICS_FACE_DETECT_MODE (if it is supported)</li>
     * </ul>
     * <p>For high speed recording use case, the actual maximum supported frame rate may
     * be lower than what camera can output, depending on the destination Surfaces for
     * the image data. For example, if the destination surface is from video encoder,
     * the application need check if the video encoder is capable of supporting the
     * high frame rate for a given video size, or it will end up with lower recording
     * frame rate. If the destination surface is from preview window, the actual preview frame
     * rate will be bounded by the screen refresh rate.</p>
     * <p>The camera device will only support up to 2 high speed simultaneous output surfaces
     * (preview and recording surfaces)
     * in this mode. Above controls will be effective only if all of below conditions are true:</p>
     * <ul>
     * <li>The application creates a camera capture session with no more than 2 surfaces via
     * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}. The
     * targeted surfaces must be preview surface (either from
     * {@link android.view.SurfaceView} or {@link android.graphics.SurfaceTexture}) or
     * recording surface(either from {@link android.media.MediaRecorder#getSurface} or
     * {@link android.media.MediaCodec#createInputSurface}).</li>
     * <li>The stream sizes are selected from the sizes reported by
     * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes}.</li>
     * <li>The FPS ranges are selected from
     * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges}.</li>
     * </ul>
     * <p>When above conditions are NOT satistied,
     * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}
     * will fail.</p>
     * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device
     * reconfigurations, which may introduce extra latency. It is recommended that
     * the application avoids unnecessary maximum target FPS changes as much as possible
     * during high speed streaming.</p>
     *
     * @see ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
     * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
     * @see ACAMERA_CONTROL_AE_LOCK
     * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
     * @see ACAMERA_CONTROL_AE_REGIONS
     * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
     * @see ACAMERA_CONTROL_AF_REGIONS
     * @see ACAMERA_CONTROL_AF_TRIGGER
     * @see ACAMERA_CONTROL_AWB_LOCK
     * @see ACAMERA_CONTROL_AWB_REGIONS
     * @see ACAMERA_CONTROL_EFFECT_MODE
     * @see ACAMERA_CONTROL_MODE
     * @see ACAMERA_FLASH_MODE
     * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
     * @see ACAMERA_SCALER_CROP_REGION
     * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
     */
    ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
                                                                      = 9,

} acamera_metadata_enum_android_request_available_capabilities_t;