summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Luu <tluu@ti.com>2011-09-26 15:14:56 -0500
committerIliyan Malchev <malchev@google.com>2011-10-07 16:05:19 -0700
commit8a01f97380aad5b6a30a2d248aa07af4d92373d0 (patch)
treea74de9d3c40fe8d78ffa7aab14baa5bbfb3d9d90
parentcacb0651c406df6b9ad2ee3bd48cc756718ba1a2 (diff)
downloadhardware_ti_omap4xxx-8a01f97380aad5b6a30a2d248aa07af4d92373d0.zip
hardware_ti_omap4xxx-8a01f97380aad5b6a30a2d248aa07af4d92373d0.tar.gz
hardware_ti_omap4xxx-8a01f97380aad5b6a30a2d248aa07af4d92373d0.tar.bz2
omap4xxx: camera: re-enable postview callback
Fixes b/5370657... again Change-Id: I998d2292d25b76b67b1fbd2ff6bd65e854c176c8 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
-rw-r--r--camera/AppCallbackNotifier.cpp22
-rw-r--r--camera/BaseCameraAdapter.cpp4
2 files changed, 8 insertions, 18 deletions
diff --git a/camera/AppCallbackNotifier.cpp b/camera/AppCallbackNotifier.cpp
index cc53fb4..784d042 100644
--- a/camera/AppCallbackNotifier.cpp
+++ b/camera/AppCallbackNotifier.cpp
@@ -1618,30 +1618,18 @@ status_t AppCallbackNotifier::releaseRecordingFrame(const void* mem)
status_t AppCallbackNotifier::enableMsgType(int32_t msgType)
{
- if(msgType & CAMERA_MSG_POSTVIEW_FRAME)
- {
- mFrameProvider->enableFrameNotification(CameraFrame::SNAPSHOT_FRAME);
- }
-
- if(msgType & CAMERA_MSG_PREVIEW_FRAME)
- {
- mFrameProvider->enableFrameNotification(CameraFrame::PREVIEW_FRAME_SYNC);
- }
+ if( msgType & (CAMERA_MSG_POSTVIEW_FRAME | CAMERA_MSG_PREVIEW_FRAME) ) {
+ mFrameProvider->enableFrameNotification(CameraFrame::PREVIEW_FRAME_SYNC);
+ }
return NO_ERROR;
}
status_t AppCallbackNotifier::disableMsgType(int32_t msgType)
{
- if(msgType & CAMERA_MSG_POSTVIEW_FRAME)
- {
- mFrameProvider->disableFrameNotification(CameraFrame::SNAPSHOT_FRAME);
- }
-
- if(msgType & CAMERA_MSG_PREVIEW_FRAME)
- {
+ if(!mCameraHal->msgTypeEnabled(CAMERA_MSG_PREVIEW_FRAME | CAMERA_MSG_POSTVIEW_FRAME)) {
mFrameProvider->disableFrameNotification(CameraFrame::PREVIEW_FRAME_SYNC);
- }
+ }
return NO_ERROR;
diff --git a/camera/BaseCameraAdapter.cpp b/camera/BaseCameraAdapter.cpp
index 1d631c7..fd051e5 100644
--- a/camera/BaseCameraAdapter.cpp
+++ b/camera/BaseCameraAdapter.cpp
@@ -1211,7 +1211,9 @@ status_t BaseCameraAdapter::__sendFrameToSubscribers(CameraFrame* frame,
frame->mFrameType = frameType;
- if ( (frameType == CameraFrame::PREVIEW_FRAME_SYNC) || (frameType == CameraFrame::VIDEO_FRAME_SYNC)){
+ if ( (frameType == CameraFrame::PREVIEW_FRAME_SYNC) ||
+ (frameType == CameraFrame::VIDEO_FRAME_SYNC) ||
+ (frameType == CameraFrame::SNAPSHOT_FRAME) ){
if (mFrameQueue.size() > 0){
CameraFrame *lframe = (CameraFrame *)mFrameQueue.valueFor(frame->mBuffer);
frame->mYuv[0] = lframe->mYuv[0];