diff options
author | Tyler Luu <tluu@ti.com> | 2011-08-30 13:59:31 +0300 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-08-31 20:02:33 -0700 |
commit | b2fb762fda58b35be6da475582e3f623f9f1e46a (patch) | |
tree | c7f4ade943f76e08685db02012fef78416c5789c /camera/AppCallbackNotifier.cpp | |
parent | d55379a7e975f992db1d10bba425f456447d14a8 (diff) | |
download | hardware_ti_omap4xxx-b2fb762fda58b35be6da475582e3f623f9f1e46a.zip hardware_ti_omap4xxx-b2fb762fda58b35be6da475582e3f623f9f1e46a.tar.gz hardware_ti_omap4xxx-b2fb762fda58b35be6da475582e3f623f9f1e46a.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/AppCallbackNotifier.cpp')
-rw-r--r-- | camera/AppCallbackNotifier.cpp | 12 |
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 ) && |