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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user