summaryrefslogtreecommitdiffstats
path: root/camera/OMXCameraAdapter
diff options
context:
space:
mode:
authorVladimir Petrov <vppetrov@mm-sol.com>2012-08-31 16:38:53 +0300
committerDaniel Levin <dendy@ti.com>2012-10-10 18:55:50 +0300
commit5a1fc91d12042c7ccd09008cb264b40c89634230 (patch)
treef7441b30e5fb9468f48d8017897af8d8cfea23d7 /camera/OMXCameraAdapter
parentd1a14398a131dfb6463e787d033bfad905da0c1f (diff)
downloadhardware_ti_omap4-5a1fc91d12042c7ccd09008cb264b40c89634230.zip
hardware_ti_omap4-5a1fc91d12042c7ccd09008cb264b40c89634230.tar.gz
hardware_ti_omap4-5a1fc91d12042c7ccd09008cb264b40c89634230.tar.bz2
CameraHal: Reset shot config queue in stop image capture
- Adding code to reset shot config queue when stopping image capture permanently. Change-Id: I037268613d4c48bf6bdc4f98d33b98bea59f8551 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r--camera/OMXCameraAdapter/OMXCapture.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp
index 1857781..ac799a6 100644
--- a/camera/OMXCameraAdapter/OMXCapture.cpp
+++ b/camera/OMXCameraAdapter/OMXCapture.cpp
@@ -1388,6 +1388,23 @@ status_t OMXCameraAdapter::stopImageCapture()
}
mStartCaptureSem.Create(0);
}
+ } else if (CP_CAM == mCapMode) {
+ // Reset shot config queue
+ OMX_TI_CONFIG_ENQUEUESHOTCONFIGS resetShotConfigs;
+ OMX_INIT_STRUCT_PTR(&resetShotConfigs, OMX_TI_CONFIG_ENQUEUESHOTCONFIGS);
+
+ resetShotConfigs.nPortIndex = mCameraAdapterParameters.mImagePortIndex;
+ resetShotConfigs.bFlushQueue = OMX_TRUE;
+ resetShotConfigs.nNumConfigs = 0;
+ eError = OMX_SetConfig(mCameraAdapterParameters.mHandleComp,
+ ( OMX_INDEXTYPE ) OMX_TI_IndexConfigEnqueueShotConfigs,
+ &resetShotConfigs);
+ if ( OMX_ErrorNone != eError ) {
+ CAMHAL_LOGEB("Error while reset shot config 0x%x", eError);
+ goto EXIT;
+ } else {
+ CAMHAL_LOGDA("Shot config reset successfully");
+ }
}
//Wait here for the capture to be done, in worst case timeout and proceed with cleanup