summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorTyler Luu <tluu@ti.com>2011-08-30 13:59:31 +0300
committerIliyan Malchev <malchev@google.com>2011-08-31 20:02:33 -0700
commit06da809a727d5ff88edfdd826522e0c7631b726e (patch)
tree15610c5c5a71d55532cfd8e35ad74226585d368e /camera
parent42246c89f1b37b150fe912f15aafb060de66af5d (diff)
downloadhardware_ti_omap4-06da809a727d5ff88edfdd826522e0c7631b726e.zip
hardware_ti_omap4-06da809a727d5ff88edfdd826522e0c7631b726e.tar.gz
hardware_ti_omap4-06da809a727d5ff88edfdd826522e0c7631b726e.tar.bz2
CameraHAL: Fixes for CTS test #testJpegCallbackStartPreview
- The camera client should be able to restart the preview from within the context of a jpeg callback. Depending on the binder ipc timing this may not be possible, because image capture is stopped right after the jpeg data callback. Change-Id: Id006ecd4d9f82eaa74b38f921bed2543f8c0c217 Original-author: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Tyler Luu <tluu@ti.com>
Diffstat (limited to 'camera')
-rw-r--r--camera/AppCallbackNotifier.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/camera/AppCallbackNotifier.cpp b/camera/AppCallbackNotifier.cpp
index 68ab850..c209612 100644
--- a/camera/AppCallbackNotifier.cpp
+++ b/camera/AppCallbackNotifier.cpp
@@ -595,6 +595,15 @@ void AppCallbackNotifier::notifyFrame()
frame->mLength);
}
+ // CTS Requirement: The camera client should be
+ // able to restart the preview from within the context
+ // of a jpeg callback. Here we should return the image
+ // frame before calling the data callback. This way
+ // we won't depend on the binder ipc timing and we
+ // will be able to execute the client request successfully.
+ mFrameProvider->returnFrame(frame->mBuffer,
+ ( CameraFrame::FrameType ) frame->mFrameType);
+
{
Mutex::Autolock lock(mBurstLock);
#if 0 //TODO: enable burst mode later
@@ -620,9 +629,6 @@ void AppCallbackNotifier::notifyFrame()
raw_picture->release(raw_picture);
}
- mFrameProvider->returnFrame(frame->mBuffer,
- ( CameraFrame::FrameType ) frame->mFrameType);
-
}
else if ( ( CameraFrame::VIDEO_FRAME_SYNC == frame->mFrameType ) &&
( NULL != mCameraHal ) &&