diff options
Diffstat (limited to 'media/libstagefright/CameraSourceTimeLapse.cpp')
-rw-r--r-- | media/libstagefright/CameraSourceTimeLapse.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 7595a28..44d159a 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -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(); |