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

Commit 5637c0ef authored by Praveen Chavan's avatar Praveen Chavan Committed by Linux Build Service Account
Browse files

CamcorderProfiles: Add new profiles for recorder

Below changes are squased:

video: Add QHD & 2K profile for recorder
Change-Id: I3269ccbedb70b12eb0f7bea8fb038533dbcdf894

add VGA and 4K-DCI profiles.

Change-Id: I1067da3769635365048529fe315e6971c2d51696
parent bb5517bc
Loading
Loading
Loading
Loading
+74 −1
Original line number Diff line number Diff line
@@ -206,6 +206,77 @@ public class CamcorderProfile
    private static final int QUALITY_HIGH_SPEED_LIST_START = QUALITY_HIGH_SPEED_LOW;
    private static final int QUALITY_HIGH_SPEED_LIST_END = QUALITY_HIGH_SPEED_2160P;

    // Vendor-specific quality profiles
    /**
     * Quality level corresponding to the VGA (640 x 480) resolution.
     * @hide
     */
    public static final int QUALITY_VGA = 10000;

    /**
     * Quality level corresponding to the 4k-DCI (4096 x 2160) resolution.
     * @hide
     */
    public static final int QUALITY_4KDCI = 10001;

    /**
     * Time lapse quality level corresponding to the VGA (640 x 480) resolution.
     * @hide
     */
    public static final int QUALITY_TIME_LAPSE_VGA = 10002;

    /**
     * Time lapse quality level corresponding to the 4k-DCI (4096 x 2160) resolution.
     * @hide
     */
    public static final int QUALITY_TIME_LAPSE_4KDCI = 10003;

    /**
     * High speed ( >= 100fps) quality level corresponding to the CIF (352 x 288)
     * @hide
     */
    public static final int QUALITY_HIGH_SPEED_CIF = 10004;

    /**
     * High speed ( >= 100fps) quality level corresponding to the VGA (640 x 480)
     * @hide
     */
    public static final int QUALITY_HIGH_SPEED_VGA = 10005;

    /**
     * High speed ( >= 100fps) quality level corresponding to the 4K-DCI (4096 x 2160)
     * @hide
     */
    public static final int QUALITY_HIGH_SPEED_4KDCI = 10006;

    /**
     * Quality level corresponding to QHD resolution
     * @hide
     */
    public static final int QUALITY_QHD = 10007;

    /**
     * Quality level corresponding to 2K resolution
     * @hide
     */
    public static final int QUALITY_2k = 10008;

    /**
     * Time lapse quality level corresponding to the QHD resolution.
     * @hide
     */
    public static final int QUALITY_TIME_LAPSE_QHD = 10009;

    /**
     * Time lapse quality level corresponding to the 2K resolution.
     * @hide
     */
    public static final int QUALITY_TIME_LAPSE_2k = 10010;

    // Start and end of vendor quality list
    private static final int QUALITY_VENDOR_LIST_START = QUALITY_VGA;
    private static final int QUALITY_VENDOR_LIST_END = QUALITY_TIME_LAPSE_2k;

    /**
     * Default recording duration in seconds before the session is terminated.
     * This is useful for applications like MMS has limited file size requirement.
@@ -391,7 +462,9 @@ public class CamcorderProfile
              (quality >= QUALITY_TIME_LAPSE_LIST_START &&
               quality <= QUALITY_TIME_LAPSE_LIST_END) ||
               (quality >= QUALITY_HIGH_SPEED_LIST_START &&
               quality <= QUALITY_HIGH_SPEED_LIST_END))) {
               quality <= QUALITY_HIGH_SPEED_LIST_END) ||
               (quality >= QUALITY_VENDOR_LIST_START &&
               quality <= QUALITY_VENDOR_LIST_END))) {
            String errMessage = "Unsupported quality level: " + quality;
            throw new IllegalArgumentException(errMessage);
        }
+3 −1
Original line number Diff line number Diff line
@@ -170,7 +170,9 @@ static bool isCamcorderQualityKnown(int quality)
            (quality >= CAMCORDER_QUALITY_TIME_LAPSE_LIST_START &&
             quality <= CAMCORDER_QUALITY_TIME_LAPSE_LIST_END) ||
             (quality >= CAMCORDER_QUALITY_HIGH_SPEED_LIST_START &&
              quality <= CAMCORDER_QUALITY_HIGH_SPEED_LIST_END));
              quality <= CAMCORDER_QUALITY_HIGH_SPEED_LIST_END) ||
             (quality >= CAMCORDER_QUALITY_VENDOR_START &&
              quality <= CAMCORDER_QUALITY_VENDOR_END));
}

static jobject