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

Commit cb110afb authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by Android (Google) Code Review
Browse files

Merge "camera: Add ICameraProvider@2.6."

parents 90500084 6248100e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ hidl_interface {
        enabled: true,
    },
    srcs: [
        "types.hal",
        "ICameraProvider.hal",
        "ICameraProviderCallback.hal",
    ],
+83 −3
Original line number Diff line number Diff line
@@ -17,14 +17,94 @@
package android.hardware.camera.provider@2.6;

import @2.5::ICameraProvider;
import android.hardware.camera.common@1.0::Status;
import android.hardware.camera.device@3.4::StreamConfiguration;

/**
 * Camera provider HAL
 *
 * @2.6::adds support for the getConcurrentStreamingCameraIds() and
 * isConcurrentStreamCombinationSupported()
 * @2.6::ICameraProviderCallback to receive physical camera availability
 * callbacks for logical multi-cameras.
 */
interface ICameraProvider extends @2.5::ICameraProvider {
    /**
     * @2.4::ICameraProvider::setCallback can be passed a
     * @2.6::ICameraProviderCallback to receive physical camera availability
     * callbacks for logical multi-cameras.
     * getConcurrentStreamingCameraIds
     *
     * Get a vector of combinations of camera device ids that are able to
     * configure streams concurrently. Each camera device advertised in a
     * combination MUST at the very least support the following streams while
     * streaming concurrently with the other camera ids in the combination.
     *
     *       Target 1                  Target 2
     * ---------------------------------------------
     * | Type  |   Size       |   Type  |   Size   |
     * ---------------------------------------------
     * | YUV   |  1280 X 720  |                    |
     * ---------------------------------------------
     * | PRIV  |  1280 X 720  |                    |
     * ---------------------------------------------
     * | YUV   |  1280 X 720  |   YUV   |1280 X 720|
     * ---------------------------------------------
     * | PRIV  |  1280 X 720  |   PRIV  |1280 X 720|
     * ---------------------------------------------
     * | PRIV  |  1280 X 720  |   YUV   |1280 X 720|
     * ---------------------------------------------

     * @return status Status code for the operation
     * @return cameraIds a list of camera id combinations that support
     *         concurrent stream configurations with the minimum guarantees
     *         specified.
     */
    getConcurrentStreamingCameraIds() generates (Status status, vec<vec<string>> cameraIds);

    /**
     * isConcurrentStreamCombinationSupported:
     *
     * Check for device support of specific camera stream combinations while
     * streaming concurrently with other devices.
     *
     * The per device streamList must contain at least one output-capable stream, and may
     * not contain more than one input-capable stream.
     * In contrast to regular stream configuration the framework does not create
     * or initialize any actual streams. This means that Hal must not use or
     * consider the stream "id" value.
     *
     * ------------------------------------------------------------------------
     *
     * Preconditions:
     *
     * The framework can call this method at any time before, during and
     * after active session configuration per device. This means that calls must not
     * impact the performance of pending camera requests in any way. In
     * particular there must not be any glitches or delays during normal
     * camera streaming.
     *
     * The framework must not call this method with any combination of camera
     * ids that is not a subset of the camera ids advertised by getConcurrentStreamingCameraIds of
     * the same provider.
     *
     * Performance requirements:
     * This call is expected to be significantly faster than stream
     * configuration. In general HW and SW camera settings must not be
     * changed and there must not be a user-visible impact on camera performance.
     *
     * @param configs a vector of camera ids and their corresponding stream
     *                configurations that need to be queried for support.
     *
     * @return status Status code for the operation, one of:
     *     OK:
     *          On successful stream combination query.
     *     METHOD_NOT_SUPPORTED:
     *          The camera provider does not support stream combination query.
     *     INTERNAL_ERROR:
     *          The stream combination query cannot complete due to internal
     *          error.
     * @return true in case the stream combination is supported, false otherwise.
     *
     *
     */
    isConcurrentStreamCombinationSupported(vec<CameraIdAndStreamCombination> configs)
        generates (Status status, bool queryStatus);
};
+30 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.camera.provider@2.6;

import android.hardware.camera.device@3.4::StreamConfiguration;

/**
 * CameraIdAndStreamCombination:
 * Pairs the cameraId and the StreamConfiguration to be
 * tested with other concurrent camera id and StreamConfigurations
 */
struct CameraIdAndStreamCombination {
    string cameraId;

    @3.4::StreamConfiguration streamConfiguration;
};