From 900c1297683ab50ca8a2d73f937bd09d9e9b100a Mon Sep 17 00:00:00 2001 From: Nipun Kwatra Date: Tue, 10 Aug 2010 17:54:11 -0700 Subject: 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 --- media/libstagefright/CameraSourceTimeLapse.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'media') 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(); } -- cgit v1.1