summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-11-15 02:58:04 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-15 02:58:04 -0800
commit87929f68048c7fe91963c1b0a05b32c8cc0022d2 (patch)
treedd32cc9d68f8c3026378a5ea3e108ba59bfc5024
parent03c26f1a95cf79a914e0d17b653e75b77b26abdc (diff)
parent60a0f1362bccb6c4a8300ccc73434d3cbdc04821 (diff)
downloadandroid_packages_apps_Snap-87929f68048c7fe91963c1b0a05b32c8cc0022d2.tar.gz
android_packages_apps_Snap-87929f68048c7fe91963c1b0a05b32c8cc0022d2.tar.bz2
android_packages_apps_Snap-87929f68048c7fe91963c1b0a05b32c8cc0022d2.zip
Merge "SnapdragonCamera: enable cpp duplication using system property"
-rwxr-xr-xsrc/com/android/camera/VideoModule.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 34ce64388..c3fb44c29 100755
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -177,6 +177,8 @@ public class VideoModule implements CameraModule,
private CameraProxy mCameraDevice;
private static final String KEY_PREVIEW_FORMAT = "preview-format";
private static final String FORMAT_NV12_VENUS = "nv12-venus";
+ private static final String PERSIST_CAMERA_CPP_DUPLICATION =
+ "persist.camera.cpp.duplication";
// The degrees of the device rotated clockwise from its natural orientation.
private int mOrientation = OrientationEventListener.ORIENTATION_UNKNOWN;
@@ -905,8 +907,11 @@ public class VideoModule implements CameraModule,
return;
}
mParameters = mCameraDevice.getParameters();
- if (mParameters.getSupportedVideoSizes() == null || is1080pEnabled() || is720pEnabled() ||
- isHFREnabled(mProfile.videoFrameWidth, mProfile.videoFrameHeight)) {
+ boolean isDuplicationEnabled =
+ SystemProperties.getBoolean(PERSIST_CAMERA_CPP_DUPLICATION, false);
+ if (mParameters.getSupportedVideoSizes() == null || ((is1080pEnabled() ||
+ is720pEnabled()) && isDuplicationEnabled) ||
+ isHFREnabled(mProfile.videoFrameWidth, mProfile.videoFrameHeight)) {
mDesiredPreviewWidth = mProfile.videoFrameWidth;
mDesiredPreviewHeight = mProfile.videoFrameHeight;
} else { // Driver supports separates outputs for preview and video.
@@ -2055,8 +2060,9 @@ public class VideoModule implements CameraModule,
Log.v(TAG, "preview format set to YV12");
mParameters.setPreviewFormat (ImageFormat.YV12);
}
-
- if (is1080pEnabled() || is720pEnabled()) {
+ boolean isDuplicationEnabled =
+ SystemProperties.getBoolean(PERSIST_CAMERA_CPP_DUPLICATION, false);
+ if ((is1080pEnabled() || is720pEnabled()) && isDuplicationEnabled) {
Log.v(TAG, "1080p or 720p enabled, preview format set to NV12_VENUS");
mParameters.set(KEY_PREVIEW_FORMAT, FORMAT_NV12_VENUS);
}