summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNipun Kwatra <nkwatra@google.com>2010-09-14 21:22:59 -0700
committerNipun Kwatra <nkwatra@google.com>2010-09-14 21:22:59 -0700
commit3ee899e0466ecce107257beec04a2178939cf24e (patch)
treec63eee734c6adeafeac6a89be235a06403c9edf1
parent59d9e31c503e5c2f49448362a0d3a8f1150fb6c2 (diff)
downloadframeworks_av-3ee899e0466ecce107257beec04a2178939cf24e.zip
frameworks_av-3ee899e0466ecce107257beec04a2178939cf24e.tar.gz
frameworks_av-3ee899e0466ecce107257beec04a2178939cf24e.tar.bz2
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
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp7
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();