summaryrefslogtreecommitdiffstats
path: root/libcamera
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-10-18 19:30:21 +0800
committerWu-cheng Li <wuchengli@google.com>2010-10-19 15:49:28 +0800
commita8800b8151258d3b346aa116af893dfb7c435417 (patch)
tree2cf93c3937f00a501fe7f3432949afe6658dbdde /libcamera
parent1048e819c1966ea06259d89d6e6ccdfc43481774 (diff)
downloaddevice_samsung_crespo-a8800b8151258d3b346aa116af893dfb7c435417.zip
device_samsung_crespo-a8800b8151258d3b346aa116af893dfb7c435417.tar.gz
device_samsung_crespo-a8800b8151258d3b346aa116af893dfb7c435417.tar.bz2
Change front-facing camera orientation from 90 to 270.
bug:3105659 Change-Id: I0eac573df8c10878edbe33526983c8117c3baa5f
Diffstat (limited to 'libcamera')
-rw-r--r--libcamera/SecCameraHWInterface.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp
index e8df8eb..7da6087 100644
--- a/libcamera/SecCameraHWInterface.cpp
+++ b/libcamera/SecCameraHWInterface.cpp
@@ -1643,6 +1643,16 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
int new_exif_rotation = 1;
if (0 <= new_rotation) {
+ // This is a temporary hack to correct the exif orientation of
+ // front-facing camera. Now the picture is mirrored but it shouldn't.
+ // The degrees of KEY_ROTATION is relative to the non-mirrored picture.
+ if (new_camera_id == SecCamera::CAMERA_ID_FRONT) {
+ if (new_rotation == 90) {
+ new_rotation = 270;
+ } else if (new_rotation == 270) {
+ new_rotation = 90;
+ }
+ }
LOGV("%s : set orientation:%d\n", __func__, new_rotation);
if (mSecCamera->setExifOrientationInfo(new_rotation) < 0) {
LOGE("ERR(%s):Fail on mSecCamera->setExifOrientationInfo(%d)", __func__, new_rotation);
@@ -2228,7 +2238,7 @@ static CameraInfo sCameraInfo[] = {
},
{
CAMERA_FACING_FRONT,
- 90, /* orientation */
+ 270, /* orientation */
}
};