Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b589eadf authored by Kiran Kumar H N's avatar Kiran Kumar H N Committed by Ricardo Cerqueira
Browse files

Camera: Add support for ZSL burst mode.

Added ability to set number of snapshots in burst mode.

Change-Id: I598781c5d5a613d8f58e0783c563aedb3be027cb
parent 3ba19956
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -970,6 +970,9 @@ CameraService::BasicClient::BasicClient(const sp<CameraService>& cameraService,
    mServicePid = servicePid;
    mOpsActive = false;
    mDestructionStarted = false;
#ifdef QCOM_HARDWARE
    mBurstCnt = 0;
#endif
}

CameraService::BasicClient::~BasicClient() {
+3 −0
Original line number Diff line number Diff line
@@ -176,6 +176,9 @@ public:
        pid_t                           mClientPid;
        uid_t                           mClientUid;      // immutable after constructor
        pid_t                           mServicePid;     // immutable after constructor
#ifdef QCOM_HARDWARE
        int                             mBurstCnt;
#endif

        // - The app-side Binder interface to receive callbacks from us
        sp<IBinder>                     mRemoteBinder;   // immutable after constructor
+17 −1
Original line number Diff line number Diff line
@@ -583,6 +583,12 @@ status_t CameraClient::takePicture(int msgType) {
    disableMsgType(CAMERA_MSG_PREVIEW_METADATA);
#endif
    enableMsgType(picMsgType);
#ifdef QCOM_HARDWARE
    mBurstCnt = mHardware->getParameters().getInt("num-snaps-per-shutter");
    if(mBurstCnt <= 0)
        mBurstCnt = 1;
    LOG1("mBurstCnt = %d", mBurstCnt);
#endif

    return mHardware->takePicture();
}
@@ -930,7 +936,17 @@ void CameraClient::handleRawPicture(const sp<IMemory>& mem) {

// picture callback - compressed picture ready
void CameraClient::handleCompressedPicture(const sp<IMemory>& mem) {
#ifdef QCOM_HARDWARE
    if (mBurstCnt)
        mBurstCnt--;

    if (!mBurstCnt) {
        LOG1("handleCompressedPicture mBurstCnt = %d", mBurstCnt);
#endif
        disableMsgType(CAMERA_MSG_COMPRESSED_IMAGE);
#ifdef QCOM_HARDWARE
    }
#endif

    sp<ICameraClient> c = mRemoteCallback;
    mLock.unlock();