Merge "Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE."
This commit is contained in:
@@ -1613,17 +1613,34 @@ public class Camera {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Continuous auto focus mode intended for video recording. The camera
|
* Continuous auto focus mode intended for video recording. The camera
|
||||||
* continuously tries to focus. This is ideal for shooting video.
|
* continuously tries to focus. This is the best choice for video
|
||||||
* Applications still can call {@link
|
* recording because the focus changes smoothly . Applications still can
|
||||||
* #takePicture(Camera.ShutterCallback, Camera.PictureCallback,
|
* call {@link #takePicture(Camera.ShutterCallback,
|
||||||
* Camera.PictureCallback)} in this mode but the subject may not be in
|
* Camera.PictureCallback, Camera.PictureCallback)} in this mode but the
|
||||||
* focus. Auto focus starts when the parameter is set. Applications
|
* subject may not be in focus. Auto focus starts when the parameter is
|
||||||
* should not call {@link #autoFocus(AutoFocusCallback)} in this mode.
|
* set. Applications should not call {@link
|
||||||
* To stop continuous focus, applications should change the focus mode
|
* #autoFocus(AutoFocusCallback)} in this mode. To stop continuous
|
||||||
* to other modes.
|
* focus, applications should change the focus mode to other modes.
|
||||||
*/
|
*/
|
||||||
public static final String FOCUS_MODE_CONTINUOUS_VIDEO = "continuous-video";
|
public static final String FOCUS_MODE_CONTINUOUS_VIDEO = "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 {@link #FOCUS_MODE_CONTINUOUS_VIDEO}. Auto focus
|
||||||
|
* starts when the parameter is set. If applications call {@link
|
||||||
|
* #autoFocus(AutoFocusCallback)} in this mode, the focus callback will
|
||||||
|
* immediately return with a boolean that indicates whether 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.
|
||||||
|
*
|
||||||
|
* @see #FOCUS_MODE_CONTINUOUS_VIDEO
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final String FOCUS_MODE_CONTINUOUS_PICTURE = "continuous-picture";
|
||||||
|
|
||||||
// Indices for focus distance array.
|
// Indices for focus distance array.
|
||||||
/**
|
/**
|
||||||
* The array index of near focus distance for use with
|
* The array index of near focus distance for use with
|
||||||
|
|||||||
@@ -597,13 +597,24 @@ public:
|
|||||||
// CameraHardwareInterface.autoFocus in this mode.
|
// CameraHardwareInterface.autoFocus in this mode.
|
||||||
static const char FOCUS_MODE_EDOF[];
|
static const char FOCUS_MODE_EDOF[];
|
||||||
// Continuous auto focus mode intended for video recording. The camera
|
// Continuous auto focus mode intended for video recording. The camera
|
||||||
// continuously tries to focus. This is ideal for shooting video.
|
// continuously tries to focus. This is the best choice for video
|
||||||
// Applications still can call CameraHardwareInterface.takePicture in this
|
// recording because the focus changes smoothly . Applications still can
|
||||||
// mode but the subject may not be in focus. Auto focus starts when the
|
// call CameraHardwareInterface.takePicture in this mode but the subject may
|
||||||
// parameter is set. Applications should not call
|
// not be in focus. Auto focus starts when the parameter is set.
|
||||||
// CameraHardwareInterface.autoFocus in this mode. To stop continuous focus,
|
// Applications should not call CameraHardwareInterface.autoFocus in this
|
||||||
// applications should change the focus mode to other modes.
|
// mode. To stop continuous focus, applications should change the focus mode
|
||||||
|
// to other modes.
|
||||||
static const char FOCUS_MODE_CONTINUOUS_VIDEO[];
|
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:
|
private:
|
||||||
DefaultKeyedVector<String8,String8> mMap;
|
DefaultKeyedVector<String8,String8> mMap;
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ const char CameraParameters::FOCUS_MODE_MACRO[] = "macro";
|
|||||||
const char CameraParameters::FOCUS_MODE_FIXED[] = "fixed";
|
const char CameraParameters::FOCUS_MODE_FIXED[] = "fixed";
|
||||||
const char CameraParameters::FOCUS_MODE_EDOF[] = "edof";
|
const char CameraParameters::FOCUS_MODE_EDOF[] = "edof";
|
||||||
const char CameraParameters::FOCUS_MODE_CONTINUOUS_VIDEO[] = "continuous-video";
|
const char CameraParameters::FOCUS_MODE_CONTINUOUS_VIDEO[] = "continuous-video";
|
||||||
|
const char CameraParameters::FOCUS_MODE_CONTINUOUS_PICTURE[] = "continuous-picture";
|
||||||
|
|
||||||
CameraParameters::CameraParameters()
|
CameraParameters::CameraParameters()
|
||||||
: mMap()
|
: mMap()
|
||||||
|
|||||||
Reference in New Issue
Block a user