diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-04-02 06:19:46 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-04-08 17:45:15 +0800 |
commit | a1c3d37ef921bfc79a0f7d2ac7f897943134d48d (patch) | |
tree | 871f3877f6db65c265a9482eba3593f91e0ac129 /include/camera | |
parent | cc8ace7989f663fe6c6c1ed0febca0d9d1f19c7a (diff) | |
download | frameworks_av-a1c3d37ef921bfc79a0f7d2ac7f897943134d48d.zip frameworks_av-a1c3d37ef921bfc79a0f7d2ac7f897943134d48d.tar.gz frameworks_av-a1c3d37ef921bfc79a0f7d2ac7f897943134d48d.tar.bz2 |
Add camera focus area API.
The API are still hidden.
bug:3475893
Change-Id: I92405c9e332b7fb141788cda7ebc9705dd666c67
Diffstat (limited to 'include/camera')
-rw-r--r-- | include/camera/CameraParameters.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h index da2f049..7930f47 100644 --- a/include/camera/CameraParameters.h +++ b/include/camera/CameraParameters.h @@ -247,6 +247,44 @@ public: // Supported focus modes. // Example value: "auto,macro,fixed". Read only. static const char KEY_SUPPORTED_FOCUS_MODES[]; + // The maximum number of focus areas supported. This is the maximum length + // of KEY_FOCUS_AREAS. + // Example value: "0" or "2". Read only. + static const char KEY_MAX_NUM_FOCUS_AREAS[]; + // Current focus areas. + // + // Before accessing this parameter, apps should check + // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas + // first. If the value is 0, focus area is not supported. + // + // Each focus area is a five-element int array. The first four elements are + // the rectangle of the area (left, top, right, bottom). The direction is + // relative to the sensor orientation, that is, what the sensor sees. The + // direction is not affected by the rotation or mirroring of + // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000. + // (-1000,-1000) is the upper left point. (1000, 1000) is the lower right + // point. The length and width of focus areas cannot be 0 or negative. + // + // The fifth element is the weight. The weight ranges from 1 to 1000. + // The sum of the weights of all focus areas must be 1000. Focus areas + // can partially overlap and the driver will add the weights in the + // overlap region. But apps should not set two focus areas that have + // identical coordinates. + // + // A special case of single focus area (0,0,0,0,0) means driver to decide + // the focus area. For example, the driver may use more signals to decide + // focus areas and change them dynamically. Apps can set (0,0,0,0,0) if they + // want the driver to decide focus areas. + // + // Focus areas are relative to the current field of view (KEY_ZOOM). No + // matter what the zoom level is, (-1000,-1000) represents the top of the + // currently visible camera frame. The focus area cannot be set to be + // outside the current field of view, even when using zoom. + // + // Focus area only has effect if the current focus mode is FOCUS_MODE_AUTO, + // FOCUS_MODE_MACRO, or FOCUS_MODE_CONTINOUS_VIDEO. + // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write. + static const char KEY_FOCUS_AREAS[]; // Focal length in millimeter. // Example value: "4.31". Read only. static const char KEY_FOCAL_LENGTH[]; |