Merge pull request #24651 from asmorkalov:as/android_camera2_resolution_report

Report resolution together with FPS in JavaCamera2View
This commit is contained in:
Alexander Smorkalov 2023-12-05 21:45:25 +03:00 committed by GitHub
commit 55d248941b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}