From: Wu-cheng Li Date: Tue, 16 Aug 2011 13:14:16 +0000 (+0800) Subject: Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE. X-Git-Tag: android-x86-4.4-r1~1579^2~575^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ab3f1388c71aed957f94ddab976faa77ab77e67f;p=android-x86%2Fframeworks-av.git Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE. The API is still hidden. bug:5086125 Change-Id: I69268a95ad6aae249771d3a8dfb423ffe2d87081 --- diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index 51b96c1fe9..0eb5d50db2 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -160,6 +160,7 @@ const char CameraParameters::FOCUS_MODE_MACRO[] = "macro"; const char CameraParameters::FOCUS_MODE_FIXED[] = "fixed"; const char CameraParameters::FOCUS_MODE_EDOF[] = "edof"; const char CameraParameters::FOCUS_MODE_CONTINUOUS_VIDEO[] = "continuous-video"; +const char CameraParameters::FOCUS_MODE_CONTINUOUS_PICTURE[] = "continuous-picture"; CameraParameters::CameraParameters() : mMap() diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h index b6614965b0..6c91dfc724 100644 --- a/include/camera/CameraParameters.h +++ b/include/camera/CameraParameters.h @@ -597,13 +597,24 @@ public: // CameraHardwareInterface.autoFocus in this mode. static const char FOCUS_MODE_EDOF[]; // Continuous auto focus mode intended for video recording. The camera - // continuously tries to focus. This is ideal for shooting video. - // Applications still can call CameraHardwareInterface.takePicture in this - // mode but the subject may not be in focus. Auto focus starts when the - // parameter is set. Applications should not call - // CameraHardwareInterface.autoFocus in this mode. To stop continuous focus, - // applications should change the focus mode to other modes. + // continuously tries to focus. This is the best choice for video + // recording because the focus changes smoothly . Applications still can + // call CameraHardwareInterface.takePicture in this mode but the subject may + // not be in focus. Auto focus starts when the parameter is set. + // Applications should not call CameraHardwareInterface.autoFocus in this + // mode. To stop continuous focus, applications should change the focus mode + // to other modes. static const char FOCUS_MODE_CONTINUOUS_VIDEO[]; + // Continuous auto focus mode intended for taking pictures. The camera + // continuously tries to focus. The speed of focus change is more aggressive + // than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is + // set. If applications call autoFocus in this mode, the focus callback will + // immediately return with a boolean that indicates the focus is sharp or + // not. The apps can then decide if they want to take a picture immediately + // or to change the focus mode to auto, and run a full autofocus cycle. To + // stop continuous focus, applications should change the focus mode to other + // modes. + static const char FOCUS_MODE_CONTINUOUS_PICTURE[]; private: DefaultKeyedVector mMap;