diff options
-rw-r--r-- | camera/AppCallbackNotifier.cpp | 22 | ||||
-rw-r--r-- | camera/BaseCameraAdapter.cpp | 4 |
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]; |