mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 11:45:30 +08:00
Report resolution together with FPS in JavaCamera2View.
This commit is contained in:
parent
903b66906e
commit
b1441c9d6a
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user