summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-10-20 08:41:24 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-20 08:41:24 -0700
commit7b9a10fef160cd452f7905ee52f7b9ac2262faf5 (patch)
tree5c7284fc4ca44451b6ae32e8848dff716ab09929 /src/com
parent71d40934176ee23be9a91ca0aa33656e1cce8ce6 (diff)
parent51b06d6696a4743339d026b3b3bd282645725b27 (diff)
downloadpackages_apps_LegacyCamera-7b9a10fef160cd452f7905ee52f7b9ac2262faf5.zip
packages_apps_LegacyCamera-7b9a10fef160cd452f7905ee52f7b9ac2262faf5.tar.gz
packages_apps_LegacyCamera-7b9a10fef160cd452f7905ee52f7b9ac2262faf5.tar.bz2
Merge "Fix effects orientation handling." into ics-mr0
Diffstat (limited to 'src/com')
-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 e3de79d..4694c90 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.
@@ -1252,9 +1251,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(