Loading core/java/android/hardware/Camera.java +32 −0 Original line number Diff line number Diff line Loading @@ -1471,6 +1471,7 @@ public class Camera { "preferred-preview-size-for-video"; 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"; // Parameter key suffix for supported values. private static final String SUPPORTED_VALUES_SUFFIX = "-values"; Loading Loading @@ -3172,6 +3173,37 @@ public class Camera { throw new IllegalArgumentException("Invalid face detection type " + type); } /** * Sets the hint of the recording mode. If this is true, {@link * android.media.MediaRecorder#start()} may be faster or has less * glitches. This should be called before starting the preview for the * best result. But it is allowed to change the hint while the preview * is active. The default value is false. * * The apps can still call {@link #takePicture(Camera.ShutterCallback, * Camera.PictureCallback, Camera.PictureCallback, Camera.PictureCallback)} * when the hint is true. The apps can call MediaRecorder.start() when * the hint is false. But the performance may be worse. * * @param hint true if the apps intend to record a video using * {@link android.media.MediaRecorder}. * @hide */ public void setRecordingHint(boolean hint) { set(KEY_RECORDING_HINT, hint ? TRUE : FALSE); } /** * Gets the current recording hint. * * @return the current recording hint state. * @see #setRecordingHint(boolean) * @hide */ public boolean getRecordingHint() { return TRUE.equals(get(KEY_RECORDING_HINT)); } // 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) { Loading include/camera/CameraParameters.h +11 −0 Original line number Diff line number Diff line Loading @@ -484,6 +484,17 @@ public: // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only. static const char KEY_VIDEO_FRAME_FORMAT[]; // Sets the hint of the recording mode. If this is true, MediaRecorder.start // may be faster or has less glitches. This should be called before starting // the preview for the best result. But it is allowed to change the hint // while the preview is active. The default value is false. // // The apps can still call Camera.takePicture when the hint is true. The // apps can call MediaRecorder.start when the hint is false. But the // performance may be worse. // Example value: "true" or "false". Read/write. static const char KEY_RECORDING_HINT[]; // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED. static const char TRUE[]; static const char FALSE[]; Loading libs/camera/CameraParameters.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ const char CameraParameters::KEY_SUPPORTED_VIDEO_SIZES[] = "video-size-values"; const char CameraParameters::KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[] = "preferred-preview-size-for-video"; const char CameraParameters::KEY_MAX_NUM_DETECTED_FACES_HW[] = "max-num-detected-faces-hw"; const char CameraParameters::KEY_MAX_NUM_DETECTED_FACES_SW[] = "max-num-detected-faces-sw"; const char CameraParameters::KEY_RECORDING_HINT[] = "recording-hint"; const char CameraParameters::TRUE[] = "true"; const char CameraParameters::FALSE[] = "false"; Loading Loading
core/java/android/hardware/Camera.java +32 −0 Original line number Diff line number Diff line Loading @@ -1471,6 +1471,7 @@ public class Camera { "preferred-preview-size-for-video"; 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"; // Parameter key suffix for supported values. private static final String SUPPORTED_VALUES_SUFFIX = "-values"; Loading Loading @@ -3172,6 +3173,37 @@ public class Camera { throw new IllegalArgumentException("Invalid face detection type " + type); } /** * Sets the hint of the recording mode. If this is true, {@link * android.media.MediaRecorder#start()} may be faster or has less * glitches. This should be called before starting the preview for the * best result. But it is allowed to change the hint while the preview * is active. The default value is false. * * The apps can still call {@link #takePicture(Camera.ShutterCallback, * Camera.PictureCallback, Camera.PictureCallback, Camera.PictureCallback)} * when the hint is true. The apps can call MediaRecorder.start() when * the hint is false. But the performance may be worse. * * @param hint true if the apps intend to record a video using * {@link android.media.MediaRecorder}. * @hide */ public void setRecordingHint(boolean hint) { set(KEY_RECORDING_HINT, hint ? TRUE : FALSE); } /** * Gets the current recording hint. * * @return the current recording hint state. * @see #setRecordingHint(boolean) * @hide */ public boolean getRecordingHint() { return TRUE.equals(get(KEY_RECORDING_HINT)); } // 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) { Loading
include/camera/CameraParameters.h +11 −0 Original line number Diff line number Diff line Loading @@ -484,6 +484,17 @@ public: // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only. static const char KEY_VIDEO_FRAME_FORMAT[]; // Sets the hint of the recording mode. If this is true, MediaRecorder.start // may be faster or has less glitches. This should be called before starting // the preview for the best result. But it is allowed to change the hint // while the preview is active. The default value is false. // // The apps can still call Camera.takePicture when the hint is true. The // apps can call MediaRecorder.start when the hint is false. But the // performance may be worse. // Example value: "true" or "false". Read/write. static const char KEY_RECORDING_HINT[]; // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED. static const char TRUE[]; static const char FALSE[]; Loading
libs/camera/CameraParameters.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ const char CameraParameters::KEY_SUPPORTED_VIDEO_SIZES[] = "video-size-values"; const char CameraParameters::KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[] = "preferred-preview-size-for-video"; const char CameraParameters::KEY_MAX_NUM_DETECTED_FACES_HW[] = "max-num-detected-faces-hw"; const char CameraParameters::KEY_MAX_NUM_DETECTED_FACES_SW[] = "max-num-detected-faces-sw"; const char CameraParameters::KEY_RECORDING_HINT[] = "recording-hint"; const char CameraParameters::TRUE[] = "true"; const char CameraParameters::FALSE[] = "false"; Loading