From 1cab31a45d9455a7b5a25c0deb447c455be4a178 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Mon, 5 Nov 2012 10:33:55 -0800 Subject: [PATCH] Camera: Document new video snapshot picture size behavior. On some devices, video snapshot may return pictures that are smaller than requested. Make that clear. Bug: 7475089 Change-Id: I0bd759072a7f954e517f3d09cb676fb23f863912 --- core/java/android/hardware/Camera.java | 34 ++++++++++++++------------ 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 6624eb85f1db1..a30077641f2cc 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -3495,25 +3495,29 @@ public class Camera { } /** - * Returns true if video snapshot is supported. That is, applications + *

Returns true if video snapshot is supported. That is, applications * can call {@link #takePicture(Camera.ShutterCallback, - * Camera.PictureCallback, Camera.PictureCallback, Camera.PictureCallback)} - * during recording. Applications do not need to call {@link - * #startPreview()} after taking a picture. The preview will be still - * active. Other than that, taking a picture during recording is - * identical to taking a picture normally. All settings and methods - * related to takePicture work identically. Ex: {@link - * #getPictureSize()}, {@link #getSupportedPictureSizes()}, {@link - * #setJpegQuality(int)}, {@link #setRotation(int)}, and etc. The - * picture will have an EXIF header. {@link #FLASH_MODE_AUTO} and {@link - * #FLASH_MODE_ON} also still work, but the video will record the flash. + * Camera.PictureCallback, Camera.PictureCallback, + * Camera.PictureCallback)} during recording. Applications do not need + * to call {@link #startPreview()} after taking a picture. The preview + * will be still active. Other than that, taking a picture during + * recording is identical to taking a picture normally. All settings and + * methods related to takePicture work identically. Ex: + * {@link #getPictureSize()}, {@link #getSupportedPictureSizes()}, + * {@link #setJpegQuality(int)}, {@link #setRotation(int)}, and etc. The + * picture will have an EXIF header. {@link #FLASH_MODE_AUTO} and + * {@link #FLASH_MODE_ON} also still work, but the video will record the + * flash.

* - * Applications can set shutter callback as null to avoid the shutter + *

Applications can set shutter callback as null to avoid the shutter * sound. It is also recommended to set raw picture and post view - * callbacks to null to avoid the interrupt of preview display. + * callbacks to null to avoid the interrupt of preview display.

* - * Field-of-view of the recorded video may be different from that of the - * captured pictures. + *

Field-of-view of the recorded video may be different from that of the + * captured pictures. The maximum size of a video snapshot may be + * smaller than that for regular still captures. If the current picture + * size is set higher than can be supported by video snapshot, the + * picture will be captured at the maximum supported size instead.

* * @return true if video snapshot is supported. */