summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/CameraSource.cpp
diff options
context:
space:
mode:
authorKevin Bruckert <agrabren@yahoo.com>2012-11-20 04:48:00 -0800
committerDorian Snyder <dastin1015@gmail.com>2013-04-28 21:31:40 -0700
commitea33819479ae5b53b80704c12a317b1555adbc97 (patch)
tree3036675bd0b17960cc84fa89c6f94b12fb138a09 /media/libstagefright/CameraSource.cpp
parente411d62373f5d13f6bebf3073efa6f94fd7ba460 (diff)
downloadframeworks_av-ea33819479ae5b53b80704c12a317b1555adbc97.zip
frameworks_av-ea33819479ae5b53b80704c12a317b1555adbc97.tar.gz
frameworks_av-ea33819479ae5b53b80704c12a317b1555adbc97.tar.bz2
Add camera parameters for htc evo 3D. (1/2)
Use BOARD_HTC_3D_SUPPORT to enable. Change-Id: I28fa3f1586071bcc78b8e887bbbf699d338a0ceb
Diffstat (limited to 'media/libstagefright/CameraSource.cpp')
-rwxr-xr-xmedia/libstagefright/CameraSource.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index b8b9152..9f63ec0 100755
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -347,11 +347,13 @@ status_t CameraSource::configureCamera(
ALOGV("Supported frame rates: %s", supportedFrameRates);
char buf[4];
snprintf(buf, 4, "%d", frameRate);
+#ifndef HTC_3D_SUPPORT // HTC uses invalid frame rates intentionally on the 3D camera
if (strstr(supportedFrameRates, buf) == NULL) {
ALOGE("Requested frame rate (%d) is not supported: %s",
frameRate, supportedFrameRates);
return BAD_VALUE;
}
+#endif
// The frame rate is supported, set the camera to the requested value.
params->setPreviewFrameRate(frameRate);
@@ -449,11 +451,13 @@ status_t CameraSource::checkFrameRate(
// Check the actual video frame rate against the target/requested
// video frame rate.
+#ifndef HTC_3D_SUPPORT // HTC uses invalid frame rates intentionally on the 3D camera
if (frameRate != -1 && (frameRateActual - frameRate) != 0) {
ALOGE("Failed to set preview frame rate to %d fps. The actual "
"frame rate is %d", frameRate, frameRateActual);
return UNKNOWN_ERROR;
}
+#endif
// Good now.
mVideoFrameRate = frameRateActual;