summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-08-30 21:33:10 +0800
committerWu-cheng Li <wuchengli@google.com>2011-09-01 13:37:14 +0800
commit98bb251c8b527600e7a4cca6cc33499710bbfbf1 (patch)
tree76188de45f4b4fc862f7527e2eddc14c8bc38e27 /core
parentabf82f9ea4960ead8716b183aac1792820cccdd1 (diff)
downloadframeworks_base-98bb251c8b527600e7a4cca6cc33499710bbfbf1.zip
frameworks_base-98bb251c8b527600e7a4cca6cc33499710bbfbf1.tar.gz
frameworks_base-98bb251c8b527600e7a4cca6cc33499710bbfbf1.tar.bz2
Add video snapshot camera parameter.
The API is still hidden. bug:5187868 Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
Diffstat (limited to 'core')
-rw-r--r--core/java/android/hardware/Camera.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index bc45945..63f2244 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -1468,6 +1468,7 @@ public class Camera {
private static final String KEY_MAX_NUM_DETECTED_FACES_HW = "max-num-detected-faces-hw";
private static final String KEY_MAX_NUM_DETECTED_FACES_SW = "max-num-detected-faces-sw";
private static final String KEY_RECORDING_HINT = "recording-hint";
+ private static final String KEY_VIDEO_SNAPSHOT_SUPPORTED = "video-snapshot-supported";
// Parameter key suffix for supported values.
private static final String SUPPORTED_VALUES_SUFFIX = "-values";
@@ -3210,6 +3211,35 @@ public class Camera {
set(KEY_RECORDING_HINT, hint ? TRUE : FALSE);
}
+ /**
+ * Returns true if video snapshot is supported. That is, applications
+ * can call {@link #takePicture(Camera.ShutterCallback,
+ * Camera.PictureCallback, Camera.PictureCallback, Camera.PictureCallback)}
+ * during recording. Applications do not need to call {@link
+ * #startPreview()} after taking a picture. The preview will be still
+ * active. Other than that, taking a picture during recording is
+ * identical to taking a picture normally. All settings and methods
+ * related to takePicture work identically. Ex: {@link
+ * #getPictureSize()}, {@link #getSupportedPictureSizes()}, {@link
+ * #setJpegQuality(int)}, {@link #setRotation(int)}, and etc. The
+ * picture will have an EXIF header. {@link #FLASH_MODE_AUTO} and {@link
+ * #FLASH_MODE_ON} also still work, but the video will record the flash.
+ *
+ * Applications can set shutter callback as null to avoid the shutter
+ * sound. It is also recommended to set raw picture and post view
+ * callbacks to null to avoid the interrupt of preview display.
+ *
+ * Field-of-view of the recorded video may be different from that of the
+ * captured pictures.
+ *
+ * @return true if video snapshot is supported.
+ * @hide
+ */
+ public boolean isVideoSnapshotSupported() {
+ String str = get(KEY_VIDEO_SNAPSHOT_SUPPORTED);
+ return TRUE.equals(str);
+ }
+
// Splits a comma delimited string to an ArrayList of String.
// Return null if the passing string is null or the size is 0.
private ArrayList<String> split(String str) {