summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorAkwasi Boateng <akwasi.boateng@ti.com>2011-09-22 21:21:17 -0500
committerIliyan Malchev <malchev@google.com>2011-09-23 14:36:23 -0700
commit4c4169e406900fbed4d164c532c15c4853b91f3f (patch)
treedb44ea6deaf28304eee8e0651922e1d0bf55cb49 /camera
parent0211158c06750fb68cb56bbe65ba82796b7d8d32 (diff)
downloadhardware_ti_omap4-4c4169e406900fbed4d164c532c15c4853b91f3f.zip
hardware_ti_omap4-4c4169e406900fbed4d164c532c15c4853b91f3f.tar.gz
hardware_ti_omap4-4c4169e406900fbed4d164c532c15c4853b91f3f.tar.bz2
Make previous zoom index a member variable
Change previous zoom index variable from static to member variable since variable is not reset when application is closed or during suspend resume. Change-Id: I7a757655dc7e5b30d21716dd38908f3d18131cde Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
Diffstat (limited to 'camera')
-rw-r--r--camera/OMXCameraAdapter/OMXCameraAdapter.cpp1
-rw-r--r--camera/OMXCameraAdapter/OMXZoom.cpp5
-rw-r--r--camera/inc/OMXCameraAdapter/OMXCameraAdapter.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index 25d0089..9949e99 100644
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -243,6 +243,7 @@ status_t OMXCameraAdapter::initialize(CameraProperties::Properties* caps, int se
mPictureQuality = 100;
mCurrentZoomIdx = 0;
mTargetZoomIdx = 0;
+ mPreviousZoomIndx = 0;
mReturnZoomStatus = false;
mZoomInc = 1;
mZoomParameterIdx = 0;
diff --git a/camera/OMXCameraAdapter/OMXZoom.cpp b/camera/OMXCameraAdapter/OMXZoom.cpp
index 4e24d89..4ba44cf 100644
--- a/camera/OMXCameraAdapter/OMXZoom.cpp
+++ b/camera/OMXCameraAdapter/OMXZoom.cpp
@@ -83,7 +83,6 @@ status_t OMXCameraAdapter::doZoom(int index)
status_t ret = NO_ERROR;
OMX_ERRORTYPE eError = OMX_ErrorNone;
OMX_CONFIG_SCALEFACTORTYPE zoomControl;
- static int prevIndex = 0;
LOG_FUNCTION_NAME;
@@ -99,7 +98,7 @@ status_t OMXCameraAdapter::doZoom(int index)
ret = -EINVAL;
}
- if ( prevIndex == index )
+ if (mPreviousZoomIndx == index )
{
return NO_ERROR;
}
@@ -122,7 +121,7 @@ status_t OMXCameraAdapter::doZoom(int index)
else
{
CAMHAL_LOGDA("Digital zoom applied successfully");
- prevIndex = index;
+ mPreviousZoomIndx = index;
}
}
diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
index e6921ed..06d7d73 100644
--- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
+++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
@@ -792,7 +792,7 @@ private:
//current zoom
Mutex mZoomLock;
- unsigned int mCurrentZoomIdx, mTargetZoomIdx;
+ unsigned int mCurrentZoomIdx, mTargetZoomIdx, mPreviousZoomIndx;
int mZoomInc;
bool mReturnZoomStatus;
static const int32_t ZOOM_STEPS [];