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

Commit ca05eb4b authored by Zhijun He's avatar Zhijun He Committed by Android (Google) Code Review
Browse files

Merge "Camera API1: Ignore the video size change during recording" into lmp-dev

parents d018b8ff c5723624
Loading
Loading
Loading
Loading
+19 −14
Original line number Original line Diff line number Diff line
@@ -1672,10 +1672,14 @@ status_t Parameters::set(const String8& paramString) {
    if (validatedParams.videoWidth != videoWidth ||
    if (validatedParams.videoWidth != videoWidth ||
            validatedParams.videoHeight != videoHeight) {
            validatedParams.videoHeight != videoHeight) {
        if (state == RECORD) {
        if (state == RECORD) {
            ALOGE("%s: Video size cannot be updated when recording is active!",
            ALOGW("%s: Video size cannot be updated (from %d x %d to %d x %d)"
                    __FUNCTION__);
                    " when recording is active! Ignore the size update!",
            return BAD_VALUE;
                    __FUNCTION__, videoWidth, videoHeight, validatedParams.videoWidth,
        }
                    validatedParams.videoHeight);
            validatedParams.videoWidth = videoWidth;
            validatedParams.videoHeight = videoHeight;
            newParams.setVideoSize(videoWidth, videoHeight);
        } else {
            for (i = 0; i < availableVideoSizes.size(); i++) {
            for (i = 0; i < availableVideoSizes.size(); i++) {
                if ((availableVideoSizes[i].width ==
                if ((availableVideoSizes[i].width ==
                        validatedParams.videoWidth) &&
                        validatedParams.videoWidth) &&
@@ -1689,6 +1693,7 @@ status_t Parameters::set(const String8& paramString) {
                return BAD_VALUE;
                return BAD_VALUE;
            }
            }
        }
        }
    }


    // VIDEO_STABILIZATION
    // VIDEO_STABILIZATION
    validatedParams.videoStabilization = boolFromString(
    validatedParams.videoStabilization = boolFromString(