summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/CameraSourceTimeLapse.cpp
diff options
context:
space:
mode:
authorNipun Kwatra <nkwatra@google.com>2010-08-10 17:54:11 -0700
committerNipun Kwatra <nkwatra@google.com>2010-08-10 18:57:09 -0700
commit900c1297683ab50ca8a2d73f937bd09d9e9b100a (patch)
tree7042bb04d9351ef83c2fb5fa4fa5b35d5af399ee /media/libstagefright/CameraSourceTimeLapse.cpp
parentad2df1d0776066dc7c2e203390c336451238684a (diff)
downloadframeworks_av-900c1297683ab50ca8a2d73f937bd09d9e9b100a.zip
frameworks_av-900c1297683ab50ca8a2d73f937bd09d9e9b100a.tar.gz
frameworks_av-900c1297683ab50ca8a2d73f937bd09d9e9b100a.tar.bz2
Call startPreview after stopping for mUseStillCameraForTimeLapse=true case.
In the case when stop is pressed after takePicture has been called but the CAMERA_MSG_COMPRESSED_IMAGE message from camera has not yet been received, preview was not getting restarted. The reason was that CameraSource::stop sets the camera listener to NULL and hence the dataCallback() function which handles the CAMERA_MSG_COMPRESSED_IMAGE message and restarts preview never got called. Change-Id: Ib8f3bb77d9eab1ed5a67798569025ea0d63d7fd4
Diffstat (limited to 'media/libstagefright/CameraSourceTimeLapse.cpp')
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 1fd256a..ba99501 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -187,6 +187,7 @@ void CameraSourceTimeLapse::stopCameraRecording() {
if (mUseStillCameraForTimeLapse) {
void *dummy;
pthread_join(mThreadTimeLapse, &dummy);
+ CHECK_EQ(OK, mCamera->startPreview());
} else {
mCamera->stopRecording();
}