diff options
author | Tyler Luu <tluu@ti.com> | 2012-06-21 09:50:20 -0500 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-26 20:09:16 +0200 |
commit | 7f483836fab38c86abd3fd9ee5d996ac99379674 (patch) | |
tree | 270ec041e9fe459a9a60584ef15bbc9b7b61cb8d /camera | |
parent | f1340200e44a8a049233fdff3b1cb039dd62535c (diff) | |
download | hardware_ti_omap4-7f483836fab38c86abd3fd9ee5d996ac99379674.zip hardware_ti_omap4-7f483836fab38c86abd3fd9ee5d996ac99379674.tar.gz hardware_ti_omap4-7f483836fab38c86abd3fd9ee5d996ac99379674.tar.bz2 |
CameraHal: Change state machine flow for queuing shots
- Instead of having to have CameraHal deal with logic to
queue shots, move the code flow to state machine and
respective camera adapters, so they can interally handle it.
Now call flow for queuing shots and regular capture
should be the same from CameraHal perspective.
Change-Id: I9a74008aeaabc8dd169c78f6a85201f50580d25c
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
Diffstat (limited to 'camera')
-rw-r--r-- | camera/BaseCameraAdapter.cpp | 13 | ||||
-rw-r--r-- | camera/CameraHal.cpp | 15 |
2 files changed, 12 insertions, 16 deletions
diff --git a/camera/BaseCameraAdapter.cpp b/camera/BaseCameraAdapter.cpp index 06ab313..d40ef61 100644 --- a/camera/BaseCameraAdapter.cpp +++ b/camera/BaseCameraAdapter.cpp @@ -2118,6 +2118,7 @@ status_t BaseCameraAdapter::setState(CameraCommands operation) mNextState = PREVIEW_STATE; break; + case CAMERA_QUERY_BUFFER_SIZE_IMAGE_CAPTURE: case CAMERA_START_IMAGE_CAPTURE: CAMHAL_LOGDB("Adapter state switch CAPTURE_STATE->CAPTURE_STATE event = %s", printState); @@ -2426,13 +2427,23 @@ status_t BaseCameraAdapter::setState(CameraCommands operation) printState); mNextState = PREVIEW_STATE; break; + case CAMERA_QUERY_BUFFER_SIZE_IMAGE_CAPTURE: case CAMERA_START_IMAGE_CAPTURE: - case CAMERA_USE_BUFFERS_REPROCESS: CAMHAL_LOGDB("Adapter state switch REPROCESS_STATE->REPROCESS_STATE event = %s", printState); mNextState = REPROCESS_STATE; break; + case CAMERA_USE_BUFFERS_REPROCESS: + CAMHAL_LOGDB("Adapter state switch REPROCESS_STATE->REPROCESS_STATE event = %s", + printState); + mNextState = LOADED_REPROCESS_STATE; + break; + case CAMERA_USE_BUFFERS_IMAGE_CAPTURE: + CAMHAL_LOGDB("Adapter state switch REPROCESS_STATE->LOADED_CAPTURE_STATE event = %s", + printState); + mNextState = LOADED_CAPTURE_STATE; + break; default: CAMHAL_LOGEB("Adapter state switch REPROCESS_STATE Invalid Op! event = %s", printState); diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index 15966e3..bfb90db 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -3288,21 +3288,6 @@ status_t CameraHal::__takePicture(const char *params) // when we remove legacy TI parameters implementation } - // if we are already in the middle of a capture...then we just need - // setParameters and start image capture to queue more shots - if (((mCameraAdapter->getState() & CameraAdapter::CAPTURE_STATE) == - CameraAdapter::CAPTURE_STATE) && - (mCameraAdapter->getNextState() != CameraAdapter::PREVIEW_STATE)) { -#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS - //pass capture timestamp along with the camera adapter command - ret = mCameraAdapter->sendCommand(CameraAdapter::CAMERA_START_IMAGE_CAPTURE, - (int) &mStartCapture); -#else - ret = mCameraAdapter->sendCommand(CameraAdapter::CAMERA_START_IMAGE_CAPTURE); -#endif - return ret; - } - if ( !mBracketingRunning ) { // if application didn't set burst through android::ShotParameters |