summaryrefslogtreecommitdiffstats
path: root/media/java
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-09-19 20:06:52 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-19 20:06:52 -0700
commit92d0a64b909cd95e8f4ce587438b0cc6d2daeaa0 (patch)
tree17d23a22607f0eab69abedf4f82d850c222c1fae /media/java
parent3b6377b120bb507f93a8f1e7e25bc026de764dd6 (diff)
parent07b9ae33127212fd9e15f96fa89b7d4cab81e55e (diff)
downloadframeworks_base-92d0a64b909cd95e8f4ce587438b0cc6d2daeaa0.zip
frameworks_base-92d0a64b909cd95e8f4ce587438b0cc6d2daeaa0.tar.gz
frameworks_base-92d0a64b909cd95e8f4ce587438b0cc6d2daeaa0.tar.bz2
Merge "Add QVGA resolution to CamcorderProfile" into ics-factoryrom
Diffstat (limited to 'media/java')
-rw-r--r--media/java/android/media/CamcorderProfile.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index b2234e2..51a45cd 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -81,6 +81,16 @@ public class CamcorderProfile
public static final int QUALITY_1080P = 6;
/**
+ * Quality level corresponding to the QVGA (320x240) resolution.
+ * {@hide}
+ */
+ public static final int QUALITY_QVGA = 7;
+
+ // Start and end of quality list
+ private static final int QUALITY_LIST_START = QUALITY_LOW;
+ private static final int QUALITY_LIST_END = QUALITY_QVGA;
+
+ /**
* Time lapse quality level corresponding to the lowest available resolution.
*/
public static final int QUALITY_TIME_LAPSE_LOW = 1000;
@@ -116,6 +126,16 @@ public class CamcorderProfile
public static final int QUALITY_TIME_LAPSE_1080P = 1006;
/**
+ * Time lapse quality level corresponding to the QVGA (320 x 240) resolution.
+ * {@hide}
+ */
+ public static final int QUALITY_TIME_LAPSE_QVGA = 1007;
+
+ // Start and end of timelapse quality list
+ private static final int QUALITY_TIME_LAPSE_LIST_START = QUALITY_TIME_LAPSE_LOW;
+ private static final int QUALITY_TIME_LAPSE_LIST_END = QUALITY_TIME_LAPSE_QVGA;
+
+ /**
* Default recording duration in seconds before the session is terminated.
* This is useful for applications like MMS has limited file size requirement.
*/
@@ -238,8 +258,10 @@ public class CamcorderProfile
* @see #QUALITY_TIME_LAPSE_1080P
*/
public static CamcorderProfile get(int cameraId, int quality) {
- if (!((quality >= QUALITY_LOW && quality <= QUALITY_1080P) ||
- (quality >= QUALITY_TIME_LAPSE_LOW && quality <= QUALITY_TIME_LAPSE_1080P))) {
+ if (!((quality >= QUALITY_LIST_START &&
+ quality <= QUALITY_LIST_END) ||
+ (quality >= QUALITY_TIME_LAPSE_LIST_START &&
+ quality <= QUALITY_TIME_LAPSE_LIST_END))) {
String errMessage = "Unsupported quality level: " + quality;
throw new IllegalArgumentException(errMessage);
}