diff options
author | Akwasi Boateng <akwasi.boateng@ti.com> | 2011-09-07 21:28:38 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-09-09 11:36:40 -0700 |
commit | 381ec2390c3d9d6ba3b67cf53e69fec96e7a7bd1 (patch) | |
tree | 2b7591b90f5200dcddcd71d2da41e6b620758e9e /camera/CameraHal.cpp | |
parent | 70ff025808c44ce9e01c045d879c5e60605de242 (diff) | |
download | hardware_ti_omap4xxx-381ec2390c3d9d6ba3b67cf53e69fec96e7a7bd1.zip hardware_ti_omap4xxx-381ec2390c3d9d6ba3b67cf53e69fec96e7a7bd1.tar.gz hardware_ti_omap4xxx-381ec2390c3d9d6ba3b67cf53e69fec96e7a7bd1.tar.bz2 |
Set default fps range for video mode to 24<->30
Hack to allow image mode fps=15 and
vide mode fps = 24
Change-Id: Ie2a4b3d5c7e32515a1af948fa65c934baaf3e1a9
Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
Diffstat (limited to 'camera/CameraHal.cpp')
-rw-r--r-- | camera/CameraHal.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index 4db34d8..5b1def1 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -253,6 +253,7 @@ int CameraHal::setParameters(const CameraParameters& params) // Needed for KEY_RECORDING_HINT bool restartPreviewRequired = false; CameraParameters oldParams(mParameters.flatten()); + bool videoMode = false; { Mutex::Autolock lock(mLock); @@ -385,6 +386,7 @@ int CameraHal::setParameters(const CameraParameters& params) CAMHAL_LOGDB("Recording Hint is set to %s", valstr); mParameters.set(CameraParameters::KEY_RECORDING_HINT, valstr); restartPreviewRequired = setVideoModeParameters(); + videoMode = true; } else if(strcmp(valstr, CameraParameters::FALSE) == 0) { @@ -451,6 +453,14 @@ int CameraHal::setParameters(const CameraParameters& params) CAMHAL_LOGDB("FPS Range = %s", valstr); params.getPreviewFpsRange(&minFPS, &maxFPS); + if (videoMode) + { + mCameraProperties->set(CameraProperties::FRAMERATE_RANGE, CameraProperties::DEFAULT_VIDEO_FPS_RANGE); + valstr = mCameraProperties->get(CameraProperties::FRAMERATE_RANGE); + mParameters.set(CameraParameters::KEY_PREVIEW_FPS_RANGE, valstr); + mParameters.getPreviewFpsRange(&minFPS, &maxFPS); + } + if ( ( 0 > minFPS ) || ( 0 > maxFPS ) ) { CAMHAL_LOGEA("ERROR: FPS Range is negative!"); |