diff options
author | tbalden <illespal@gmail.com> | 2013-03-23 23:06:45 +0100 |
---|---|---|
committer | tbalden <illespal@gmail.com> | 2013-04-14 11:01:38 +0200 |
commit | ff2064e7dcad3c85005fc4564e04fde184240df9 (patch) | |
tree | 52dd63087c9954b038196439420e91c843dcab8c /camera/CameraParameters.cpp | |
parent | 203e28ca88001f2a0f4db7a3018977c687333941 (diff) | |
download | frameworks_av-ff2064e7dcad3c85005fc4564e04fde184240df9.zip frameworks_av-ff2064e7dcad3c85005fc4564e04fde184240df9.tar.gz frameworks_av-ff2064e7dcad3c85005fc4564e04fde184240df9.tar.bz2 |
Camera: QCOM legacy definitions,HTC cam switch,NO_UPDATE_PREVIEW
Updating Camera parameters, and service with several
compatibility patches:
1., QCOM legacy CameraParameters and functions:
Adding these will make ICS qcomm camera blobs work on JB 4.2.
Use BOARD_USES_QCOM_LEGACY_CAM_PARAMS := true in BoardConfig
to use this.
Also fixes the problem of legacy qcom
camera blobs with recent libcameraservice QCOM_HARDWARE changes,
where the orientation is messed up on first
preview: the fix is leaving out setPreviewWindow(window) for
legacy qcomm cam blobs.
2., Also adding NO_UPDATE_PREVIEW flag for legacy purposes.
3., Adding adding the set orientation patch:
Always set buffers orientation when setting the qcom camera preview window
Fixes the rotated preview on TouchPad
https://github.com/CyanogenMod/android_frameworks_base/commit/1a8e41a3c7434737db89b604352575f8b3109e7a
4., camera: Full support for HTC camera switch
5., Adding more parameters for HTC Explorer
Change-Id: I2bfc72b8ef027665356788f1db7f96b31d037dbe
Diffstat (limited to 'camera/CameraParameters.cpp')
-rw-r--r-- | camera/CameraParameters.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index f41be22..eedf8f4 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -40,6 +40,28 @@ const char CameraParameters::KEY_PREVIEW_FRAME_RATE_MODE[] = "preview-frame-rate const char CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[] = "preview-frame-rate-modes"; const char CameraParameters::KEY_PREVIEW_FRAME_RATE_AUTO_MODE[] = "frame-rate-auto"; const char CameraParameters::KEY_PREVIEW_FRAME_RATE_FIXED_MODE[] = "frame-rate-fixed"; +#ifdef QCOM_LEGACY_CAM_PARAMS +//Values for Continuous AF +const char CameraParameters::CAF_OFF[] = "caf-off"; +const char CameraParameters::CAF_ON[] = "caf-on"; +//Same, for CodeAurora-based blobs +const char CameraParameters::CAPTURE_MODE_NORMAL[] = "normal"; +const char CameraParameters::CAPTURE_MODE_BURST[] = "burst"; +const char CameraParameters::CAPTURE_MODE_CONTI_BURST[] = "contiburst"; +const char CameraParameters::CAPTURE_MODE_HDR[] = "hdr"; +const char CameraParameters::CAPTURE_MODE_HJR[] = "hjr"; +const char CameraParameters::CAPTURE_MODE_PANORAMA[] = "panorama"; +const char CameraParameters::CONTINUOUS_AF_OFF[] = "caf-off"; +const char CameraParameters::CONTINUOUS_AF_ON[] = "caf-on"; +const char CameraParameters::KEY_CONTINUOUS_AF[] = "continuous-af"; +const char CameraParameters::KEY_CAF[] = "continuous-af"; +const char CameraParameters::KEY_CAPTURE_MODE[] = "capture-mode"; +const char CameraParameters::KEY_PICTURE_COUNT[] = "picture-count"; +const char CameraParameters::KEY_MAX_BURST_PICTURE_COUNT[] = "max-burst-picture-count"; +const char CameraParameters::KEY_SUPPORTED_CONTINUOUS_AF[] = "continuous-af-mode"; +const char CameraParameters::KEY_SUPPORTED_CAF[] = "continuous-af-values"; +const char CameraParameters::KEY_SUPPORTED_CAPTURE_MODES[] = "capture-mode-values"; +#endif #endif const char CameraParameters::KEY_PICTURE_SIZE[] = "picture-size"; const char CameraParameters::KEY_SUPPORTED_PICTURE_SIZES[] = "picture-size-values"; @@ -266,6 +288,9 @@ 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"; #if defined(QCOM_HARDWARE) +#ifdef QCOM_LEGACY_CAM_PARAMS +const char CameraParameters::FOCUS_MODE_CONTINUOUS_CAMERA[] = "continuous-camera"; +#endif const char CameraParameters::FOCUS_MODE_NORMAL[] = "normal"; @@ -309,11 +334,26 @@ const char CameraParameters::SKIN_TONE_ENHANCEMENT_ENABLE[] = "enable"; const char CameraParameters::SKIN_TONE_ENHANCEMENT_DISABLE[] = "disable"; const char CameraParameters::KEY_SHARPNESS[] = "sharpness"; +#ifdef QCOM_LEGACY_CAM_PARAMS +const char CameraParameters::KEY_MAX_SHARPNESS[] = "sharpness-max"; +const char CameraParameters::KEY_MIN_SHARPNESS[] = "sharpness-min"; +#else const char CameraParameters::KEY_MAX_SHARPNESS[] = "max-sharpness"; +#endif const char CameraParameters::KEY_CONTRAST[] = "contrast"; +#ifdef QCOM_LEGACY_CAM_PARAMS +const char CameraParameters::KEY_MAX_CONTRAST[] = "contrast-max"; +const char CameraParameters::KEY_MIN_CONTRAST[] = "contrast-min"; +#else const char CameraParameters::KEY_MAX_CONTRAST[] = "max-contrast"; +#endif const char CameraParameters::KEY_SATURATION[] = "saturation"; +#ifdef QCOM_LEGACY_CAM_PARAMS +const char CameraParameters::KEY_MAX_SATURATION[] = "saturation-max"; +const char CameraParameters::KEY_MIN_SATURATION[] = "saturation-min"; +#else const char CameraParameters::KEY_MAX_SATURATION[] = "max-saturation"; +#endif //Values for DENOISE const char CameraParameters::DENOISE_OFF[] = "denoise-off"; @@ -613,6 +653,13 @@ void CameraParameters::getSupportedPreviewSizes(Vector<Size> &sizes) const } #ifdef QCOM_HARDWARE +#ifdef QCOM_LEGACY_CAM_PARAMS +void CameraParameters::setPostviewSize(int width, int height) +{ + // dummy +} +#endif + void CameraParameters::getSupportedHfrSizes(Vector<Size> &sizes) const { const char *hfrSizesStr = get(KEY_SUPPORTED_HFR_SIZES); |