summaryrefslogtreecommitdiffstats
path: root/include/camera
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-05-13 19:31:02 +0800
committerWu-cheng Li <wuchengli@google.com>2010-05-15 12:40:54 +0800
commite339c5edbebedf446581f18ad70214007309bf4b (patch)
tree7d03e881cb3e1300aef948eafb85396a58d38e1c /include/camera
parentaef87aa90cf3a6cf9098477683b07994697c45fe (diff)
downloadframeworks_base-e339c5edbebedf446581f18ad70214007309bf4b.zip
frameworks_base-e339c5edbebedf446581f18ad70214007309bf4b.tar.gz
frameworks_base-e339c5edbebedf446581f18ad70214007309bf4b.tar.bz2
Add camera focus distances API.
Applications can use this API to estimate the distance between the subject and the camera. bug:1955650 Change-Id: Ie6c8ea4971759cab6c9bcdda2c5ceb5925791c27
Diffstat (limited to 'include/camera')
-rw-r--r--include/camera/CameraParameters.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index 979df9f..19b052b 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -221,9 +221,30 @@ public:
// Example value: "true". Read only.
static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
+ // The distances (in meters) from the camera to where an object appears to
+ // be in focus. The object is sharpest at the optimal focus distance. The
+ // depth of field is the far focus distance minus near focus distance.
+ //
+ // Applications can read this parameter anytime to get the latest focus
+ // distances. If the focus mode is FOCUS_MODE_EDOF, the values may be all
+ // 0, which means focus distance is not applicable. If the focus mode is
+ // FOCUS_MODE_CONTINUOUS and autofocus has started, focus distances may
+ // change from time to time.
+ //
+ // Far focus distance > optimal focus distance > near focus distance. If
+ // the far focus distance is infinity, the value should be "Infinity" (case
+ // sensitive). The format is three float values separated by commas. The
+ // first is near focus distance. The second is optimal focus distance. The
+ // third is far focus distance.
+ // Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only.
+ static const char KEY_FOCUS_DISTANCES[];
+
// Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED.
static const char TRUE[];
+ // Value for KEY_FOCUS_DISTANCES.
+ static const char INFINITY[];
+
// Values for white balance settings.
static const char WHITE_BALANCE_AUTO[];
static const char WHITE_BALANCE_INCANDESCENT[];