I'm working on a project which using camera2 API. When I get the list of supported output preview size using:
StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
Size[] choices = map.getOutputSizes(SurfaceTexture.class);
the output size list always return values which have width>height despite the fact that screen's width
When I use getResources().getDisplayMetrics()
(or any similar method) to check width/height it's always return width
And based on the value I see that in 2 cases the width/height are likely swap their value. (w: 1920, h: 1080 preview size. w: 1080, h: 1920 screen size).
So what is the different between them? Please help me!