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

Commit 4c440acc 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

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



Change-Id: I97a31d104ac0ccac8cb45ddd58484347e7b86c19
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5abd8f44 8840ce6d
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;