summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
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 [];