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

Commit a0b2be85 authored by Jianing Wei's avatar Jianing Wei Committed by Android Git Automerger
Browse files

am dcb495ff: Merge "Camera2 API: enable burst capture and repeating burst."

* commit 'dcb495ff':
  Camera2 API: enable burst capture and repeating burst.
parents 53461fa2 dcb495ff
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014 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.camera2;

/** @hide */
parcelable CaptureResultExtras;
+90 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014 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.camera2;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @hide
 */
public class CaptureResultExtras implements Parcelable {
    private int requestId;
    private int subsequenceId;
    private int afTriggerId;
    private int precaptureTriggerId;
    private long frameNumber;

    public static final Parcelable.Creator<CaptureResultExtras> CREATOR =
            new Parcelable.Creator<CaptureResultExtras>() {
        @Override
        public CaptureResultExtras createFromParcel(Parcel in) {
            return new CaptureResultExtras(in);
        }

        @Override
        public CaptureResultExtras[] newArray(int size) {
            return new CaptureResultExtras[size];
        }
    };

    private CaptureResultExtras(Parcel in) {
        readFromParcel(in);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(requestId);
        dest.writeInt(subsequenceId);
        dest.writeInt(afTriggerId);
        dest.writeInt(precaptureTriggerId);
        dest.writeLong(frameNumber);
    }

    public void readFromParcel(Parcel in) {
        requestId = in.readInt();
        subsequenceId = in.readInt();
        afTriggerId = in.readInt();
        precaptureTriggerId = in.readInt();
        frameNumber = in.readLong();
    }

    public int getRequestId() {
        return requestId;
    }

    public int getSubsequenceId() {
        return subsequenceId;
    }

    public int getAfTriggerId() {
        return afTriggerId;
    }

    public int getPrecaptureTriggerId() {
        return precaptureTriggerId;
    }

    public long getFrameNumber() {
        return frameNumber;
    }

}
+5 −3
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.hardware.camera2;

import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.CaptureResultExtras;

/** @hide */
interface ICameraDeviceCallbacks
@@ -25,8 +26,9 @@ interface ICameraDeviceCallbacks
     * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceCallbacks.h
     */

    oneway void onCameraError(int errorCode);
    oneway void onCameraError(int errorCode, in CaptureResultExtras resultExtras);
    oneway void onCameraIdle();
    oneway void onCaptureStarted(int requestId, long timestamp);
    oneway void onResultReceived(int requestId, in CameraMetadataNative result);
    oneway void onCaptureStarted(in CaptureResultExtras resultExtras, long timestamp);
    oneway void onResultReceived(in CameraMetadataNative result,
                                 in CaptureResultExtras resultExtras);
}
+9 −3
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ import android.view.Surface;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.CaptureRequest;

import android.hardware.camera2.LongParcelable;

/** @hide */
interface ICameraDeviceUser
{
@@ -31,9 +33,13 @@ interface ICameraDeviceUser
    // ints here are status_t

    // non-negative value is the requestId. negative value is status_t
    int submitRequest(in CaptureRequest request, boolean streaming);
    int submitRequest(in CaptureRequest request, boolean streaming,
                      out LongParcelable lastFrameNumber);

    int submitRequestList(in List<CaptureRequest> requestList, boolean streaming,
                          out LongParcelable lastFrameNumber);

    int cancelRequest(int requestId);
    int cancelRequest(int requestId, out LongParcelable lastFrameNumber);

    int deleteStream(int streamId);

@@ -46,5 +52,5 @@ interface ICameraDeviceUser

    int waitUntilIdle();

    int flush();
    int flush(out LongParcelable lastFrameNumber);
}
+20 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014 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.camera2;

/** @hide */
parcelable LongParcelable;
 No newline at end of file
Loading