diff options
author | Pannag Sanketi <psanketi@google.com> | 2011-11-10 16:09:48 -0800 |
---|---|---|
committer | Pannag Sanketi <psanketi@google.com> | 2011-11-11 09:46:47 -0800 |
commit | 8d51fc281ca4e14c87eac278d153e162c0e1fcf2 (patch) | |
tree | c977274acd6d70c5b0785c3156311d2048fc57cd | |
parent | b67c2c4982a01f72763a93c8e366cf713bca0918 (diff) | |
download | packages_apps_LegacyCamera-8d51fc281ca4e14c87eac278d153e162c0e1fcf2.zip packages_apps_LegacyCamera-8d51fc281ca4e14c87eac278d153e162c0e1fcf2.tar.gz packages_apps_LegacyCamera-8d51fc281ca4e14c87eac278d153e162c0e1fcf2.tar.bz2 |
Mirroring issue in Background Replacer
The MediaSource is set to rotate so that it adjusts to the
rotation of the device, and displays upright. The backdropper does not
have to do any rotation except for the mirroring in case of front
camera.
Bug: 5490654
Change-Id: Iaa3a82dd98f9cf428fb0d0b65e1175b31d37d2b1
-rw-r--r-- | res/raw/backdropper.graph | 1 | ||||
-rw-r--r-- | src/com/android/camera/EffectsRecorder.java | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/res/raw/backdropper.graph b/res/raw/backdropper.graph index a903f12..ef470f8 100644 --- a/res/raw/backdropper.graph +++ b/res/raw/backdropper.graph @@ -61,6 +61,7 @@ @filter BackDropperFilter replacer { autowbToggle = 1; learningDoneListener = $learningDoneListener; + orientation = $orientation; } // Display output diff --git a/src/com/android/camera/EffectsRecorder.java b/src/com/android/camera/EffectsRecorder.java index bb7c813..737e828 100644 --- a/src/com/android/camera/EffectsRecorder.java +++ b/src/com/android/camera/EffectsRecorder.java @@ -514,6 +514,13 @@ public class EffectsRecorder { Filter backgroundSrc = mRunner.getGraph().getFilter("background"); backgroundSrc.setInputValue("sourceUrl", (String)mEffectParameter); + // For front camera, the background video needs to be mirrored in the + // backdropper filter + if (mCameraFacing == Camera.CameraInfo.CAMERA_FACING_FRONT) { + Filter replacer = mRunner.getGraph().getFilter("replacer"); + replacer.setInputValue("mirrorBg", true); + if (mLogVerbose) Log.v(TAG, "Setting the background to be mirrored"); + } break; default: break; |