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

Commit 9ed5ce51 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Camera: Add version 3.8 of ICameraDeviceCallback"

parents 5203cd1d cd9af6c1
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "hardware_interfaces_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["hardware_interfaces_license"],
}


hidl_interface {
    name: "android.hardware.camera.device@3.8",
    root: "android.hardware",
    srcs: [
        "types.hal",
        "ICameraDevice.hal",
        "ICameraDeviceCallback.hal",
    ],
    interfaces: [
        "android.hardware.camera.common@1.0",
        "android.hardware.camera.device@3.2",
        "android.hardware.camera.device@3.3",
        "android.hardware.camera.device@3.4",
        "android.hardware.camera.device@3.5",
        "android.hardware.camera.device@3.6",
        "android.hardware.camera.device@3.7",
        "android.hardware.camera.metadata@3.2",
        "android.hardware.camera.metadata@3.3",
        "android.hardware.camera.metadata@3.4",
        "android.hardware.camera.metadata@3.5",
        "android.hardware.camera.metadata@3.6",
        "android.hardware.graphics.common@1.0",
        "android.hidl.base@1.0",
    ],
    gen_java: false,
}
+32 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.device@3.8;

import @3.7::ICameraDevice;

/**
 * Camera device interface
 *
 * Supports the android.hardware.Camera API, and the android.hardware.camera2
 * API at LIMITED or better hardware level.
 *
 * ICameraDevice.open() must return @3.2::ICameraDeviceSession,
 * @3.5::ICameraDeviceSession, @3.6::ICameraDeviceSession, or
 * @3.7::ICameraDeviceSession.
 */
interface ICameraDevice extends @3.7::ICameraDevice {
};
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.device@3.8;

import @3.5::ICameraDeviceCallback;

/**
 * Callback methods for the HAL to call into the framework.
 */
interface ICameraDeviceCallback extends @3.5::ICameraDeviceCallback {
    /**
     * Identical to @3.5::ICameraDeviceCallback.notify, except that it takes a
     * list of @3.8::NotifyMsg which contain readout timestamp in addition
     * to exposure start timestamp for shutter.
     *
     * The readout timestamp is used for the framework to re-time the viewfinder
     * frames targeted for SurfaceView so that preview jitter can be reduced.
     */
    notify_3_8(vec<NotifyMsg> msgs);
};
+68 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.device@3.8;

import @3.2::ErrorMsg;
import @3.2::MsgType;
import @3.2::ShutterMsg;

/**
 * ShutterMsg:
 *
 * Message contents for MsgType::SHUTTER
 *
 * This version extends the @3.2 ShutterMsg with the readout timestamp.
 */
struct ShutterMsg {
    /**
     * The definition of ShutterMsg from prior version.
     */
    @3.2::ShutterMsg v3_2;

    /**
     * Timestamp for the capture readout. This must be in the same time domain
     * as v3_2.timestamp, and the value must be v3_2.timestamp + exposureTime
     * for a rolling shutter sensor.
     */
    uint64_t readoutTimestamp;
};

/**
 * NotifyMsg:
 *
 * The message structure sent to ICameraDevice3Callback::notify()
 *
 * This version extends the @3.2 NotifyMsg with the @3.8 version of ShutterMsg.
 */
struct NotifyMsg {
    /**
     * The message type.
     */
    @3.2::MsgType type;

    union Message {
        /**
         * Error message contents. Valid if type is MsgType::ERROR
         */
        @3.2::ErrorMsg error;

        /**
         * Shutter message contents. Valid if type is MsgType::SHUTTER
         */
        ShutterMsg shutter;
    } msg;
};
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ cc_test {
        "android.hardware.camera.device@3.5",
        "android.hardware.camera.device@3.6",
        "android.hardware.camera.device@3.7",
        "android.hardware.camera.device@3.8",
        "android.hardware.camera.metadata@3.4",
        "android.hardware.camera.provider@2.4",
        "android.hardware.camera.provider@2.5",
Loading