summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-10-20 08:42:45 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-20 08:42:45 -0700
commit4cba085e1394742afd1f367f461faf6d0dbca73e (patch)
tree34793f90a5645e4f7b0278dbad4e8923db2d3f80 /src/com/android/camera
parent30dae69d0ec4daae57177bc8fd352c3c810b3171 (diff)
parent7b9a10fef160cd452f7905ee52f7b9ac2262faf5 (diff)
downloadLegacyCamera-4cba085e1394742afd1f367f461faf6d0dbca73e.zip
LegacyCamera-4cba085e1394742afd1f367f461faf6d0dbca73e.tar.gz
LegacyCamera-4cba085e1394742afd1f367f461faf6d0dbca73e.tar.bz2
am 7b9a10fe: Merge "Fix effects orientation handling." into ics-mr0
* commit '7b9a10fef160cd452f7905ee52f7b9ac2262faf5': Fix effects orientation handling.
Diffstat (limited to 'src/com/android/camera')
-rw-r--r--src/com/android/camera/EffectsRecorder.java11
-rwxr-xr-xsrc/com/android/camera/VideoCamera.java8
2 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/camera/EffectsRecorder.java b/src/com/android/camera/EffectsRecorder.java
index e4d613a..7c81bf0 100644
--- a/src/com/android/camera/EffectsRecorder.java
+++ b/src/com/android/camera/EffectsRecorder.java
@@ -323,12 +323,12 @@ public class EffectsRecorder {
mEffectsListener = listener;
}
- private void setFaceDetectOrientation(int degrees) {
+ private void setFaceDetectOrientation() {
if (mCurrentEffect == EFFECT_GOOFY_FACE) {
Filter rotateFilter = mRunner.getGraph().getFilter("rotate");
Filter metaRotateFilter = mRunner.getGraph().getFilter("metarotate");
- rotateFilter.setInputValue("rotation", degrees);
- int reverseDegrees = (360 - degrees) % 360;
+ rotateFilter.setInputValue("rotation", mOrientationHint);
+ int reverseDegrees = (360 - mOrientationHint) % 360;
metaRotateFilter.setInputValue("rotation", reverseDegrees);
}
}
@@ -367,9 +367,8 @@ public class EffectsRecorder {
break;
}
if (mLogVerbose) Log.v(TAG, "Setting orientation hint to: " + degrees);
-
mOrientationHint = degrees;
- setFaceDetectOrientation(degrees);
+ setFaceDetectOrientation();
setRecordingOrientation();
}
@@ -498,7 +497,7 @@ public class EffectsRecorder {
default:
break;
}
- setFaceDetectOrientation(mOrientationHint);
+ setFaceDetectOrientation();
setRecordingOrientation();
}
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 7d96cd3..4b3b078 100755
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -530,9 +530,8 @@ public class VideoCamera extends ActivityBase
if (mOrientationCompensation != orientationCompensation) {
mOrientationCompensation = orientationCompensation;
if (effectsActive()) {
- CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId];
- int rotation = (info.orientation + mOrientation) % 360;
- mEffectsRecorder.setOrientationHint(rotation);
+ mEffectsRecorder.setOrientationHint(
+ mOrientationCompensation % 360);
}
// Do not rotate the icons during recording because the video
// orientation is fixed after recording.
@@ -1251,9 +1250,10 @@ public class VideoCamera extends ActivityBase
// documentation.
int rotation = 0;
if (mOrientation != OrientationEventListener.ORIENTATION_UNKNOWN) {
- rotation = (info.orientation + mOrientation) % 360;
+ rotation = mOrientationCompensation % 360;
}
mEffectsRecorder.setOrientationHint(rotation);
+
mOrientationCompensationAtRecordStart = mOrientationCompensation;
mEffectsRecorder.setPreviewDisplay(