Skip to content

Commit 7a80644

Browse files
committed
CameraPreview with 1080 x 1920 by default.
1 parent fb50943 commit 7a80644

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

cgeDemo/src/main/java/org/wysaid/cgeDemo/CameraDemoActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ public void onClick(View v) {
230230
});
231231

232232
//Recording video size
233-
mCameraView.presetRecordingSize(480, 640);
234-
// mCameraView.presetRecordingSize(720, 1280);
233+
// mCameraView.presetRecordingSize(480, 640);
234+
mCameraView.presetRecordingSize(1080, 1920);
235235

236236
//Taking picture size.
237237
mCameraView.setPictureSize(2048, 2048, true); // > 4MP

library/src/main/java/org/wysaid/view/CameraGLSurfaceView.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public synchronized boolean setFlashLightMode(String mode) {
9191
return true;
9292
}
9393

94-
protected int mMaxPreviewWidth = 1280;
95-
protected int mMaxPreviewHeight = 1280;
94+
protected int mMaxPreviewWidth = 1920;
95+
protected int mMaxPreviewHeight = 1920;
9696

9797
public static class Viewport {
9898
public int x, y, width, height;
@@ -104,7 +104,7 @@ public Viewport getDrawViewport() {
104104
return mDrawViewport;
105105
}
106106

107-
//The max preview size. Change it to 1920+ if you want to preview with 1080P
107+
//The max preview size. Make it greater if you want to preview with 2K/4K or more!
108108
void setMaxPreviewSize(int w, int h) {
109109
mMaxPreviewWidth = w;
110110
mMaxPreviewHeight = h;
@@ -143,6 +143,8 @@ public void presetRecordingSize(int width, int height) {
143143
height = (int) (height * scaling);
144144
}
145145

146+
Log.i(Common.LOG_TAG, "presetRecordingSize: " + width + "x" + height);
147+
146148
mRecordWidth = width;
147149
mRecordHeight = height;
148150
cameraInstance().setPreferPreviewSize(width, height);

0 commit comments

Comments
 (0)