Skip to content

Commit

Permalink
make out the preview fps
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Dec 13, 2017
1 parent d7ff89a commit bb218d1
Showing 1 changed file with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,19 @@ public void surfaceCreated(SurfaceHolder holder) {

parameters.setPictureSize(w, h);
parameters.setPreviewSize(w,h);
parameters.setPreviewFpsRange(30000,30000);
//parameters.setPreviewFpsRange(30000,30000);

List<int[]> fpsRange = parameters.getSupportedPreviewFpsRange();
//
parameters.setPreviewFpsRange(fpsRange.get(fpsRange.size()-1)[1],fpsRange.get(fpsRange.size()-1)[1]);

// parameters.set("fast-fps-mode", 0); // 0 for 30fps
//parameters.set("focus-mode", "continuous-video");

//parameters.setPreviewFpsRange(30000, 30000);

// for auto focus


/*
* If the flash is needed
Expand Down Expand Up @@ -320,19 +332,6 @@ public void surfaceDestroyed(SurfaceHolder holder) {

public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
if (camera != null) {
// Now that the size is known, set up the camera parameters and begin
// the preview.
Camera.Parameters parameters = camera.getParameters();
//parameters.setPreviewSize(w, h)
//List<int[]> fpsRange = parameters.getSupportedPreviewFpsRange();
//parameters.setPreviewFpsRange(fpsRange.get(fpsRange.size()-1)[1],fpsRange.get(fpsRange.size()-1)[1]);

// for 30fps
// parameters.set("fast-fps-mode", 0); // 0 for 30fps
//parameters.setPreviewFpsRange(30000, 30000);

// for auto focus
//parameters.set("focus-mode", "continuous-video");

int degree = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
int displayOrientation = 0;
Expand Down

0 comments on commit bb218d1

Please sign in to comment.