summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoModule.java
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-11-12 16:40:41 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-12 16:40:41 -0800
commit0231aab003276d2142fe745e50d6eb44e3f11c9c (patch)
treedd32cc9d68f8c3026378a5ea3e108ba59bfc5024 /src/com/android/camera/VideoModule.java
parentef15ff9d0bef9f73a4631495232eb58305f556a4 (diff)
parent16477a8f2bf7803b0422189c884605f247a3aa40 (diff)
downloadandroid_packages_apps_Snap-0231aab003276d2142fe745e50d6eb44e3f11c9c.tar.gz
android_packages_apps_Snap-0231aab003276d2142fe745e50d6eb44e3f11c9c.tar.bz2
android_packages_apps_Snap-0231aab003276d2142fe745e50d6eb44e3f11c9c.zip
Merge "SnapdragonCamera: enable cpp duplication using system property"
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-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);
}