diff options
author | James Dong <jdong@google.com> | 2010-11-29 16:51:55 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-11-30 22:28:27 -0800 |
commit | 4ddca9baccad95eb884114ce11723c07372286e2 (patch) | |
tree | 64f805bee71f09a5e10ba1c851477432a90c2eea /libs | |
parent | 0b44476a23660baabc1984c2fa8ee2c0c114460b (diff) | |
download | frameworks_base-4ddca9baccad95eb884114ce11723c07372286e2.zip frameworks_base-4ddca9baccad95eb884114ce11723c07372286e2.tar.gz frameworks_base-4ddca9baccad95eb884114ce11723c07372286e2.tar.bz2 |
Add preferred preview size support in the camera framework
bug - 3237021
Change-Id: Ica8a3ae5cfbee462b74de98770e33277186c9a2b
Diffstat (limited to 'libs')
-rw-r--r-- | libs/camera/CameraParameters.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/camera/CameraParameters.cpp b/libs/camera/CameraParameters.cpp index 45b1b9a..e9a5f8c 100644 --- a/libs/camera/CameraParameters.cpp +++ b/libs/camera/CameraParameters.cpp @@ -75,6 +75,7 @@ const char CameraParameters::KEY_FOCUS_DISTANCES[] = "focus-distances"; const char CameraParameters::KEY_VIDEO_FRAME_FORMAT[] = "video-frame-format"; const char CameraParameters::KEY_VIDEO_SIZE[] = "video-size"; 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::TRUE[] = "true"; const char CameraParameters::FOCUS_DISTANCE_INFINITY[] = "Infinity"; @@ -333,6 +334,14 @@ void CameraParameters::getPreviewSize(int *width, int *height) const parse_pair(p, width, height, 'x'); } +void CameraParameters::getPreferredPreviewSizeForVideo(int *width, int *height) const +{ + *width = *height = -1; + const char *p = get(KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO); + if (p == 0) return; + parse_pair(p, width, height, 'x'); +} + void CameraParameters::getSupportedPreviewSizes(Vector<Size> &sizes) const { const char *previewSizesStr = get(KEY_SUPPORTED_PREVIEW_SIZES); |