Report resolution together with FPS in JavaCamera2View.

This commit is contained in:
Alexander Smorkalov 2023-12-05 18:46:23 +03:00
parent 903b66906e
commit b1441c9d6a
2 changed files with 5 additions and 0 deletions

View File

@ -321,6 +321,10 @@ public class JavaCamera2View extends CameraBridgeViewBase {
}
createCameraPreviewSession();
}
if (mFpsMeter != null) {
mFpsMeter.setResolution(mFrameWidth, mFrameHeight);
}
} catch (RuntimeException e) {
throw new RuntimeException("Interrupted while setCameraPreviewSize.", e);
}

View File

@ -54,6 +54,7 @@ public class FpsMeter {
}
public void setResolution(int width, int height) {
Log.d(TAG, "FpsMeter.setResolution " + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight));
mWidth = width;
mHeight = height;
}