diff options
author | Tyler Luu <tluu@ti.com> | 2012-06-21 09:59:55 -0500 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-26 20:09:16 +0200 |
commit | 1887054f63d0cf9b15558442f1360b440eb03e86 (patch) | |
tree | c329f75856bb91a320179a9a9543d54971a2c29a /camera/OMXCameraAdapter | |
parent | 7eeb4f61f989b3aa0da6f77a579d6e4de1b5e885 (diff) | |
download | hardware_ti_omap4-1887054f63d0cf9b15558442f1360b440eb03e86.zip hardware_ti_omap4-1887054f63d0cf9b15558442f1360b440eb03e86.tar.gz hardware_ti_omap4-1887054f63d0cf9b15558442f1360b440eb03e86.tar.bz2 |
CameraHal: OMX: Change shot queue flow
- Since flow through base camera adapter has changed to make
call flow for accumulating shots similar to regular capture,
OMX capture needs to change it's slow a bit. We should be
accumlating burst counters in UseBuffer and go through whole
list of buffers trying to find an IDLE one when starting capture.
Change-Id: I91bebbb176d29504631095b29ce2a15a44b79f39
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r-- | camera/OMXCameraAdapter/OMXCapture.cpp | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp index 5231960..0a62006 100644 --- a/camera/OMXCameraAdapter/OMXCapture.cpp +++ b/camera/OMXCameraAdapter/OMXCapture.cpp @@ -1220,9 +1220,7 @@ status_t OMXCameraAdapter::startImageCapture(bool bracketing, CachedCaptureParam apply3Asettings(mParameters3A); } - // check is we are already in capture state...which means we are - // accumulating shots - if ((ret == NO_ERROR) && (mBurstFramesQueued > 0)) { + if (ret == NO_ERROR) { int index = 0; int queued = 0; android::AutoMutex lock(mBurstLock); @@ -1237,9 +1235,6 @@ status_t OMXCameraAdapter::startImageCapture(bool bracketing, CachedCaptureParam mBurstFramesQueued++; } } - } else { - mCapturedFrames += mBurstFrames; - mBurstFramesAccum += mBurstFrames; } while ((mBurstFramesQueued < mBurstFramesAccum) && @@ -1259,21 +1254,6 @@ status_t OMXCameraAdapter::startImageCapture(bool bracketing, CachedCaptureParam } index++; } - } else if ( NO_ERROR == ret ) { - ///Queue all the buffers on capture port - for ( int index = 0 ; index < capData->mMaxQueueable ; index++ ) { - if (mBurstFramesQueued < mBurstFramesAccum) { - CAMHAL_LOGDB("Queuing buffer on Capture port - %p", - capData->mBufferHeader[index]->pBuffer); - capData->mStatus[index] = OMXCameraPortParameters::FILL; - eError = OMX_FillThisBuffer(mCameraAdapterParameters.mHandleComp, - (OMX_BUFFERHEADERTYPE*)capData->mBufferHeader[index]); - mBurstFramesQueued++; - } else { - capData->mStatus[index] = OMXCameraPortParameters::IDLE; - } - GOTO_EXIT_IF((eError!=OMX_ErrorNone), eError); - } #ifdef CAMERAHAL_USE_RAW_IMAGE_SAVING if (mRawCapture) { @@ -1847,6 +1827,7 @@ status_t OMXCameraAdapter::UseBuffersCapture(CameraBuffer * bufArr, int num) pBufferHdr->nVersion.s.nRevision = 0; pBufferHdr->nVersion.s.nStep = 0; imgCaptureData->mBufferHeader[index] = pBufferHdr; + imgCaptureData->mStatus[index] = OMXCameraPortParameters::IDLE; } // Wait for the image port enable event @@ -1922,9 +1903,11 @@ status_t OMXCameraAdapter::UseBuffersCapture(CameraBuffer * bufArr, int num) } } - mCapturedFrames = mBurstFrames; - mBurstFramesAccum = mBurstFrames; - mBurstFramesQueued = 0; + { + android::AutoMutex lock(mBurstLock); + mCapturedFrames += mBurstFrames; + mBurstFramesAccum += mBurstFrames; + } mCaptureConfigured = true; |