diff options
author | Praveen Chavan <pchavan@codeaurora.org> | 2015-07-14 12:38:37 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:26:26 -0600 |
commit | 669508fe0050408955037dc685da371b81ae8644 (patch) | |
tree | 84093aaa92520418ee35fb98d2b2328754886c25 | |
parent | 89373544dc36f194ac3a988e6ea408faf0550e55 (diff) | |
download | frameworks_base-669508fe0050408955037dc685da371b81ae8644.zip frameworks_base-669508fe0050408955037dc685da371b81ae8644.tar.gz frameworks_base-669508fe0050408955037dc685da371b81ae8644.tar.bz2 |
CamcorderProfiles: add VGA and 4K-DCI profiles.
Change-Id: I1067da3769635365048529fe315e6971c2d51696
-rw-r--r-- | media/java/android/media/CamcorderProfile.java | 51 | ||||
-rw-r--r-- | media/jni/android_media_MediaProfiles.cpp | 4 |
2 files changed, 53 insertions, 2 deletions
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java index d303a2e..c7f381e 100644 --- a/media/java/android/media/CamcorderProfile.java +++ b/media/java/android/media/CamcorderProfile.java @@ -206,6 +206,53 @@ 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; + + // 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_HIGH_SPEED_4KDCI; + /** * Default recording duration in seconds before the session is terminated. * This is useful for applications like MMS has limited file size requirement. @@ -391,7 +438,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); } diff --git a/media/jni/android_media_MediaProfiles.cpp b/media/jni/android_media_MediaProfiles.cpp index ca9db91..91cdc6d 100644 --- a/media/jni/android_media_MediaProfiles.cpp +++ b/media/jni/android_media_MediaProfiles.cpp @@ -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 |