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