summaryrefslogtreecommitdiffstats
path: root/media/java
diff options
context:
space:
mode:
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);
}