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

Commit 8e02ca74 authored by Nipun Kwatra's avatar Nipun Kwatra
Browse files

Disable shutter sound and play recording sound for still mode time lapse.

Disabling shutter sound when using still capture for time lapse recording.
We also play recording sound at the start and stop of recording as is
done for usual video recording.

Change-Id: I6a6fa0c7c867979624105eea74fc17945db1f517
parent fb5a2d73
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -202,6 +202,10 @@ void CameraSourceTimeLapse::startCameraRecording() {
        mCamera->setParameters(params.flatten());
        mCameraIdle = true;

        // disable shutter sound and play the recording sound.
        mCamera->sendCommand(CAMERA_CMD_ENABLE_SHUTTER_SOUND, 0, 0);
        mCamera->sendCommand(CAMERA_CMD_PLAY_RECORDING_SOUND, 0, 0);

        // create a thread which takes pictures in a loop
        pthread_attr_t attr;
        pthread_attr_init(&attr);
@@ -219,6 +223,9 @@ void CameraSourceTimeLapse::stopCameraRecording() {
    if (mUseStillCameraForTimeLapse) {
        void *dummy;
        pthread_join(mThreadTimeLapse, &dummy);

        // play the recording sound and restart preview.
        mCamera->sendCommand(CAMERA_CMD_PLAY_RECORDING_SOUND, 0, 0);
        CHECK_EQ(OK, mCamera->startPreview());
    } else {
        mCamera->stopRecording();