diff options
author | Akwasi Boateng <akwasi.boateng@ti.com> | 2011-10-25 01:26:14 -0500 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-10-25 14:42:14 -0700 |
commit | 3dcde7b7332edf04cd597b01d69950544dcd6589 (patch) | |
tree | 1704841131bb696a5da731ed6dd3d127426c9265 | |
parent | 101e561aab4690accf96adc376f5be528a9b4d79 (diff) | |
download | hardware_ti_omap4xxx-3dcde7b7332edf04cd597b01d69950544dcd6589.zip hardware_ti_omap4xxx-3dcde7b7332edf04cd597b01d69950544dcd6589.tar.gz hardware_ti_omap4xxx-3dcde7b7332edf04cd597b01d69950544dcd6589.tar.bz2 |
Fixes for MMS setparameter crashes
1. Fix native crash for set parameter when
zoom is applied in MMS mode and while
recording is in progress.
2. Don't allow restart of preview or preview
stop when recording is in progress.
3. Fix slow zoom when in MMS mode casued by
unnecessary preview restarts.
4. Fix initial jerky preview when you start
recording in MMS mode caused by having
to restart preview.
Change-Id: Ie64799974488caae5887e4c9f9072d74a12dd797
Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
related-to-bug: 5507018
-rw-r--r-- | camera/AppCallbackNotifier.cpp | 4 | ||||
-rw-r--r-- | camera/CameraHal.cpp | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/camera/AppCallbackNotifier.cpp b/camera/AppCallbackNotifier.cpp index 9368d3e..c716291 100644 --- a/camera/AppCallbackNotifier.cpp +++ b/camera/AppCallbackNotifier.cpp @@ -1263,6 +1263,10 @@ void AppCallbackNotifier::releaseSharedVideoBuffers() mVideoMetadataBufferMemoryMap.clear(); mVideoMetadataBufferReverseMap.clear(); + if (mUseVideoBuffers) + { + mVideoMap.clear(); + } } LOG_FUNCTION_NAME_EXIT; diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index 7be4931..8d20891 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -398,7 +398,6 @@ int CameraHal::setParameters(const CameraParameters& params) { CAMHAL_LOGDB("Recording Hint is set to %s", valstr); mParameters.set(CameraParameters::KEY_RECORDING_HINT, valstr); - restartPreviewRequired |= setVideoModeParameters(params); videoMode = true; int w, h; @@ -412,7 +411,13 @@ int CameraHal::setParameters(const CameraParameters& params) setPreferredPreviewRes(w, h); mParameters.getPreviewSize(&w, &h); CAMHAL_LOGVB("%s Preview Width=%d Height=%d\n", __FUNCTION__, w, h); + //Avoid restarting preview for MMS HACK + if ((w != mVideoWidth) && (h != mVideoHeight)) + { + restartPreviewRequired = false; + } + restartPreviewRequired |= setVideoModeParameters(params); } else if(strcmp(valstr, CameraParameters::FALSE) == 0) { @@ -1009,10 +1014,11 @@ int CameraHal::setParameters(const CameraParameters& params) // Restart Preview if needed by KEY_RECODING_HINT only if preview is already running. // If preview is not started yet, Video Mode parameters will take effect on next startPreview() - if (restartPreviewRequired && previewEnabled()) { + if (restartPreviewRequired && previewEnabled() && !mRecordingEnabled) { CAMHAL_LOGDA("Restarting Preview"); ret = restartPreview(); - } else if (restartPreviewRequired && !previewEnabled() && mDisplayPaused) { + } else if (restartPreviewRequired && !previewEnabled() && + mDisplayPaused && !mRecordingEnabled) { CAMHAL_LOGDA("Stopping Preview"); forceStopPreview(); } |