diff options
author | Tyler Luu <tluu@ti.com> | 2012-06-25 12:19:57 -0500 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-26 20:09:16 +0200 |
commit | 7628ea29a242c677c8a55e5f88dd34b767a6f6d1 (patch) | |
tree | c6017025b033f84a1fabf90768ce236422f37fcf /camera | |
parent | 1887054f63d0cf9b15558442f1360b440eb03e86 (diff) | |
download | hardware_ti_omap4-7628ea29a242c677c8a55e5f88dd34b767a6f6d1.zip hardware_ti_omap4-7628ea29a242c677c8a55e5f88dd34b767a6f6d1.tar.gz hardware_ti_omap4-7628ea29a242c677c8a55e5f88dd34b767a6f6d1.tar.bz2 |
CameraHal: Fix back to back normal capture
- With new logic in startImageCapture we have to set the
buffer as IDLE before signaling end image capture.
Change-Id: Ica4d1c222f9ce5f3bef8ada7c3cb8e6ca306d8d5
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/OMXCameraAdapter/OMXCameraAdapter.cpp | 20 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXCapture.cpp | 9 |
2 files changed, 16 insertions, 13 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp index a763f66..2fbae19 100644 --- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp +++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp @@ -464,17 +464,6 @@ status_t OMXCameraAdapter::fillThisBuffer(CameraBuffer * frameBuf, CameraFrame:: isCaptureFrame = (CameraFrame::IMAGE_FRAME == frameType) || (CameraFrame::RAW_FRAME == frameType); - if ( isCaptureFrame && (NO_ERROR == ret) ) { - // In CP_CAM mode, end image capture will be signalled when application starts preview - if ((1 > mCapturedFrames) && !mBracketingEnabled && (mCapMode != CP_CAM)) { - // Signal end of image capture - if ( NULL != mEndImageCaptureCallback) { - mEndImageCaptureCallback(mEndCaptureData); - } - return NO_ERROR; - } - } - if ( NO_ERROR == ret ) { port = getPortParams(frameType); @@ -490,7 +479,14 @@ status_t OMXCameraAdapter::fillThisBuffer(CameraBuffer * frameBuf, CameraFrame:: if ((CameraBuffer *) port->mBufferHeader[i]->pAppPrivate == frameBuf) { if ( isCaptureFrame && !mBracketingEnabled ) { android::AutoMutex lock(mBurstLock); - if (mBurstFramesQueued >= mBurstFramesAccum) { + if ((1 > mCapturedFrames) && !mBracketingEnabled && (mCapMode != CP_CAM)) { + // Signal end of image capture + if ( NULL != mEndImageCaptureCallback) { + mEndImageCaptureCallback(mEndCaptureData); + } + port->mStatus[i] = OMXCameraPortParameters::IDLE; + return NO_ERROR; + } else if (mBurstFramesQueued >= mBurstFramesAccum) { port->mStatus[i] = OMXCameraPortParameters::IDLE; return NO_ERROR; } diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp index 0a62006..292eea5 100644 --- a/camera/OMXCameraAdapter/OMXCapture.cpp +++ b/camera/OMXCameraAdapter/OMXCapture.cpp @@ -1236,7 +1236,13 @@ status_t OMXCameraAdapter::startImageCapture(bool bracketing, CachedCaptureParam } } } - + CAMHAL_LOGD("mBurstFramesQueued = %d mBurstFramesAccum = %d index = %d " + "capData->mNumBufs = %d queued = %d capData->mMaxQueueable = %d", + mBurstFramesQueued,mBurstFramesAccum,index, + capData->mNumBufs,queued,capData->mMaxQueueable); + CAMHAL_LOGD("%d", (mBurstFramesQueued < mBurstFramesAccum) + && (index < capData->mNumBufs) + && (queued < capData->mMaxQueueable)); while ((mBurstFramesQueued < mBurstFramesAccum) && (index < capData->mNumBufs) && (queued < capData->mMaxQueueable)) { @@ -1250,6 +1256,7 @@ status_t OMXCameraAdapter::startImageCapture(bool bracketing, CachedCaptureParam mBurstFramesQueued++; queued++; } else if (OMXCameraPortParameters::FILL == capData->mStatus[index]) { + CAMHAL_LOGE("Not queueing index = %d", index); queued++; } index++; |