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

Commit b591ddc3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "cameraserver: Correct camera1 -> api2 shim layer handling for video...

Merge "cameraserver: Correct camera1 -> api2 shim layer handling for video stabilization." am: 15d5df06 am: 8840ce6d am: 4c440acc

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2283535



Change-Id: I0358c2b1b76c3f4ba17e994525fee690135b504d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d7a71927 4c440acc
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -953,6 +953,12 @@ status_t Parameters::initialize(CameraDeviceBase *device) {
                false);

    if (availableVideoStabilizationModes.count > 1) {
        for (size_t i = 0; i < availableVideoStabilizationModes.count; i++) {
            if (availableVideoStabilizationModes.data.u8[i] ==
                ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON) {
                videoStabilizationOnSupported = true;
            }
        }
        params.set(CameraParameters::KEY_VIDEO_STABILIZATION_SUPPORTED,
                CameraParameters::TRUE);
    } else {
@@ -2373,9 +2379,11 @@ status_t Parameters::updateRequest(CameraMetadata *request) const {
            reqCropRegion, 4);
    if (res != OK) return res;

    uint8_t reqVstabMode = videoStabilization ?
    uint8_t reqVstabMode = videoStabilization ? videoStabilizationOnSupported ?
            ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON :
                    ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION :
            ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF;

    res = request->update(ANDROID_CONTROL_VIDEO_STABILIZATION_MODE,
            &reqVstabMode, 1);
    if (res != OK) return res;
+1 −0
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ struct Parameters {

    bool recordingHint;
    bool videoStabilization;
    bool videoStabilizationOnSupported = false;

    CameraParameters2 params;
    String8 paramsFlattened;