From dcdbc0fc3d9030d075e8622d06227d4c21bd859d Mon Sep 17 00:00:00 2001 From: shivasku82 Date: Wed, 16 Oct 2024 13:09:21 +0530 Subject: [PATCH] default preview resolution for multicamera changed to 1080p default preview resolution is set to 720p, for automotive multicamera app no option to switch resolution. automotive multicamera app needs to preview at 1080p resolution. Signed-off-by: shivasku82 --- .../java/com/intel/multicamera/CameraBase.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/camera/MultiCameraApplication/java/com/intel/multicamera/CameraBase.java b/camera/MultiCameraApplication/java/com/intel/multicamera/CameraBase.java index 2f1e9be..3671961 100644 --- a/camera/MultiCameraApplication/java/com/intel/multicamera/CameraBase.java +++ b/camera/MultiCameraApplication/java/com/intel/multicamera/CameraBase.java @@ -110,6 +110,7 @@ public class CameraBase { ORIENTATIONS.append(Surface.ROTATION_270, 180); } + static final Size SIZE_1080P = new Size(1920, 1080); static final Size SIZE_720P = new Size(1280, 720); static final Size SIZE_480P = new Size(640, 480); @@ -336,7 +337,7 @@ public void onClosed(@NonNull CameraDevice camera) { Log.v(TAG, "onClose"); mCameraDevice = camera; super.onClosed(camera); - previewSize = SIZE_720P; + previewSize = SIZE_1080P; configureTransform(textureView.getWidth(), textureView.getHeight()); SurfaceUtil.clear(mSurfaceTexture); @@ -412,7 +413,7 @@ private String GetChnagedPrefKey() { private Size getSelectedDimension(String Key) { settings = PreferenceManager.getDefaultSharedPreferences(mActivity); - Size mDimensions = SIZE_720P; + Size mDimensions = SIZE_1080P; if (Key.compareTo(Video_key) == 0) { CamcorderProfile mProfile; @@ -429,7 +430,7 @@ private Size getSelectedDimension(String Key) { } else { mDimensions = SettingsPrefUtil.sizeFromSettingString( - settings.getString(Capture_Key, "1280x720")); + settings.getString(Capture_Key, "1920x1080")); } return mDimensions; @@ -454,10 +455,11 @@ public void createCameraPreview() { if (previewSize.getWidth() == 640 || previewSize.getWidth() == 320) { previewSize = SIZE_480P; - } else if (previewSize.getWidth() == 1280 || previewSize.getWidth() == 1920) { + } else if (previewSize.getWidth() == 1280) { previewSize = SIZE_720P; + } else if (previewSize.getWidth() == 1920) { + previewSize = SIZE_1080P; } - Log.i(TAG, "Previewing with " + Key + " " + previewSize.getWidth() + " x " + previewSize.getHeight());