diff options
author | Cherian Deepak <dcheri@codeaurora.org> | 2014-08-11 11:17:01 -0700 |
---|---|---|
committer | Leena Winterrowd <lenhardw@codeaurora.org> | 2014-08-18 11:16:33 -0700 |
commit | a1a59b9e28594594bac24f8f19bda948a3610501 (patch) | |
tree | f0231af59a3006dd1063f9275f7111aa3729ffd2 | |
parent | 7e199551b7d45767d7a76de35c00f299bea04652 (diff) | |
download | android_packages_apps_Snap-a1a59b9e28594594bac24f8f19bda948a3610501.tar.gz android_packages_apps_Snap-a1a59b9e28594594bac24f8f19bda948a3610501.tar.bz2 android_packages_apps_Snap-a1a59b9e28594594bac24f8f19bda948a3610501.zip |
SnapdragonCamera: To enable mirroring for 1080p
This will enable output duplication from
cpp for 1080p camcorder resolution
Change-Id: I3a6a49d98bea8102f3a00963deaba968fdec96ce
-rw-r--r-- | src/com/android/camera/VideoModule.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 81c6e136d..97cb8e490 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -175,6 +175,8 @@ public class VideoModule implements CameraModule, private final Handler mHandler = new MainHandler(); private VideoUI mUI; private CameraProxy mCameraDevice; + private static final String KEY_PREVIEW_FORMAT = "preview-format"; + private static final String FORMAT_NV12_VENUS = "nv12-venus"; // The degrees of the device rotated clockwise from its natural orientation. private int mOrientation = OrientationEventListener.ORIENTATION_UNKNOWN; @@ -818,13 +820,22 @@ public class VideoModule implements CameraModule, } } + private boolean is1080pEnabled() { + if (mProfile.quality == CamcorderProfile.QUALITY_1080P) { + return true; + } else { + return false; + } + } + + @TargetApi(Build.VERSION_CODES.HONEYCOMB) private void getDesiredPreviewSize() { if (mCameraDevice == null) { return; } mParameters = mCameraDevice.getParameters(); - if (mParameters.getSupportedVideoSizes() == null) { + if (mParameters.getSupportedVideoSizes() == null || is1080pEnabled()) { mDesiredPreviewWidth = mProfile.videoFrameWidth; mDesiredPreviewHeight = mProfile.videoFrameHeight; } else { // Driver supports separates outputs for preview and video. @@ -1888,6 +1899,11 @@ public class VideoModule implements CameraModule, mParameters.setPreviewFormat (ImageFormat.YV12); } + if (is1080pEnabled()) { + Log.v(TAG, "1080p enabled, preview format set to NV12_VENUS"); + mParameters.set(KEY_PREVIEW_FORMAT, FORMAT_NV12_VENUS); + } + // Set High Frame Rate. String HighFrameRate = mPreferences.getString( CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE, |