Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default preview resolution for multicamera changed to 1080p #64

Open
wants to merge 1 commit into
base: celadon/u/mr0/master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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());

Expand Down