Loading services/camera/libcameraservice/Camera2Client.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1111,7 +1111,7 @@ status_t Camera2Client::takePicture(int msgType) { // Need HAL to have correct settings before (possibly) triggering precapture syncWithDevice(); res = mCaptureSequencer->startCapture(); res = mCaptureSequencer->startCapture(msgType); if (res != OK) { ALOGE("%s: Camera %d: Unable to start capture: %s (%d)", __FUNCTION__, mCameraId, strerror(-res), res); Loading services/camera/libcameraservice/camera2/CaptureSequencer.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ CaptureSequencer::CaptureSequencer(wp<Camera2Client> client): mCaptureState(IDLE), mTriggerId(0), mTimeoutCount(0), mCaptureId(Camera2Client::kCaptureRequestIdStart) { mCaptureId(Camera2Client::kCaptureRequestIdStart), mMsgType(0) { ALOGV("%s", __FUNCTION__); } Loading @@ -58,7 +59,7 @@ void CaptureSequencer::setZslProcessor(wp<ZslProcessor> processor) { mZslProcessor = processor; } status_t CaptureSequencer::startCapture() { status_t CaptureSequencer::startCapture(int msgType) { ALOGV("%s", __FUNCTION__); ATRACE_CALL(); Mutex::Autolock l(mInputMutex); Loading @@ -67,6 +68,7 @@ status_t CaptureSequencer::startCapture() { return INVALID_OPERATION; } if (!mStartCapture) { mMsgType = msgType; mStartCapture = true; mStartCaptureSignal.signal(); } Loading Loading @@ -343,7 +345,7 @@ CaptureSequencer::CaptureState CaptureSequencer::manageZslStart( SharedParameters::Lock l(client->getParameters()); /* warning: this also locks a SharedCameraClient */ shutterNotifyLocked(l.mParameters, client); shutterNotifyLocked(l.mParameters, client, mMsgType); mShutterNotified = true; mTimeoutCount = kMaxTimeoutsForCaptureEnd; return STANDARD_CAPTURE_WAIT; Loading Loading @@ -495,7 +497,7 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCaptureWait( if (mNewFrameReceived && !mShutterNotified) { SharedParameters::Lock l(client->getParameters()); /* warning: this also locks a SharedCameraClient */ shutterNotifyLocked(l.mParameters, client); shutterNotifyLocked(l.mParameters, client, mMsgType); mShutterNotified = true; } while (mNewFrameReceived && !mNewCaptureReceived) { Loading Loading @@ -639,10 +641,12 @@ status_t CaptureSequencer::updateCaptureRequest(const Parameters ¶ms, } /*static*/ void CaptureSequencer::shutterNotifyLocked(const Parameters ¶ms, sp<Camera2Client> client) { sp<Camera2Client> client, int msgType) { ATRACE_CALL(); if (params.state == Parameters::STILL_CAPTURE && params.playShutterSound) { if (params.state == Parameters::STILL_CAPTURE && params.playShutterSound && (msgType & CAMERA_MSG_SHUTTER)) { client->getCameraService()->playSound(CameraService::SOUND_SHUTTER); } Loading services/camera/libcameraservice/camera2/CaptureSequencer.h +3 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class CaptureSequencer: void setZslProcessor(wp<ZslProcessor> processor); // Begin still image capture status_t startCapture(); status_t startCapture(int msgType); // Wait until current image capture completes; returns immediately if no // capture is active. Returns TIMED_OUT if capture does not complete during Loading Loading @@ -138,6 +138,7 @@ class CaptureSequencer: bool mAeInPrecapture; int32_t mCaptureId; int mMsgType; // Main internal methods Loading Loading @@ -167,7 +168,7 @@ class CaptureSequencer: // Emit Shutter/Raw callback to java, and maybe play a shutter sound static void shutterNotifyLocked(const Parameters ¶ms, sp<Camera2Client> client); sp<Camera2Client> client, int msgType); }; }; // namespace camera2 Loading Loading
services/camera/libcameraservice/Camera2Client.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1111,7 +1111,7 @@ status_t Camera2Client::takePicture(int msgType) { // Need HAL to have correct settings before (possibly) triggering precapture syncWithDevice(); res = mCaptureSequencer->startCapture(); res = mCaptureSequencer->startCapture(msgType); if (res != OK) { ALOGE("%s: Camera %d: Unable to start capture: %s (%d)", __FUNCTION__, mCameraId, strerror(-res), res); Loading
services/camera/libcameraservice/camera2/CaptureSequencer.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ CaptureSequencer::CaptureSequencer(wp<Camera2Client> client): mCaptureState(IDLE), mTriggerId(0), mTimeoutCount(0), mCaptureId(Camera2Client::kCaptureRequestIdStart) { mCaptureId(Camera2Client::kCaptureRequestIdStart), mMsgType(0) { ALOGV("%s", __FUNCTION__); } Loading @@ -58,7 +59,7 @@ void CaptureSequencer::setZslProcessor(wp<ZslProcessor> processor) { mZslProcessor = processor; } status_t CaptureSequencer::startCapture() { status_t CaptureSequencer::startCapture(int msgType) { ALOGV("%s", __FUNCTION__); ATRACE_CALL(); Mutex::Autolock l(mInputMutex); Loading @@ -67,6 +68,7 @@ status_t CaptureSequencer::startCapture() { return INVALID_OPERATION; } if (!mStartCapture) { mMsgType = msgType; mStartCapture = true; mStartCaptureSignal.signal(); } Loading Loading @@ -343,7 +345,7 @@ CaptureSequencer::CaptureState CaptureSequencer::manageZslStart( SharedParameters::Lock l(client->getParameters()); /* warning: this also locks a SharedCameraClient */ shutterNotifyLocked(l.mParameters, client); shutterNotifyLocked(l.mParameters, client, mMsgType); mShutterNotified = true; mTimeoutCount = kMaxTimeoutsForCaptureEnd; return STANDARD_CAPTURE_WAIT; Loading Loading @@ -495,7 +497,7 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCaptureWait( if (mNewFrameReceived && !mShutterNotified) { SharedParameters::Lock l(client->getParameters()); /* warning: this also locks a SharedCameraClient */ shutterNotifyLocked(l.mParameters, client); shutterNotifyLocked(l.mParameters, client, mMsgType); mShutterNotified = true; } while (mNewFrameReceived && !mNewCaptureReceived) { Loading Loading @@ -639,10 +641,12 @@ status_t CaptureSequencer::updateCaptureRequest(const Parameters ¶ms, } /*static*/ void CaptureSequencer::shutterNotifyLocked(const Parameters ¶ms, sp<Camera2Client> client) { sp<Camera2Client> client, int msgType) { ATRACE_CALL(); if (params.state == Parameters::STILL_CAPTURE && params.playShutterSound) { if (params.state == Parameters::STILL_CAPTURE && params.playShutterSound && (msgType & CAMERA_MSG_SHUTTER)) { client->getCameraService()->playSound(CameraService::SOUND_SHUTTER); } Loading
services/camera/libcameraservice/camera2/CaptureSequencer.h +3 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class CaptureSequencer: void setZslProcessor(wp<ZslProcessor> processor); // Begin still image capture status_t startCapture(); status_t startCapture(int msgType); // Wait until current image capture completes; returns immediately if no // capture is active. Returns TIMED_OUT if capture does not complete during Loading Loading @@ -138,6 +138,7 @@ class CaptureSequencer: bool mAeInPrecapture; int32_t mCaptureId; int mMsgType; // Main internal methods Loading Loading @@ -167,7 +168,7 @@ class CaptureSequencer: // Emit Shutter/Raw callback to java, and maybe play a shutter sound static void shutterNotifyLocked(const Parameters ¶ms, sp<Camera2Client> client); sp<Camera2Client> client, int msgType); }; }; // namespace camera2 Loading