diff options
author | Daniel Levin <dendy@ti.com> | 2012-07-25 17:13:42 -0500 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-07-25 17:13:42 -0500 |
commit | a091b6939383ea4ca54313836fd9466de94efc3d (patch) | |
tree | 2fca36b23958513414e4b8009ff5c187926db740 /camera | |
parent | b8052bdcd252f61fc16f6389b6974301735ec91c (diff) | |
parent | 65aba9a1d72ab541447ecc27236433e1ef7b9a8c (diff) | |
download | hardware_ti_omap4-a091b6939383ea4ca54313836fd9466de94efc3d.zip hardware_ti_omap4-a091b6939383ea4ca54313836fd9466de94efc3d.tar.gz hardware_ti_omap4-a091b6939383ea4ca54313836fd9466de94efc3d.tar.bz2 |
Merge "CameraHal: Avoids possible race conditions while accessing 'mParams'" into jb-migration
Change-Id: I73dd1771bc16aa80f02a271a7d284dda07e0d0e0
Signed-off-by: Daniel Levin <dendy@ti.com>
Diffstat (limited to 'camera')
-rw-r--r-- | camera/OMXCameraAdapter/OMXAlgo.cpp | 7 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXCameraAdapter.cpp | 14 | ||||
-rw-r--r-- | camera/inc/OMXCameraAdapter/OMXCameraAdapter.h | 5 |
3 files changed, 26 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXAlgo.cpp b/camera/OMXCameraAdapter/OMXAlgo.cpp index 9765f68..312f0f8 100644 --- a/camera/OMXCameraAdapter/OMXAlgo.cpp +++ b/camera/OMXCameraAdapter/OMXAlgo.cpp @@ -673,6 +673,13 @@ status_t OMXCameraAdapter::setCaptureMode(OMXCameraAdapter::CaptureMode mode) const char* valstr = NULL; CAMHAL_LOGDA("Camera mode: HIGH QUALITY_ZSL"); camMode.eCamOperatingMode = OMX_TI_CaptureImageProfileZeroShutterLag; + +#ifdef CAMERAHAL_TUNA + if ( !mIternalRecordingHint ) { + zslHistoryLen.nHistoryLen = 5; + } +#endif + } else if( OMXCameraAdapter::VIDEO_MODE == mode ) { diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp index 710c16a..afe0068 100644 --- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp +++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp @@ -228,6 +228,11 @@ status_t OMXCameraAdapter::initialize(CameraProperties::Properties* caps) mSensorOverclock = false; mAutoConv = OMX_TI_AutoConvergenceModeMax; mManualConv = 0; + +#ifdef CAMERAHAL_TUNA + mIternalRecordingHint = false; +#endif + mDeviceOrientation = 0; mCapabilities = caps; mZoomUpdating = false; @@ -644,6 +649,15 @@ status_t OMXCameraAdapter::setParameters(const android::CameraParameters ¶ms mOMXStateSwitch = true; } +#ifdef CAMERAHAL_TUNA + valstr = params.get(TICameraParameters::KEY_RECORDING_HINT); + if (!valstr || (valstr && (strcmp(valstr, android::CameraParameters::FALSE)))) { + mIternalRecordingHint = false; + } else { + mIternalRecordingHint = true; + } +#endif + #ifdef OMAP_ENHANCEMENT if ( (valstr = params.get(TICameraParameters::KEY_MEASUREMENT_ENABLE)) != NULL ) { diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h index 19aea6f..655dc72 100644 --- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h +++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h @@ -1105,6 +1105,11 @@ private: size_t mBracketingRange; int mCurrentZoomBracketing; android::CameraParameters mParameters; + +#ifdef CAMERAHAL_TUNA + bool mIternalRecordingHint; +#endif + bool mOmxInitialized; OMXCameraAdapterComponentContext mCameraAdapterParameters; bool mFirstTimeInit; |