diff options
author | satyavaraprasad yerramsetti <satyav@codeaurora.org> | 2014-10-17 12:53:48 +0530 |
---|---|---|
committer | Vijay kumar Tumati <vtumati@codeaurora.org> | 2014-11-04 16:44:36 +0530 |
commit | 9747e00d9796d0680bacc9d6400452ad1ef552e0 (patch) | |
tree | c48eaf0b1e27d0d1ad9e05453cd4d41e5944c965 | |
parent | 6c20d314ec43be447e9a2bfb17e96452d996a18b (diff) | |
download | android_packages_apps_Snap-9747e00d9796d0680bacc9d6400452ad1ef552e0.tar.gz android_packages_apps_Snap-9747e00d9796d0680bacc9d6400452ad1ef552e0.tar.bz2 android_packages_apps_Snap-9747e00d9796d0680bacc9d6400452ad1ef552e0.zip |
SnapdragonCamera: To enable duplication for 720p
This will enable output duplication from
cpp for 720p camcorder resolution same like
1080p resolution
Change-Id: I7b4713fe4f8db5a175242d4ce265806f5acbda84
-rwxr-xr-x | src/com/android/camera/VideoModule.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 651a3e3a6..9d3763ffd 100755 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -835,6 +835,14 @@ public class VideoModule implements CameraModule, } } + private boolean is720pEnabled() { + if (mProfile.quality == CamcorderProfile.QUALITY_720P) { + return true; + } else { + return false; + } + } + boolean isHFREnabled(int videoWidth, int videoHeight) { if ((null == mPreferences) || (null == mParameters)) { return false; @@ -897,7 +905,7 @@ public class VideoModule implements CameraModule, return; } mParameters = mCameraDevice.getParameters(); - if (mParameters.getSupportedVideoSizes() == null || is1080pEnabled() || + if (mParameters.getSupportedVideoSizes() == null || is1080pEnabled() || is720pEnabled() || isHFREnabled(mProfile.videoFrameWidth, mProfile.videoFrameHeight)) { mDesiredPreviewWidth = mProfile.videoFrameWidth; mDesiredPreviewHeight = mProfile.videoFrameHeight; @@ -2034,8 +2042,8 @@ public class VideoModule implements CameraModule, mParameters.setPreviewFormat (ImageFormat.YV12); } - if (is1080pEnabled()) { - Log.v(TAG, "1080p enabled, preview format set to NV12_VENUS"); + if (is1080pEnabled() || is720pEnabled()) { + Log.v(TAG, "1080p or 720p enabled, preview format set to NV12_VENUS"); mParameters.set(KEY_PREVIEW_FORMAT, FORMAT_NV12_VENUS); } |