Camera2 aspect ratio on Samsung

扶醉桌前 提交于 2020-01-13 19:52:53

问题


I'm using the Camera2 API on an S5, showing a TextureView-based preview at 720x480. With Camera1, the preview looks fine, but with Camera2 its distorted:

I'm calling SurfaceTexture.setDefaultBufferSize properly, etc. This seems to work fine on non-Samsung phones.

Curiously, if I modify Camera2Basic to use the front-facing camera and 720x480 it has the same distortion:

Any idea what may be behind this problem? It seems reminiscent of another Samsung aspect ratio problem I've seen but I'm not sure how to translate that work-around over to Camera2.

来源:https://stackoverflow.com/questions/35709754/camera2-aspect-ratio-on-samsung

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!